@extends('layouts.admin') @section('title', __('pwa_admin.title')) @section('breadcrumb', __('admin.group.settings')) @section('content')
@if ($errors->any())
{{ __('pwa_admin.validation_title') }}
@endif @if ($vapidError)
{{ __('pwa_admin.push.key_warning') }} {{ $vapidError }}
@endif
@csrf @method('put')
PWA

{{ __('pwa_admin.title') }}

{{ __('pwa_admin.subtitle') }}

{{ $settings['enabled'] ? __('pwa_admin.status_enabled') : __('pwa_admin.status_disabled') }} {{ $vapidPublic ? __('pwa_admin.push.keys_ready') : __('pwa_admin.push.keys_missing') }} {{ $isSecure ? __('pwa_admin.status_secure') : __('pwa_admin.status_insecure') }}
{{ $settings['name'][app()->getLocale()] ?? $settings['name'][array_key_first($settings['name'])] ?? '' }} {{ $settings['display'] }} · {{ $settings['short_name'][app()->getLocale()] ?? '' }} {{ __('pwa_admin.view_manifest') }} ↗
{{ __('pwa_admin.analytics.kicker') }}
{{-- ------------------------------------------------------ general --}}

{{ __('pwa_admin.tabs.general') }}

{{ __('pwa_admin.general.help') }}

@foreach ([ ['name' => 'enabled', 'title' => __('pwa_admin.general.enabled'), 'help' => __('pwa_admin.general.enabled_help')], ['name' => 'install_prompt', 'title' => __('pwa_admin.general.install_prompt'), 'help' => __('pwa_admin.general.install_prompt_help')], ['name' => 'install_button', 'title' => __('pwa_admin.general.install_button'), 'help' => __('pwa_admin.general.install_button_help')], ['name' => 'notification_prompt', 'title' => __('pwa_admin.general.notification_prompt'), 'help' => __('pwa_admin.general.notification_prompt_help')], ['name' => 'analytics', 'title' => __('pwa_admin.general.analytics'), 'help' => __('pwa_admin.general.analytics_help')], ] as $toggle) @endforeach

{{ __('pwa_admin.general.identity') }}

@foreach ($languages as $index => $language) @endforeach
@foreach ($languages as $index => $language) @endforeach
{{-- ------------------------------------------------------ install --}} {{-- ---------------------------------------------------- appearance --}} {{-- --------------------------------------------------------- cache --}} {{-- ---------------------------------------------------------- push --}}

{{ __('pwa_admin.save_help') }}

{{ __('pwa_admin.analytics.kicker') }} {{ __('pwa_admin.analytics.title') }} {{ __('pwa_admin.analytics.help') }} {{ __('pwa_admin.analytics.open') }} ↗ {{-- ---------------------------------------------------- notification composer --}}
@csrf
{{ __('pwa_admin.push.campaign_kicker') }}

{{ __('pwa_admin.push.compose') }}

{{ __('pwa_admin.push.compose_help') }}
{{ $stats['subscriptions_active'] }} {{ __('pwa_admin.push.active_subscribers') }}

{{ __('pwa_admin.push.send_help') }}

{{ __('pwa_admin.push.campaigns') }}

{{ __('pwa_admin.push.campaigns_help') }}
@if ($campaigns->isEmpty())
{{ __('pwa_admin.push.no_campaigns') }}
@else
@foreach ($campaigns as $campaign)
{{ $campaign->title }} {{ $campaign->created_at?->format('d M Y · H:i') }} · {{ __('pwa_admin.push.audiences.'.$campaign->audience) }}
{{ $campaign->sent_count }} {{ __('pwa_admin.analytics.sent_short') }} {{ $campaign->failed_count }} {{ __('pwa_admin.analytics.failed_short') }}
{{ __('pwa_admin.status.'.$campaign->status) }}
@endforeach
@endif
{{-- -------------------------------------------------------- subscribers --}}

{{ __('pwa_admin.push.subscribers') }}

{{ __('pwa_admin.push.subscribers_help') }}
{{ $stats['subscriptions_active'] }} {{ __('pwa_admin.push.active') }}
@if ($subscriptions->isEmpty())
{{ __('pwa_admin.push.no_subscribers') }}
@else
@foreach ($subscriptions as $subscription) @endforeach
{{ __('pwa_admin.push.customer') }} {{ __('pwa_admin.analytics.device') }} {{ __('pwa_admin.push.topics') }} {{ __('pwa_admin.push.last_seen') }}
{{ $subscription->customer?->name ?: __('pwa_admin.push.guest') }} {{ parse_url($subscription->endpoint, PHP_URL_HOST) ?: '—' }} {{ $subscription->device_type }} · {{ $subscription->browser ?: '—' }} @foreach ((array) $subscription->topics as $topicKey) {{ $topicKey }} @endforeach {{ $subscription->last_seen_at?->diffForHumans() ?: '—' }}
@csrf @method('delete')
@endif
{{-- ----------------------------------------------------------- maintenance --}}
{{ __('pwa_admin.cache.clear') }}

{{ __('pwa_admin.cache.clear_help') }}

{{ $settings['cache_version'] }}
@csrf
{{ __('pwa_admin.push.rotate') }}

{{ __('pwa_admin.push.rotate_help') }}

{{ \Illuminate\Support\Str::limit($vapidPublic, 56) }}
@csrf
@endsection @push('scripts') @endpush