Skip to content

Secure Shell

  • File: src/routes/secure/+layout.svelte

Overview

The authenticated app chrome ("secure shell") rendered around every logged-in page. It combines the global Topbar, an optional NotificationBanner, the global Chat drawer, and the incoming-call Notification systems.

Structure

svelte
{#if userSession?.userInfo}
  <Drawer hidden={!appStore.showChat} placement="right" size="xl">
    <Chat />
  </Drawer>
  <Topbar onsignout={...} />
  {#if userSession.userInfo?.notice}
    <NotificationBanner message={...} onClick={markNotificationAsSeen} />
  {/if}
  {@render children()}
  <ChatNotification />
  <Notification />
{/if}

Guards

  • Not logged in → spinner.
  • !tosAcceptedgoto('/secure/terms').
  • Exactly at /secure → redirect to appStore.homePage (default dashboard).
  • domainError → branded "No Connection" / "There's been a glitch" panels.

Sign out

  • Topbar dispatches onsignout → an AlertDialog ("Are you sure you want to sign out?") calls authService.logout().

Released under the MIT License.