Rebranding features #636

Merged
Kieran merged 9 commits from mmalmi/snort:main into main 2023-09-27 10:35:59 +00:00
Showing only changes of commit d1085410ec - Show all commits

View File

@ -86,6 +86,7 @@ export class MultiAccountStore extends ExternalStore<LoginSession> {
};
v.extraChats ??= [];
}
this.#loadIrisKeyIfExists();
}
getSessions() {
@ -217,6 +218,23 @@ export class MultiAccountStore extends ExternalStore<LoginSession> {
return { ...s };
}
async #loadIrisKeyIfExists() {
try {
const irisKeyJSON = window.localStorage.getItem('iris.myKey');
if (irisKeyJSON) {
const irisKeyObj = JSON.parse(irisKeyJSON);
if (irisKeyObj.priv) {
const privateKey = await PinEncrypted.create(irisKeyObj.priv, '1234');
this.loginWithPrivateKey(privateKey);
window.localStorage.removeItem('iris.myKey');
}
}
} catch (e) {
console.error("Failed to load iris key", e);
}
}
#migrate() {
let didMigrate = false;