mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-29 20:23:52 +08:00
a3fcc98d6e
Changes their endpoints and remove the user id from the URLs. Simplifies list changes to share a single endpoint, which aligns it to the behaviour of the existing sort preference endpoint. Also added test to ensure user preferences are deleted on user delete.
9 lines
477 B
PHP
9 lines
477 B
PHP
<form action="{{ url('/preferences/toggle-dark-mode') }}" method="post">
|
|
{{ csrf_field() }}
|
|
{{ method_field('patch') }}
|
|
@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> |