Better pass handling through links

This commit is contained in:
tyuXX 2026-11-15 14:44:30 +03:00
parent 56ae4460b0
commit e320f15ff9
3 changed files with 35 additions and 3 deletions

View file

@ -16,6 +16,16 @@ export interface ClientSettings {
const TOKEN_KEY = "spacegaem_proto_token";
const SETTINGS_KEY = "spacegaem_proto_settings";
const SERVER_JOIN_KEY = "spacegaem_server_join_ok";
export function getServerJoinOk(): boolean {
return sessionStorage.getItem(SERVER_JOIN_KEY) === "1";
}
export function setServerJoinOk(ok: boolean): void {
if (ok) sessionStorage.setItem(SERVER_JOIN_KEY, "1");
else sessionStorage.removeItem(SERVER_JOIN_KEY);
}
export function getToken(): string | null {
return localStorage.getItem(TOKEN_KEY);