matrix-dimension/web/app/shared/SessionStorage.ts

29 lines
805 B
TypeScript
Raw Normal View History

import { FE_Integration } from "./models/integration";
2017-12-22 23:08:10 -05:00
export class SessionStorage {
private static _scalarToken: string;
public static get scalarToken(): string {
if (this._scalarToken) return this._scalarToken;
this.scalarToken = localStorage.getItem("dimension_scalar_token");
return this._scalarToken;
}
public static set scalarToken(val: string) {
this._scalarToken = val;
if (val) {
localStorage.setItem("dimension_scalar_token", val);
}
}
2017-12-22 23:08:10 -05:00
public static userId: string;
public static roomId: string;
2017-12-23 20:47:41 -05:00
public static isAdmin: boolean;
public static editIntegration: FE_Integration;
2017-12-22 23:42:43 -05:00
public static editIntegrationId: string;
2017-12-23 00:17:09 -05:00
public static editsRequested = 0;
2017-12-22 23:08:10 -05:00
private constructor() {
}
}