@php use App\Enums\NotificationActionType; use App\Support\NotificationTuneLibrary; $preferenceState = $preferenceState ?? auth()->user()->notificationPreferenceState(); $tuneOptions = $tuneOptions ?? NotificationTuneLibrary::tunes(); $noteOptions = $noteOptions ?? NotificationTuneLibrary::noteOptions(); $defaultTune = $defaultTune ?? NotificationTuneLibrary::resolve(NotificationTuneLibrary::defaultKey()); $selectedTuneKey = $preferenceState['tune_key'] ?? 'default'; $customTune = $preferenceState['custom_tune'] ?? NotificationTuneLibrary::defaultCustomTune(); $customNotes = $customTune['notes'] ?? NotificationTuneLibrary::defaultCustomTune()['notes']; @endphp @extends('frontend.user.setting.index') @section('title', __('Notifications')) @section('user_setting_content')
{{ __('Notification Preferences') }}

{{ __('Control account alerts, sound, and custom notification tune.') }}

{{ __('Live') }}
@csrf @method('PUT')
@error('tune_key')
{{ $message }}
@enderror
$selectedTuneKey !== NotificationTuneLibrary::CUSTOM_KEY])>
{{ __('Custom Tune Builder') }}
{{ __('Pick four notes and a speed to make your own notification sound.') }}
{{ __('Personal') }}
@error('custom_tune.label')
{{ $message }}
@enderror
@foreach(['note_1', 'note_2', 'note_3', 'note_4'] as $noteField)
@error("custom_tune.$noteField")
{{ $message }}
@enderror
@endforeach
{{ __('ms') }}
@error('custom_tune.speed')
{{ $message }}
@enderror

{{ __('Preferences are saved to this account and can be changed anytime.') }}

{{ __('Notifications') }}

{{ __('Recent account activity and wallet updates.') }}

{{ trans_choice('{0} Clear|{1} :count alert|[2,*] :count alerts', $notifications->count(), ['count' => $notifications->count()]) }}
@if($notifications->isNotEmpty())
    @foreach($notifications as $notification) @php $data = $notification->data; $isRead = ! is_null($notification->read_at); @endphp
  • {{ $data['title'] ?? __('No message available') }}
    {{ $data['message'] }}
    @unless($isRead) @endunless
  • @endforeach
@if($notifications->hasPages())
{{ $notifications->links() }}
@endif @else @endif
@endsection @push('scripts') @endpush