{{-- theme-admin no longer swaps the palette. It used to load a complete dark set — its own surfaces, its own orange, its own status triad — which made the console a second product and forced every shared component to work in two worlds. It now carries density only: smaller type, tighter rows, tighter corners. Colour comes from one place. --}} @php $release = App\Services\Deployment\Release::current(); // Seeds the page-wide update watcher below. Computed here, once, for // every console page — not only Settings — because the thing being // watched restarts the containers serving whichever page the // operator happens to have open, so the watcher (and its overlay) // must already exist before that happens, wherever they are. $updateChannel = app(App\Services\Deployment\UpdateChannel::class); $updateState = $updateChannel->state(); $updateStep = $updateState['phase'] !== null ? __('admin_settings.update_step', ['step' => $updateState['phase']]) : null; // Only once a run has actually started, not while merely queued — // otherwise this is the PREVIOUS run's leftovers, read on every page // load whether or not anything is running at all. $updateRunningSince = $updateState['started_at'] !== null ? __('admin_settings.update_since', ['when' => $updateState['started_at']->diffForHumans()]) : null; $updateLog = $updateState['started_at'] !== null ? $updateChannel->lastLog() : null; @endphp
@auth
@csrf
@endauth
{{ $slot }}
{{-- Maintenance overlay: the console during a deployment. Bound HERE, once, rather than on the settings page's own update card — this is the only binding of updateWatcher (resources/js/app.js) in the app, so it is already in the browser, and stays in the browser, no matter which console page the deploy catches the operator on. Reported bug: the settings card flickered and vanished mid-run, and every OTHER console page showed nothing at all, because nothing was watching there. Client-side is the only way this can work: the containers go down mid-run, which is exactly when the view has to stay visible — a server-rendered maintenance route cannot answer while it is itself offline. No close affordance: the run does not stop because an operator closed a dialog, so offering one would be a lie. It clears itself — window.location.reload() from inside updateWatcher — the moment the build commit changes or `running` goes false, landing the operator back on the very page they were on. --}} @livewire('wire-elements-modal') @livewireScripts