2019-04-28 22:53:21 +00:00
|
|
|
@extends('settings.template')
|
|
|
|
|
|
|
|
@section('section')
|
|
|
|
<div class="title">
|
|
|
|
<h3 class="font-weight-bold">Labs</h3>
|
|
|
|
<p class="lead">Experimental features</p>
|
|
|
|
</div>
|
|
|
|
<hr>
|
2022-04-03 06:42:57 +00:00
|
|
|
<form method="post" id="form">
|
2019-04-28 22:53:21 +00:00
|
|
|
@csrf
|
|
|
|
<div class="form-check pb-3">
|
2020-12-14 07:49:45 +00:00
|
|
|
<input class="form-check-input" type="checkbox" name="dark_mode" id="dark_mode" {{request()->hasCookie('dark-mode') ? 'checked':''}}>
|
|
|
|
<label class="form-check-label font-weight-bold" for="dark_mode">
|
|
|
|
{{__('Dark Mode')}}
|
2019-04-28 22:53:21 +00:00
|
|
|
</label>
|
2020-12-14 07:49:45 +00:00
|
|
|
<p class="text-muted small help-text">Use dark mode theme.</p>
|
2019-04-28 22:53:21 +00:00
|
|
|
</div>
|
2022-04-03 06:42:57 +00:00
|
|
|
|
2019-04-28 22:53:21 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<div class="col-12">
|
|
|
|
<hr>
|
2022-04-03 06:42:57 +00:00
|
|
|
<button type="button" class="btn btn-primary font-weight-bold py-1 btn-block" id="save-btn">Save Changes</button>
|
2019-04-28 22:53:21 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2019-05-04 02:01:31 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
2022-04-03 06:42:57 +00:00
|
|
|
let darkMode = localStorage.getItem('pf_m2s.color-scheme') == 'dark' ? true : false;
|
|
|
|
if(darkMode == true) {
|
|
|
|
$('#dark_mode').attr('checked', true);
|
2019-05-04 02:01:31 +00:00
|
|
|
}
|
|
|
|
|
2022-04-03 06:42:57 +00:00
|
|
|
$('#save-btn').click(function() {
|
|
|
|
let darkMode = document.querySelector('#dark_mode').checked;
|
|
|
|
let colorScheme = darkMode ? 'dark' : 'light';
|
|
|
|
localStorage.setItem('pf_m2s.color-scheme', colorScheme);
|
|
|
|
$('#form').submit();
|
2019-05-05 01:52:23 +00:00
|
|
|
});
|
2019-05-04 02:01:31 +00:00
|
|
|
});
|
|
|
|
</script>
|
2022-04-03 06:42:57 +00:00
|
|
|
@endpush
|