Skip to content
ReferenceVersion 6.0.2

Runtime and Lock Screen Stores ​

Runtime Store ​

useRuntimeGetters() exposes read-only refs. useRuntimeActions() returns setRuntimeState(key, value) and reloadContent(wait = 800, path?). These UI values live in memory.

FieldDefaultPurpose
globalSpinningfalseGlobal spinner.
globalDrawerValuefalseNarrow-screen menu drawer.
globalMainLayoutLoadtrueWhether the default layout mounts page content.
refreshingPathnullFull address of the page being refreshed.
layoutContentMaximizefalseWorkspace maximization.
layoutContentMaximizeVersion0Sequence number used to discard stale maximization callbacks. Managed internally.
layoutContentSpinningfalseLayout content spinner.
layoutContentMaximizeStyle{ zIndex: 999 }Maximized stacking order, background, and transition.

Call reloadContent with the current full path to remount that page. Omit the path to release all cached content instances. Only the newest timer is retained, and disposal clears it. Pages can call useSpinning().reload() for the active page or reloadWorkspace() for the full workspace. Use useMaximize to retain callbacks and exit handling. Global and content loading are independent.

ts
import { useRuntimeActions } from '@/store'

export function useGlobalLoading() {
  const { setRuntimeState } = useRuntimeActions()
  return async <T>(task: () => Promise<T>) => {
    setRuntimeState('globalSpinning', true)
    try {
      return await task()
    } finally {
      setRuntimeState('globalSpinning', false)
    }
  }
}

Global loading state is Boolean. Coordinate several concurrent requests in the caller before toggling it.

Lock Screen Store ​

useLockScreenGetters().getLocked reads the actual lock state. useLockScreenActions().setLocked(value) writes it. It defaults to false and uses the legacy Local Storage Boolean key isAppLockScreen with cross-tab sync.

setting.lockScreenSwitch controls the lock configuration dialog. The default lock component handles the local passphrase and unlock flow. A business action should open the configuration dialog so the user can set a passphrase before locking. The lock screen hides the local interface independently of server sessions and authorization.

Runtime implementation · Lock Screen implementation · Lock flow