From 0dc30e730d5db33458f0725be7fa3cc3b4585fff Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 9 Oct 2022 20:41:42 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3,=20=D1=83=D0=BB=D1=83=D1=87=D1=88?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Api/Api.vue | 14 +------------- client/components/Search/Search.vue | 2 +- client/store/root.js | 4 ---- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/client/components/Api/Api.vue b/client/components/Api/Api.vue index 129bfd4..3efa035 100644 --- a/client/components/Api/Api.vue +++ b/client/components/Api/Api.vue @@ -92,16 +92,8 @@ class Api { async updateConfig() { try { const config = await this.getConfig(); + config.webAppVersion = packageJson.version; this.commit('setConfig', config); - - //проверим на новую версию, обновимся при необходимости - if (this.config.version) { - if (this.config.version != packageJson.version && Date.now() - this.lastReloadTime > 15*1000) { - this.commit('setLastReloadTime', Date.now());//на всякий случай, чтобы исключить зацикливание в reload - - document.location.reload(); - } - } } catch (e) { this.$root.stdDialog.alert(e.message, 'Ошибка'); } @@ -111,10 +103,6 @@ class Api { return this.$store.state.config; } - get lastReloadTime() { - return this.$store.state.lastReloadTime; - } - get settings() { return this.$store.state.settings; } diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index 3fcbf81..20214f2 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -455,7 +455,7 @@ class Search { const collection = this.config.dbConfig.inpxInfo.collection.split('\n'); this.collection = collection[0].trim(); - this.projectName = `${this.config.name} v${this.config.version}`; + this.projectName = `${this.config.name} v${this.config.webAppVersion}`; this.$root.setAppTitle(`Коллекция ${this.collection}`); } diff --git a/client/store/root.js b/client/store/root.js index c7c2a06..521060e 100644 --- a/client/store/root.js +++ b/client/store/root.js @@ -1,7 +1,6 @@ // initial state const state = { config: {}, - lastReloadTime: 0, settings: { accessToken: '', limit: 20, @@ -27,9 +26,6 @@ const mutations = { setConfig(state, value) { state.config = value; }, - setLastReloadTime(state, value) { - state.lastReloadTime = value; - }, setSettings(state, value) { state.settings = Object.assign({}, state.settings, value); },