@php use App\Finance\FinanceCopy; use App\Support\Workspace\WorkspacePulse; $pulsePanels = collect([$onlineHref, $turnsHref, $invoicesHref])->filter()->count(); $cardCount = count($cards); @endphp

{{ __('dashboard.Overview') }}

{{ $hello }}

{{ $workspace ? __('dashboard.What moved across people, Lab chat, and billing.') : __('dashboard.Your Lab, pack, and sign-in in one place.') }}

{{ __('dashboard.Open Lab') }} @if ($peopleHref) {{ __('dashboard.People') }} @endif
@if ($cards !== [])
$cardCount !== 4, 'xl:grid-cols-4' => $cardCount === 4, ])> @foreach ($cards as $card) @if (filled($card['href'])) @else @endif @endforeach
@endif

{{ __('dashboard.Latest chat') }}

@if ($chats->isEmpty())

{{ __('dashboard.No Lab chat yet.') }}

@else
@foreach ($chats as $message) @php $project = $message->project; $fromLab = $message->role === 'assistant'; $href = $project ? ($workspace ? route('dashboard.lab.show', $project) : route('lab.show', $project)) : $chatHref; @endphp $fromLab, 'hover:bg-krikkit-soft' => ! $fromLab, ]) > @if ($fromLab) @else @endif

{{ WorkspacePulse::speaker($message) }} {{ $project?->title ?: __('dashboard.Untitled') }}

{{ WorkspacePulse::snippet($message->content) }}

@endforeach
@endif
@if ($workspace)

{{ __('dashboard.Latest people') }}

@if ($peopleHref) {{ __('dashboard.View all') }} @endif
@if ($people->isEmpty())

{{ __('dashboard.No people yet.') }}

@else @endif @else

{{ __('dashboard.Profile') }}

{{ __('dashboard.Name, password, and two-factor live under Profile.') }}

{{ __('dashboard.Profile') }} {{ __('dashboard.Password') }} {{ __('dashboard.Two-factor') }}
@endif
@if ($pulsePanels > 0)
$pulsePanels === 2, 'lg:grid-cols-3' => $pulsePanels >= 3, ])> @if ($onlineHref)

{{ __('dashboard.Signed in') }}

{{ __('dashboard.View all') }}
@if ($online->isEmpty())

{{ __('dashboard.Nobody is signed in.') }}

@else @endif
@endif @if ($turnsHref)

{{ __('dashboard.Needs a look') }}

{{ __('dashboard.View all') }}
@if ($flagged->isEmpty())

{{ __('dashboard.All turns look fine.') }}

@else
@foreach ($flagged as $row) @php $message = $row['message']; $project = $message->project; $kind = $row['kind']; $status = \App\Lab\LabTurnHealth::statusLabel($message, $kind); $href = $project ? route('dashboard.lab.show', $project) : $turnsHref; @endphp

{{ $project?->title ?: __('dashboard.Untitled') }}

{{ $status }}

{{ $project?->user?->name ?: __('dashboard.Unassigned') }} · {{ $message->updated_at?->diffForHumans(short: true) }}

@endforeach
@endif
@endif @if ($invoicesHref)

{{ __('dashboard.Recent invoices') }}

{{ __('dashboard.View all') }}
@if ($invoices->isEmpty())

{{ __('dashboard.No invoices yet.') }}

@else @endif
@endif
@endif

{{ $workspace ? __('dashboard.Recent projects') : __('dashboard.Your projects') }}

@if ($projectsHref) {{ __('dashboard.View all') }} @elseif (! $workspace) {{ __('dashboard.Open Lab') }} @endif
@if ($projects->isEmpty())

{{ $workspace ? __('dashboard.No Lab projects yet.') : __('dashboard.No projects yet. Open Lab to start one.') }}

@else @endif
@if ($subscriptionsHref)

{{ __('dashboard.Subscriptions') }}

{{ __('dashboard.View all') }}
@if ($subscriptions->isEmpty())

{{ __('dashboard.No subscriptions yet.') }}

@else @endif
@elseif ($ownPack)

{{ __('dashboard.Your pack') }}

{{ __('dashboard.Your current plan.') }}

{{ __('dashboard.Pack') }}

{{ $ownPack['title'] }}

{{ __('dashboard.This period') }}

{{ $ownPack['remaining'] }}

{{ $ownPack['hint'] }}

{{ __('dashboard.Two-factor') }}

{{ $ownPack['twoFactor'] }}

@endif