ui/admin_sessions_state.svelte.ts

Reactive state for admin session overview.

Both the listing and the two revoke-all mutations flow through the shared AdminAccountsRpc adapter (list_sessions, session_revoke_all, token_revoke_all); the listing wraps the admin_session_list RPC method.

Holds one fetch AsyncSlot (list) plus two KeyedAsyncSlots keyed by account_id — revoke_sessions and revoke_tokens. Per-account concurrent revokes are independent (clicking row B does not abort row A) and per-row errors surface via revoke_sessions.error(account_id) / revoke_tokens.error(account_id).

view source

Declarations
#

2 declarations

AdminSessionsState
#

ui/admin_sessions_state.svelte.ts view source

import {AdminSessionsState} from '@fuzdev/fuz_app/ui/admin_sessions_state.svelte.js';

list

type AsyncSlot<void, string>

readonly

revoke_sessions

type KeyedAsyncSlot<Branded, void, string>

readonly

revoke_tokens

type KeyedAsyncSlot<Branded, void, string>

readonly

sessions

type AdminSessionJson[]

$state.raw

active_count

type number

readonly $derived

constructor

type new (options: AdminSessionsStateOptions): AdminSessionsState

options

fetch

type (): Promise<void>

returns Promise<void>

submit_revoke_sessions

type (account_id: Branded<string, "Uuid">): Promise<void>

account_id

type Branded
returns Promise<void>

submit_revoke_tokens

type (account_id: Branded<string, "Uuid">): Promise<void>

account_id

type Branded
returns Promise<void>

AdminSessionsStateOptions
#

ui/admin_sessions_state.svelte.ts view source

AdminSessionsStateOptions import type {AdminSessionsStateOptions} from '@fuzdev/fuz_app/ui/admin_sessions_state.svelte.js';

Options for AdminSessionsState.

The RPC adapter drives every operation (listing + the two revoke-all mutations).

get_rpc

Reactive accessor for the RPC adapter. Mirrors AdminAccountsStateOptions.get_rpc so a single adapter instance backs both states without tripping Svelte's state_referenced_locally warning.

type (): AdminAccountsRpc

Depends on
#

Imported by
#