mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-29 23:22:34 +01:00
45ce7a7126
Swapped back handling to instead be pre-determined instead of being based upon session/referrer which would cause inconsistent results when referrer data was not available (redirect to app-loaded images/files). To support, this adds a mechansism to provide a URL through request data. Also cleaned up some imports in code while making changes. Closes #4656.
10 lines
549 B
PHP
10 lines
549 B
PHP
<form action="{{ url('/preferences/toggle-dark-mode') }}" method="post">
|
|
{{ csrf_field() }}
|
|
{{ method_field('patch') }}
|
|
<input type="hidden" name="_return" value="{{ url()->current() }}">
|
|
@if(setting()->getForCurrentUser('dark-mode-enabled'))
|
|
<button class="{{ $classes ?? '' }}"><span>@icon('light-mode')</span><span>{{ trans('common.light_mode') }}</span></button>
|
|
@else
|
|
<button class="{{ $classes ?? '' }}"><span>@icon('dark-mode')</span><span>{{ trans('common.dark_mode') }}</span></button>
|
|
@endif
|
|
</form> |