Adds settings options and localUser functions
This commit is contained in:
@@ -25,6 +25,7 @@ const code = "code";
|
||||
const cameraSetup = "cameraSetup";
|
||||
const cacheAPIIndex = "workavdenture-cache";
|
||||
const userProperties = "user-properties";
|
||||
const privacySettings = "privacySettings";
|
||||
|
||||
class LocalUserStore {
|
||||
saveUser(localUser: LocalUser) {
|
||||
@@ -231,6 +232,14 @@ class LocalUserStore {
|
||||
return cameraSetupValues != undefined ? JSON.parse(cameraSetupValues) : undefined;
|
||||
}
|
||||
|
||||
setPrivacySettings(option: string) {
|
||||
localStorage.setItem(privacySettings, option)
|
||||
}
|
||||
|
||||
getPrivacySettings() {
|
||||
return localStorage.getItem(privacySettings);
|
||||
}
|
||||
|
||||
getAllUserProperties(): Map<string, unknown> {
|
||||
const result = new Map<string, string>();
|
||||
for (let i = 0; i < localStorage.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user