1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00
This commit is contained in:
Andrew Simachev 2024-03-11 17:33:24 +01:00
commit aa1a47a34e
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
108 changed files with 1590 additions and 1240 deletions

View file

@ -17,7 +17,6 @@ const KEYTAR_SERVICE = 'Anytype';
class Api {
account = null;
phrase = '';
isPinChecked = false;
appOnLoad (win) {
@ -35,7 +34,6 @@ class Api {
isChild: win.isChild,
route: win.route,
account: this.account,
phrase: this.phrase,
isPinChecked: this.isPinChecked,
languages: win.webContents.session.availableSpellCheckerLanguages,
css: String(css || ''),
@ -104,16 +102,12 @@ class Api {
keytarSet (win, key, value) {
if (key && value) {
this.phrase = value;
keytar.setPassword(KEYTAR_SERVICE, key, value);
};
};
keytarGet (win, key) {
keytar.getPassword(KEYTAR_SERVICE, key).then(value => {
this.phrase = value;
Util.send(win, 'keytarGet', key, value);
});
async keytarGet (win, key) {
return await keytar.getPassword(KEYTAR_SERVICE, key);
};
keytarDelete (win, key) {