@include('partials.sweet-alert-flash')
@if ($isServer)
{{-- نسخة السيرفر: بتستقبل من الفروع --}}
☁️ {{ __('sync.role_server') }}
{{ $serverSetting->receive_enabled ? '🟢 ' . __('sync.receiving_on') : '🔴 ' . __('sync.receiving_off') }}
{{ __('sync.last_received_label') }}
{{ $serverSetting->last_received_at?->format('Y-m-d H:i') ?? __('sync.never') }}
{{ __('sync.received_rows_label') }}
{{ number_format((int) $serverSetting->received_rows) }}
{{ __('sync.server_index_hint') }}
{{ url('/') }}
⚠️ {{ __('sync.not_configured') }}
⚙️ {{ __('sync.open_settings') }}
{{ __('sync.env_alternative') }}
{{ __('sync.setup_title') }}:
# .env (جهاز الفرع)
SYNC_CLOUD_URL=
SYNC_TOKEN=your-long-secret-key
SYNC_AUTO=true
# .env (السيرفر الأونلاين)
SYNC_RECEIVE_TOKEN=your-long-secret-key
@endif
@if (!($hasBaseline ?? true))
{{-- أول مرة: لازم تتحدّث من السيرفر قبل الشغل أوفلاين --}}
⚠️ {{ __('sync.first_pull_title') }}
{{ __('sync.first_pull_hint') }}
{{ __('sync.first_pull_warning') }}
@endif
{{-- حالة المزامنة --}}
📦 {{ __('sync.pending_title') }}
@if ($filesEnabled && $pendingFiles > 0)
📁 {{ __('sync.files_pending_label') }}
{{ number_format($pendingFiles) }}
@endif
@if (empty($pending) && (!$filesEnabled || $pendingFiles === 0))
{{ __('sync.nothing_pending') }}
@elseif (!empty($pending))
| {{ __('sync.table') }} |
{{ __('sync.new_rows') }} |
{{ __('sync.updated_rows') }} |
{{ __('sync.deleted') }} |
@foreach ($pending as $table => $p)
| {{ $table }} |
{{ number_format($p['new'] ?? 0) }} |
{{ number_format($p['updated'] ?? 0) }} |
{{ number_format($p['deleted']) }} |
@endforeach
@endif