summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-23 02:30:52 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-23 02:30:52 +0900
commit633ab4ef005948cf5ebae3481472b89b10536079 (patch)
tree6b43d6a661841db2bd1f52063a449dff8b5d6487 /src/web/app/common/scripts
parentClean up (diff)
downloadsharkey-633ab4ef005948cf5ebae3481472b89b10536079.tar.gz
sharkey-633ab4ef005948cf5ebae3481472b89b10536079.tar.bz2
sharkey-633ab4ef005948cf5ebae3481472b89b10536079.zip
:v:
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/check-for-update.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/web/app/common/scripts/check-for-update.ts b/src/web/app/common/scripts/check-for-update.ts
index 0b58c0a674..0855676a42 100644
--- a/src/web/app/common/scripts/check-for-update.ts
+++ b/src/web/app/common/scripts/check-for-update.ts
@@ -1,11 +1,10 @@
import MiOS from '../mios';
-
-declare const _VERSION_: string;
+import { version } from '../../config';
export default async function(mios: MiOS) {
const meta = await mios.getMeta();
- if (meta.version != _VERSION_) {
+ if (meta.version != version) {
localStorage.setItem('should-refresh', 'true');
// Clear cache (serive worker)
@@ -19,6 +18,6 @@ export default async function(mios: MiOS) {
console.error(e);
}
- alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', _VERSION_));
+ alert('%i18n:common.update-available%'.replace('{newer}', meta.version).replace('{current}', version));
}
}