62 lines
3.0 KiB
PHP
62 lines
3.0 KiB
PHP
<x-filament-panels::page>
|
|
|
|
<div class="grid grid-cols-1 gap-4 sm:grid-cols-3 mb-6">
|
|
<x-filament::card>
|
|
<div class="flex items-center gap-3">
|
|
<x-heroicon-o-clock class="w-8 h-8 text-gray-400" />
|
|
<div>
|
|
<p class="text-sm text-gray-500">{{ __('navigation.sync.last_sync') }}</p>
|
|
<p class="text-lg font-bold">{{ $this->getLastSyncTime() }}</p>
|
|
</div>
|
|
</div>
|
|
</x-filament::card>
|
|
|
|
<x-filament::card>
|
|
<div class="flex items-center gap-3">
|
|
<x-heroicon-o-queue-list class="w-8 h-8 text-amber-400" />
|
|
<div>
|
|
<p class="text-sm text-gray-500">{{ __('navigation.sync.pending_changes') }}</p>
|
|
<p class="text-2xl font-bold text-amber-500">{{ $this->getPendingCount() }}</p>
|
|
</div>
|
|
</div>
|
|
</x-filament::card>
|
|
|
|
<x-filament::card>
|
|
<div class="flex items-center gap-3">
|
|
<x-heroicon-o-server class="w-8 h-8 text-blue-400" />
|
|
<div>
|
|
<p class="text-sm text-gray-500">{{ __('navigation.sync.peer_address') }}</p>
|
|
<p class="text-lg font-bold font-mono">
|
|
{{ \App\Models\OsurgInitial::val('sync_peer_ip', config('sync.peer_ip')) ?: '—' }}
|
|
@php($port = \App\Models\OsurgInitial::val('sync_peer_port', config('sync.peer_port')))
|
|
@if($port && $port != 80)
|
|
:{{ $port }}
|
|
@endif
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</x-filament::card>
|
|
</div>
|
|
|
|
<x-filament::card>
|
|
<div class="space-y-2 text-sm text-gray-600 dark:text-gray-400">
|
|
<h3 class="font-semibold text-base text-gray-800 dark:text-gray-200">{{ __('navigation.sync.setup_guide') }}</h3>
|
|
<p>{{ __('navigation.sync.setup_description_dynamic') }}</p>
|
|
<ul class="list-disc list-inside space-y-1 text-xs">
|
|
<li><code class="bg-gray-100 dark:bg-gray-800 px-1 rounded">sync_peer_ip</code> — {{ __('navigation.sync.field_peer_ip') }}</li>
|
|
<li><code class="bg-gray-100 dark:bg-gray-800 px-1 rounded">sync_peer_port</code> — {{ __('navigation.sync.field_peer_port') }}</li>
|
|
<li><code class="bg-gray-100 dark:bg-gray-800 px-1 rounded">sync_token</code> — {{ __('navigation.sync.field_sync_token') }}</li>
|
|
</ul>
|
|
<p class="text-amber-600 dark:text-amber-400">⚠ {{ __('navigation.sync.setup_warning') }}</p>
|
|
</div>
|
|
</x-filament::card>
|
|
|
|
@if($report)
|
|
<x-filament::card>
|
|
<h3 class="font-semibold text-base mb-2">{{ __('navigation.sync.last_report') }}</h3>
|
|
<pre class="bg-gray-50 dark:bg-gray-900 border rounded p-3 text-xs leading-loose max-h-64 overflow-y-auto whitespace-pre-wrap">{{ $report }}</pre>
|
|
</x-filament::card>
|
|
@endif
|
|
|
|
</x-filament-panels::page>
|