v0.7.0 - Settings tab
This commit is contained in:
parent
76e0d7997a
commit
c2ae6e08c3
|
@ -5,8 +5,14 @@ namespace App\Http\Controllers;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
|
||||||
class settingsController extends Controller
|
class SettingsController extends Controller
|
||||||
{
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware(["auth"]);
|
||||||
|
$this->middleware(["lang"]);
|
||||||
|
}
|
||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return Response::detect("settings.index");
|
return Response::detect("settings.index");
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24pt" height="24pt" viewBox="0 0 24 24" version="1.1">
|
||||||
|
<g id="surface6481941">
|
||||||
|
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9.667969 2 L 9.175781 4.523438 C 8.355469 4.832031 7.597656 5.265625 6.929688 5.816406 L 4.507812 4.976562 L 2.175781 9.019531 L 4.113281 10.707031 C 4.042969 11.128906 4 11.558594 4 12 C 4 12.441406 4.042969 12.871094 4.113281 13.292969 L 2.175781 14.980469 L 4.507812 19.019531 L 6.929688 18.183594 C 7.597656 18.734375 8.355469 19.167969 9.175781 19.476562 L 9.667969 22 L 14.332031 22 L 14.824219 19.476562 C 15.644531 19.167969 16.402344 18.734375 17.070312 18.183594 L 19.496094 19.019531 L 21.828125 14.980469 L 19.886719 13.292969 C 19.957031 12.871094 20 12.441406 20 12 C 20 11.558594 19.957031 11.128906 19.886719 10.707031 L 21.828125 9.019531 L 19.496094 4.976562 L 17.070312 5.816406 C 16.402344 5.265625 15.644531 4.832031 14.824219 4.523438 L 14.332031 2 Z M 12 8 C 14.210938 8 16 9.789062 16 12 C 16 14.210938 14.210938 16 12 16 C 9.789062 16 8 14.210938 8 12 C 8 9.789062 9.789062 8 12 8 Z M 12 8 "/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -48,6 +48,7 @@ return[
|
||||||
"ingennyheder" => "Der er ingen nyheder",
|
"ingennyheder" => "Der er ingen nyheder",
|
||||||
"mørk" => "Mørk",
|
"mørk" => "Mørk",
|
||||||
"lys" => "Lys",
|
"lys" => "Lys",
|
||||||
|
"indstillinger" => "Indstillinger"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,4 +57,5 @@ return[
|
||||||
"ingennyheder" => "No news were found",
|
"ingennyheder" => "No news were found",
|
||||||
"mørk" => "Dark",
|
"mørk" => "Dark",
|
||||||
"lys" => "Light",
|
"lys" => "Light",
|
||||||
|
"indstillinger" => "Settings"
|
||||||
];
|
];
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
{{-- Galleri--}}
|
{{-- Galleri--}}
|
||||||
{{-- </a>--}}
|
{{-- </a>--}}
|
||||||
<a href="{{ route("contacts.index") }}">
|
<a href="{{ route("contacts.index") }}">
|
||||||
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontakter">
|
||||||
{{ __('msg.kontoret') }}
|
{{ __('msg.kontoret') }}
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route("phones.index") }}">
|
<a href="{{ route("phones.index") }}">
|
||||||
|
@ -59,6 +59,10 @@
|
||||||
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
||||||
{{ __('msg.konto') }}
|
{{ __('msg.konto') }}
|
||||||
</a>
|
</a>
|
||||||
|
<a href="{{ route("settings.index") }}">
|
||||||
|
<img src="{{URL::asset('/images/icons/settings-hvid.svg')}}" alt="Indstillinger">
|
||||||
|
{{ __('msg.indstillinger') }}
|
||||||
|
</a>
|
||||||
<a href="{{ route('users.logout') }}">
|
<a href="{{ route('users.logout') }}">
|
||||||
<img src="{{URL::asset('/images/icons/Logout.svg')}}" alt="Logud">
|
<img src="{{URL::asset('/images/icons/Logout.svg')}}" alt="Logud">
|
||||||
{{ __('msg.logud') }}
|
{{ __('msg.logud') }}
|
||||||
|
|
|
@ -38,11 +38,6 @@
|
||||||
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
|
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
|
||||||
Reservationer
|
Reservationer
|
||||||
</a>
|
</a>
|
||||||
{{-- MÅ IKKE SLETTES!!!! --}}
|
|
||||||
{{-- <a href="# ">--}}
|
|
||||||
{{-- <img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">--}}
|
|
||||||
{{-- Galleri--}}
|
|
||||||
{{-- </a>--}}
|
|
||||||
<a href="{{ route("contacts.index") }}">
|
<a href="{{ route("contacts.index") }}">
|
||||||
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
||||||
Kontoret
|
Kontoret
|
||||||
|
@ -59,6 +54,10 @@
|
||||||
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
<img src="{{URL::asset('/images/icons/user-hvid.svg')}}" alt="Konto">
|
||||||
Konto
|
Konto
|
||||||
</a>
|
</a>
|
||||||
|
<a href="{{ route("settings.index") }}">
|
||||||
|
<img src="{{URL::asset('/images/icons/settings-hvid.svg')}}" alt="Indstillinger">
|
||||||
|
{{ __('msg.indstillinger') }}
|
||||||
|
</a>
|
||||||
<a href="{{ route('users.logout') }}">
|
<a href="{{ route('users.logout') }}">
|
||||||
<img src="{{URL::asset('/images/icons/Logout.svg')}}" alt="Logud">
|
<img src="{{URL::asset('/images/icons/Logout.svg')}}" alt="Logud">
|
||||||
Log Ud
|
Log Ud
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
@extends("app.layout.base")
|
||||||
|
|
||||||
|
@section("title")
|
||||||
|
Settings
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section("content")
|
||||||
|
<script src="{{ asset("/js/jquery-3.2.1.min.js") }}"></script>
|
||||||
|
<main style="justify-content: unset">
|
||||||
|
<label for="langu" class="mt-2">Sprog / Languages:</label>
|
||||||
|
<select name="langName" id="lang">
|
||||||
|
@if(request()->cookie('languagesSetting') == "dk")
|
||||||
|
<option selected name="langDK" value="dk">Dansk</option>
|
||||||
|
@else
|
||||||
|
<option name="langDK" value="dk">Dansk</option>
|
||||||
|
@endif
|
||||||
|
@if(request()->cookie('languagesSetting') == "en")
|
||||||
|
<option selected name="langEN" value="en">English</option>
|
||||||
|
@else
|
||||||
|
<option name="langEN" value="en">English</option>
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
<label for="dark">Tema / Theme:</label>
|
||||||
|
<select name="light" id="darkmode">
|
||||||
|
@if(request()->cookie('mode') == "light")
|
||||||
|
<option selected name="ligthmode" style="color: black;" value="Light">{{ __("msg.lys") }}</option>
|
||||||
|
@else
|
||||||
|
<option name="light" style="color: black;" value="light">{{ __("msg.lys") }}</option>
|
||||||
|
@endif
|
||||||
|
@if(request()->cookie('mode') == "dark")
|
||||||
|
<option selected name="darkmode" style="color: black;" value="dark">{{ __("msg.mørk") }}</option>
|
||||||
|
@else
|
||||||
|
<option name="dark" style="color: black;" value="dark">{{ __("msg.mørk") }}</option>
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function (){
|
||||||
|
$('#lang').change(function () {
|
||||||
|
$value = $('#lang').find(":selected").val();
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '{{route('users.setLanguages')}}',
|
||||||
|
data: {'lang':$value},
|
||||||
|
success:function (data) {
|
||||||
|
console.log($value);
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error:function (data) {
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
$('#darkmode').change(function () {
|
||||||
|
$darkmodeON = $('#darkmode').find(":selected").val();
|
||||||
|
$.ajax({
|
||||||
|
type: 'get',
|
||||||
|
url: '{{route('users.setDarkMode')}}',
|
||||||
|
data: {'darkmode':$darkmodeON},
|
||||||
|
success:function (data) {
|
||||||
|
console.log($darkmodeON);
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error:function (data) {
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@endsection
|
|
@ -14,77 +14,5 @@
|
||||||
{!! session()->get('success#credentialschanged') !!}
|
{!! session()->get('success#credentialschanged') !!}
|
||||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accountedit") }}">{{__('msg.redigeroplysninger')}}</a>
|
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accountedit") }}">{{__('msg.redigeroplysninger')}}</a>
|
||||||
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accounteditpass") }}">{{__('msg.ændrepassword')}}</a>
|
<a class="btn text-center btn-sde-blue mt-1" href="{{ route("users.accounteditpass") }}">{{__('msg.ændrepassword')}}</a>
|
||||||
|
|
||||||
<label for="langu">Sprog / Languages:</label>
|
|
||||||
<select name="langName" id="lang">
|
|
||||||
@if(request()->cookie('languagesSetting') == "dk")
|
|
||||||
<option selected name="langDK" value="dk">Dansk</option>
|
|
||||||
@else
|
|
||||||
<option name="langDK" value="dk">Dansk</option>
|
|
||||||
@endif
|
|
||||||
@if(request()->cookie('languagesSetting') == "en")
|
|
||||||
<option selected name="langEN" value="en">English</option>
|
|
||||||
@else
|
|
||||||
<option name="langEN" value="en">English</option>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<label for="dark">Tema / Theme:</label>
|
|
||||||
<select name="light" id="darkmode">
|
|
||||||
@if(request()->cookie('mode') == "light")
|
|
||||||
<option selected name="ligthmode" style="color: black;" value="Light">{{ __("msg.lys") }}</option>
|
|
||||||
@else
|
|
||||||
<option name="light" style="color: black;" value="light">{{ __("msg.lys") }}</option>
|
|
||||||
@endif
|
|
||||||
@if(request()->cookie('mode') == "dark")
|
|
||||||
<option selected name="darkmode" style="color: black;" value="dark">{{ __("msg.mørk") }}</option>
|
|
||||||
@else
|
|
||||||
<option name="dark" style="color: black;" value="dark">{{ __("msg.mørk") }}</option>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function (){
|
|
||||||
$('#lang').change(function () {
|
|
||||||
$value = $('#lang').find(":selected").val();
|
|
||||||
$.ajax({
|
|
||||||
type: 'get',
|
|
||||||
url: '{{route('users.setLanguages')}}',
|
|
||||||
data: {'lang':$value},
|
|
||||||
success:function (data) {
|
|
||||||
console.log($value);
|
|
||||||
location.reload();
|
|
||||||
},
|
|
||||||
error:function (data) {
|
|
||||||
console.log(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
$('#darkmode').change(function () {
|
|
||||||
$darkmodeON = $('#darkmode').find(":selected").val();
|
|
||||||
$.ajax({
|
|
||||||
type: 'get',
|
|
||||||
url: '{{route('users.setDarkMode')}}',
|
|
||||||
data: {'darkmode':$darkmodeON},
|
|
||||||
success:function (data) {
|
|
||||||
console.log($darkmodeON);
|
|
||||||
location.reload();
|
|
||||||
},
|
|
||||||
error:function (data) {
|
|
||||||
console.log(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -30,7 +30,7 @@ Route::get("/events/accountsignups", "EventController@accountsignups")->name("ev
|
||||||
Route::get("phones", "PhoneController@index")->name("phones.index");
|
Route::get("phones", "PhoneController@index")->name("phones.index");
|
||||||
Route::get("/washing-reservationsapi", "WashingReservationController@api")->name("washing-reservations.api");
|
Route::get("/washing-reservationsapi", "WashingReservationController@api")->name("washing-reservations.api");
|
||||||
Route::get("/app/washing-reservations", "WashingReservationController@appindex")->name("washing-reservations.appindex");
|
Route::get("/app/washing-reservations", "WashingReservationController@appindex")->name("washing-reservations.appindex");
|
||||||
Route::get("/settings", "settingsController@settings")->name("settings.index");
|
Route::get("/settings", "SettingsController@index")->name("settings.index");
|
||||||
|
|
||||||
//Search/Filter
|
//Search/Filter
|
||||||
Route::get("/contactsapi", "ContactController@search")->name("contacts.search");
|
Route::get("/contactsapi", "ContactController@search")->name("contacts.search");
|
||||||
|
|
Loading…
Reference in New Issue