From a0b0770adf1773f815c45d8d0ec0e30a41be45b2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 21 Jun 2018 01:58:47 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=83=80=E3=82=A4=E3=82=A2?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=92HTML=E3=81=A7=E6=8F=8F=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja.yml | 1 + .../app/common/scripts/check-for-update.ts | 9 +- .../app/desktop/views/pages/user/user.vue | 4 +- src/client/app/mobile/api/dialog.ts | 19 +- src/client/app/mobile/script.ts | 2 +- .../app/mobile/views/components/dialog.vue | 171 ++++++++++++++++++ 6 files changed, 199 insertions(+), 7 deletions(-) create mode 100644 src/client/app/mobile/views/components/dialog.vue diff --git a/locales/ja.yml b/locales/ja.yml index 436a97f1e..052dd5997 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -50,6 +50,7 @@ common: delete: "削除" loading: "読み込み中" ok: "わかった" + update-available-title: "更新があります" update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。" my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。" i-like-sushi: "私は(プリンよりむしろ)寿司が好き" diff --git a/src/client/app/common/scripts/check-for-update.ts b/src/client/app/common/scripts/check-for-update.ts index b5ba6916d..e2d5b7923 100644 --- a/src/client/app/common/scripts/check-for-update.ts +++ b/src/client/app/common/scripts/check-for-update.ts @@ -23,11 +23,18 @@ export default async function(mios: MiOS, force = false, silent = false) { } if (!silent) { - alert('%i18n:common.update-available%'.replace('{newer}', newer).replace('{current}', current)); + mios.apis.dialog({ + title: '%i18n:common.update-available-title%', + text: '%i18n:common.update-available%'.replace('{newer}', newer).replace('{current}', current) + }); } return newer; } else { + mios.apis.dialog({ + title: '%i18n:common.update-available-title%', + text: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + }); return null; } } diff --git a/src/client/app/desktop/views/pages/user/user.vue b/src/client/app/desktop/views/pages/user/user.vue index 0e0d4f576..7f05c695a 100644 --- a/src/client/app/desktop/views/pages/user/user.vue +++ b/src/client/app/desktop/views/pages/user/user.vue @@ -1,8 +1,8 @@