{#if isInitialized} {#if $isAuthenticated && !$isConnected}
You're offline. Some features may be limited.
{#if $pendingSyncCount > 0}
{$pendingSyncCount} pending sync{$pendingSyncCount !== 1 ? 's' : ''}
{/if}
showServerCatalog.update((v) => !v)} class="ml-1 bg-white/20 hover:bg-white/30 px-2 py-0.5 rounded-full text-xs transition-colors" aria-pressed={$showServerCatalog} title={$lastCatalogSync ? `Catalog last synced ${new Date($lastCatalogSync).toLocaleString()}` : 'Catalog not yet synced'} > {$showServerCatalog ? 'Hide server media' : 'Show all server media'}
{/if} {#if routeOwnsLayout}
{@render children()}
{:else} {#if showGlobalHeader}
{/if}
{@render children()}
{/if}
{#if !routeOwnsLayout && (showBottomNav || showGlobalMiniPlayer)}
{/if}
showSleepTimerModal.set(false)} /> {:else}
{/if}