Files
vps-tracker/apps/web/src/lib/space.ts
T
DenozordecandCursor e360efb885
Docker / build (push) Failing after 20s
feat(spaces): добавить изолированные пространства и multi-user
Полная изоляция данных по space, Share (ACL) и Assign, switcher и участники в UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 15:42:54 +07:00

36 lines
595 B
TypeScript

const STORAGE_KEY = 'vps_space_id'
export type SpaceDto = {
id: string
name: string
slug: string
kind: string
ownerUserId: string | null
createdAt: string
role?: string
}
export function getStoredSpaceId(): string | null {
try {
return localStorage.getItem(STORAGE_KEY)
} catch {
return null
}
}
export function setStoredSpaceId(id: string): void {
try {
localStorage.setItem(STORAGE_KEY, id)
} catch {
/* ignore */
}
}
export function clearStoredSpaceId(): void {
try {
localStorage.removeItem(STORAGE_KEY)
} catch {
/* ignore */
}
}