mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
merge
This commit is contained in:
commit
aa1a47a34e
108 changed files with 1590 additions and 1240 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue