summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-13 06:06:18 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-13 06:06:18 +0900
commit3368fe855249f45bdf1e4c1e509d325d44e80fbe (patch)
tree63c8bc61fb645b1d730b05120ab5117c0fdeee29 /src/client
parentwip (diff)
downloadsharkey-3368fe855249f45bdf1e4c1e509d325d44e80fbe.tar.gz
sharkey-3368fe855249f45bdf1e4c1e509d325d44e80fbe.tar.bz2
sharkey-3368fe855249f45bdf1e4c1e509d325d44e80fbe.zip
wip
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/boot.js2
-rw-r--r--src/client/assets/404.js25
2 files changed, 2 insertions, 25 deletions
diff --git a/src/client/app/boot.js b/src/client/app/boot.js
index 0846e4bd55..ef828d9637 100644
--- a/src/client/app/boot.js
+++ b/src/client/app/boot.js
@@ -97,6 +97,8 @@
// Compare versions
if (meta.version != ver) {
+ localStorage.setItem('v', meta.version);
+
alert(
'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' +
'\n\n' +
diff --git a/src/client/assets/404.js b/src/client/assets/404.js
deleted file mode 100644
index 9e498fe7c2..0000000000
--- a/src/client/assets/404.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const yn = window.confirm(
- 'サーバー上に存在しないスクリプトがリクエストされました。お使いのMisskeyのバージョンが古いことが原因の可能性があります。Misskeyを更新しますか?\n\nA script that does not exist on the server was requested. It may be caused by an old version of Misskey you’re using. Do you want to delete the cache?');
-
-const langYn = window.confirm('また、言語を日本語に設定すると解決する場合があります。日本語に設定しますか?\n\nAlso, setting the language to Japanese may solve the problem. Would you like to set it to Japanese?');
-
-if (langYn) {
- localStorage.setItem('lang', 'ja');
-}
-
-if (yn) {
- // Clear cache (serive worker)
- try {
- navigator.serviceWorker.controller.postMessage('clear');
-
- navigator.serviceWorker.getRegistrations().then(registrations => {
- registrations.forEach(registration => registration.unregister());
- });
- } catch (e) {
- console.error(e);
- }
-
- localStorage.removeItem('v');
-
- location.reload(true);
-}