{{-- /admin/settings/pwa — installable Progressive Web App manifest. Each field maps 1:1 to a `pwa_*` system_settings row. partials/pwa-meta.blade.php reads them on every request to emit the manifest link + theme-color meta. The `/manifest.json` route is generated dynamically from these same rows. --}}
@csrf @method('PATCH')
{{ __('Admin · Project settings') }}

{{ __('PWA') }} {{ __('settings') }}.

{{ __('Installable app manifest: name, icons, colors, display mode, and offline cache. Drives /manifest.json + the install prompt.') }}

{{ __('All settings') }}
@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
{{ __('Please fix the highlighted fields:') }}
    @foreach ($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif
{{ __('Installable app') }}

{{ __('PWA manifest') }}

{{-- App icon · 192×192 — upload (replaces the old URL field). --}}
{{ __('App icon') }} {{ __('· recommended 192×192 px PNG') }}
@if ($pwa['icon_192']) {{ __('App icon 192') }} @else {{ __('No icon yet') }} @endif
{{ __('Square PNG, 192×192 px. Used as the home-screen app icon.') }}
{{-- App icon · 512×512 — upload. --}}
{{ __('Large icon / splash') }} {{ __('· recommended 512×512 px PNG') }}
@if ($pwa['icon_512']) {{ __('App icon 512') }} @else {{ __('No icon yet') }} @endif
{{ __('Square PNG, 512×512 px. Used for the install splash + high-DPI screens.') }}
{{ __('Live manifest URL') }}
{{ url('/manifest.json') }}
{{ __('View JSON') }}
{{-- Team-Inbox PWA — a SEPARATE installable app scoped to /team-inbox with push notifications. --}}
{{ __('Team Inbox app') }}

{{ __('Team Inbox PWA') }}

{{ __('A separate installable app scoped to the Team Inbox. Agents open the link, add it to their home screen, and get push notifications on new messages even when the app is closed.') }}

{{-- Dedicated Team-Inbox app icons. When left empty the manifest falls back to the app-wide PWA icons, then the favicon. A real square 192/512 PNG is what makes the app installable. --}}
{{ __('App icon') }} {{ __('· 192×192 px PNG') }}
@if ($pwa['ti_icon_192']) {{ __('Team Inbox icon 192') }} @else {{ __('Uses the app icon if empty') }} @endif
{{ __('Square PNG, 192×192 px. Home-screen icon for the inbox app.') }}
{{ __('Large icon / splash') }} {{ __('· 512×512 px PNG') }}
@if ($pwa['ti_icon_512']) {{ __('Team Inbox icon 512') }} @else {{ __('Uses the app icon if empty') }} @endif
{{ __('Square PNG, 512×512 px. Install splash + high-DPI screens.') }}
{{-- Push status + one-click key generation. Replaces the old `php artisan teaminbox:push-setup` command — the admin just clicks Generate keys (no SSH). Composer package still has to be installed once on the server; when it isn't, we say so. --}}
@if ($tiPushReady)
{{ __('Push notifications: ready') }}
{{ __('Keys are generated — agents can turn on notifications from the inbox.') }}
@elseif (!$tiPushLib)
{{ __('Push notifications: one server step') }}
{{ __('Install the push library once on the server, then come back and click Generate keys:') }} composer require minishlink/web-push
@else
{{ __('Push notifications: one step left') }}
{{ __('Click Generate keys to set up push. No server access needed.') }}
@endif
@unless ($tiPushReady) @endunless
{{-- One-click VAPID key generation for the Team-Inbox PWA push. Posts to the admin endpoint, then updates the status card in place — no page reload, no artisan command. --}} @push('scripts') @endpush