This commit is contained in:
Peter Maquiran
2023-01-24 15:56:47 +01:00
parent 0748612054
commit fbd50137f3
153 changed files with 5997 additions and 953 deletions
+22
View File
@@ -10,6 +10,12 @@ export class LocalstoreService {
private prefix = environment.version.lastCommitNumber+"-";
private previewPrefix = 'v17-';
callbacks: {[key: string]: {
path: string,
funx: Function,
id: string
}} = {}
constructor() {
const key = SHA1('version').toString()
@@ -68,6 +74,22 @@ export class LocalstoreService {
localStorage.removeItem(keyName)
}
private async change(changeType: 'set' | 'delete') {
const currentPath = window.location.pathname
for (const [key, value] of Object.entries(this.callbacks)) {
if(currentPath.startsWith(value.path)) {}
const dontRepeat = await value.funx({event:{type: changeType}})
if(dontRepeat) {
delete this.callbacks[key]
}
}
}
listener() {}
}
export const localstoreService = new LocalstoreService()