@php $statusChip = [ 'connected' => ['Connected', 'text-green-400', 'bg-green-400'], 'full' => ['At plan limit', 'text-amber-400', 'bg-amber-400'], 'empty' => ['Not connected', 'text-slate-500', 'bg-slate-600'], 'locked' => ['Not in your plan', 'text-slate-600', 'bg-slate-700'], ]; @endphp
{{-- Title row --}}

Platforms

Where your content publishes to. @if ($syncedAt) Synced from your desktop app {{ $syncedAt->diffForHumans() }}. @endif

Connect account
{{-- KPI strip --}}
{{ $connected }}
Connected accounts
{{ $inUse }} of {{ $available }}
Platforms in use
{{ $free }}
Account seats free
{{ $syncedAt?->diffForHumans() ?? 'Not yet' }}
Last sync
{{-- Distribution --}} @if ($connected > 0)
Account distribution {{ $connected }} {{ \Illuminate\Support\Str::plural('account', $connected) }}
@foreach ($platforms as $p) @if ($p['connected'] > 0)
@endif @endforeach
@foreach ($platforms as $p) @if ($p['connected'] > 0) {{ $p['label'] }} {{ $p['connected'] }} · {{ $p['share'] }}% @endif @endforeach
@endif {{-- Platform cards --}}
@foreach ($platforms as $p) @php([$sLabel, $sText, $sDot] = $statusChip[$p['status']])
{{ $p['short'] }}
{{ $p['label'] }}
{{ $sLabel }}
{{ $p['connected'] }}@if($p['cap'] !== null && $p['cap'] > 0) / {{ $p['cap'] }} @elseif($p['cap'] === null) / ∞ @endif
{{-- Capacity --}}
@php($pct = $p['cap'] === null ? ($p['connected'] > 0 ? 8 : 0) : ($p['cap'] > 0 ? min(100, round($p['connected'] / $p['cap'] * 100)) : 0))
@if ($p['status'] === 'locked') Upgrade to unlock @elseif ($p['cap'] === null) Unlimited accounts @elseif ($p['status'] === 'full') All seats used @else {{ $p['cap'] - $p['connected'] }} {{ \Illuminate\Support\Str::plural('seat', $p['cap'] - $p['connected']) }} free @endif @if ($p['connected'] > 0){{ $p['share'] }}% of accounts@endif
@if ($p['status'] === 'locked') Upgrade plan @elseif ($p['status'] === 'full') Manage Add seats @else Manage Connect @endif
@endforeach

Accounts are connected in the CC Publisher desktop app and reflected here after each sync.