localstorage
This commit is contained in:
parent
2b4d5a0543
commit
092cef08dd
@ -6,7 +6,7 @@ import { HttpSpacePrimitives } from "@silverbulletmd/common/spaces/http_space_pr
|
|||||||
safeRun(async () => {
|
safeRun(async () => {
|
||||||
// let localSpace = new Space(new IndexedDBSpacePrimitives("pages"), true);
|
// let localSpace = new Space(new IndexedDBSpacePrimitives("pages"), true);
|
||||||
// localSpace.watch();
|
// localSpace.watch();
|
||||||
let token: string | undefined = sessionStorage.getItem("token") || undefined;
|
let token: string | undefined = localStorage.getItem("token") || undefined;
|
||||||
|
|
||||||
let httpPrimitives = new HttpSpacePrimitives("", token);
|
let httpPrimitives = new HttpSpacePrimitives("", token);
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -20,7 +20,7 @@ safeRun(async () => {
|
|||||||
alert("Sorry, that's it then");
|
alert("Sorry, that's it then");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sessionStorage.setItem("token", token!);
|
localStorage.setItem("token", token!);
|
||||||
httpPrimitives = new HttpSpacePrimitives("", token);
|
httpPrimitives = new HttpSpacePrimitives("", token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user