nimuli/resources/views/livewire/pages/profile/preferences.blade.php

47 lines
2.4 KiB
PHP

<div class="max-w-2xl">
<div class="mb-6">
<h1 class="text-2xl font-semibold text-t1">Profile</h1>
<nav class="flex gap-1 mt-4">
<a href="{{ route('profile.personal') }}" wire:navigate class="px-3 py-1.5 text-sm rounded-lg text-t2 hover:text-t1 hover:bg-s2">Personal Info</a>
<a href="{{ route('profile.preferences') }}" wire:navigate class="px-3 py-1.5 text-sm rounded-lg bg-blue/10 text-blue font-medium">Preferences</a>
<a href="{{ route('profile.security') }}" wire:navigate class="px-3 py-1.5 text-sm rounded-lg text-t2 hover:text-t1 hover:bg-s2">Security</a>
</nav>
</div>
@if(session('status'))
<div class="mb-4 p-3 rounded-lg bg-green/10 border border-green/20 text-sm text-green">{{ session('status') }}</div>
@endif
<div class="bg-s1 border border-white/[.06] rounded-xl p-6">
<h3 class="text-sm font-medium text-t1 mb-5">Preferences</h3>
<div class="space-y-5 max-w-sm">
<div>
<label class="block text-xs font-medium text-t2 mb-1.5">Language</label>
<select wire:model="locale"
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 focus:outline-none">
<option value="de">Deutsch</option>
<option value="en">English</option>
</select>
</div>
<div>
<label class="block text-xs font-medium text-t2 mb-2">Theme</label>
<div class="flex gap-2">
@foreach(['dark' => 'Dark', 'light' => 'Light', 'system' => 'System'] as $val => $label)
<label class="flex-1 cursor-pointer">
<input wire:model="theme" type="radio" value="{{ $val }}" class="sr-only">
<div class="px-3 py-2 text-sm text-center rounded-lg border transition-colors
{{ $theme === $val ? 'bg-blue/10 border-blue/40 text-blue' : 'bg-s2 border-white/[.06] text-t2 hover:text-t1' }}">
{{ $label }}
</div>
</label>
@endforeach
</div>
</div>
<button wire:click="save"
class="px-4 py-2.5 bg-accent-gradient text-white text-sm font-medium rounded-lg hover:opacity-90">
Save Preferences
</button>
</div>
</div>
</div>