Better pass handling through links
This commit is contained in:
parent
56ae4460b0
commit
e320f15ff9
3 changed files with 35 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue