Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marius-wieschollek/passwords-webextension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/js/App
diff options
context:
space:
mode:
authorMarius David Wieschollek <passwords.public@mdns.eu>2020-01-09 22:10:49 +0300
committerMarius David Wieschollek <passwords.public@mdns.eu>2020-01-09 22:10:49 +0300
commit605d2f0a3cef338077e1fa895de46345194bec2b (patch)
treeefa5eba2bb2946252a718a7c7264928eb152214f /src/js/App
parent591d1ccd0818b7a6a6075998d39e2b9c437ace1e (diff)
Save popup status and provide initial status
Diffstat (limited to 'src/js/App')
-rw-r--r--src/js/App/Background.js6
-rw-r--r--src/js/App/Popup.js11
2 files changed, 13 insertions, 4 deletions
diff --git a/src/js/App/Background.js b/src/js/App/Background.js
index 0caa10e..0f1c741 100644
--- a/src/js/App/Background.js
+++ b/src/js/App/Background.js
@@ -7,6 +7,7 @@ import ConverterManager from '@js/Manager/ConverterManager';
import ControllerManager from '@js/Manager/ControllerManager';
import RecommendationManager from '@js/Manager/RecommendationManager';
import MessageService from '@js/Services/MessageService';
+import TabManager from '@js/Manager/TabManager';
class Background {
async init() {
@@ -15,12 +16,13 @@ class Background {
try {
await SystemService.waitReady();
await UpgradeManager.run();
- MessageService.init();
+ await MessageService.init();
ControllerManager.init();
ConverterManager.init();
SearchManager.init();
- await ServerManager.init();
+ TabManager.init();
RecommendationManager.init();
+ await ServerManager.init();
} catch(e) {
ErrorManager.logError(e);
}
diff --git a/src/js/App/Popup.js b/src/js/App/Popup.js
index 0ad1d77..c6945c1 100644
--- a/src/js/App/Popup.js
+++ b/src/js/App/Popup.js
@@ -22,15 +22,22 @@ class Popup {
try {
await SystemService.waitReady();
SystemService.connect();
- MessageService.init(true, 'background');
+ await MessageService.init(true, 'background');
ConverterManager.init();
let acWorker = AuthorisationClient;
- this._app = new Vue(App);
+ this._initVue();
} catch(e) {
ErrorManager.logError(e);
}
}
+
+ async _initVue() {
+ let reply = await MessageService.send({type: 'popup.status'}),
+ status = reply.getPayload();
+
+ this._app = new Vue({propsData: status, ...App});
+ }
}
export default new Popup(); \ No newline at end of file