From f415b2ebbe0f5936dd1e655f75df558bc0fdf5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=A3=E3=81=A1=E3=82=83=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:15:49 +0900 Subject: [PATCH] =?UTF-8?q?spec(frontend):=20=E3=83=81=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=82=A2=E3=83=AB=E3=81=ABBot=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=81=E3=83=81?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E3=83=88=E3=83=AA=E3=82=A2=E3=83=AB=E3=82=92?= =?UTF-8?q?=E3=82=B9=E3=82=AD=E3=83=83=E3=83=97=E4=B8=8D=E5=8F=AF=E3=81=AB?= =?UTF-8?q?=20(MisskeyIO#689)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(frontend): チュートリアルにBotの設定を追加、チュートリアルをスキップ不可に * チュートリアルが特定の操作でスキップできてしまうのを修正 --------- Co-authored-by: CyberRex <26585194+CyberRex0@users.noreply.github.com> --- locales/en-US.yml | 2 +- locales/index.d.ts | 4 ++-- locales/ja-JP.yml | 2 +- locales/ja-KS.yml | 2 +- locales/ko-KR.yml | 2 +- packages/frontend/src/components/MkModalWindow.vue | 7 ++++++- packages/frontend/src/components/MkTutorialDialog.vue | 4 ++-- .../frontend/src/components/MkUserSetupDialog.vue | 11 +++++------ 8 files changed, 19 insertions(+), 15 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index aada78e00..c073e40c5 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1330,7 +1330,7 @@ _initialAccountSetting: pushNotificationDescription: "Enabling push notifications will allow you to receive notifications from {name} directly on your device." initialAccountSettingCompleted: "Profile setup complete!" haveFun: "Enjoy {name}!" - youCanContinueTutorial: "You can proceed to a tutorial on how to use {name} (Misskey) or you can exit the setup here and start using it immediately." + continueTutorial: "Now, let's proceed with a tutorial on how to use {name} (Misskey)." startTutorial: "Start Tutorial" skipAreYouSure: "Really skip profile setup?" laterAreYouSure: "Really do profile setup later?" diff --git a/locales/index.d.ts b/locales/index.d.ts index 4fda026bc..8a0ab9522 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -5344,9 +5344,9 @@ export interface Locale extends ILocale { */ "haveFun": ParameterizedString<"name">; /** - * このまま{name}(Misskey)の使い方についてのチュートリアルに進むこともできますが、ここで中断してすぐに使い始めることもできます。 + * このまま{name}(Misskey)の使い方についてのチュートリアルに進みます。 */ - "youCanContinueTutorial": ParameterizedString<"name">; + "continueTutorial": ParameterizedString<"name">; /** * チュートリアルを開始 */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ca73ef795..1be0bfd59 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1338,7 +1338,7 @@ _initialAccountSetting: pushNotificationDescription: "プッシュ通知を有効にすると{name}の通知をお使いのデバイスで受け取ることができます。" initialAccountSettingCompleted: "初期設定が完了しました!" haveFun: "{name}をお楽しみください!" - youCanContinueTutorial: "このまま{name}(Misskey)の使い方についてのチュートリアルに進むこともできますが、ここで中断してすぐに使い始めることもできます。" + continueTutorial: "このまま{name}(Misskey)の使い方についてのチュートリアルに進みます。" startTutorial: "チュートリアルを開始" skipAreYouSure: "初期設定をスキップしますか?" laterAreYouSure: "初期設定をあとでやり直しますか?" diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml index e6a23a34d..301520ff5 100644 --- a/locales/ja-KS.yml +++ b/locales/ja-KS.yml @@ -1275,7 +1275,7 @@ _initialAccountSetting: pushNotificationDescription: "プッシュ通知を有効にすると{name}の通知をあんたのデバイスで受け取れるで。" initialAccountSettingCompleted: "初期設定終わりや!" haveFun: "{name}、楽しんでな~" - youCanContinueTutorial: "こんまま{name}(Misskey)の使い方のチュートリアルにも行けるけど、ここでやめてすぐに使い始めてもええで。" + continueTutorial: "こんまま{name}(Misskey)の使い方のチュートリアルが始まるで。" startTutorial: "チュートリアルはじめる" skipAreYouSure: "初期設定飛ばすか?" laterAreYouSure: "初期設定あとでやり直すん?" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 8bc7a1940..9a95a656d 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1323,7 +1323,7 @@ _initialAccountSetting: pushNotificationDescription: "푸시 알림을 활성화하면 {name}의 알림을 나의 기기에서 받아볼 수 있게 됩니다." initialAccountSettingCompleted: "초기 설정을 모두 마쳤습니다!" haveFun: "{name}와 함께 즐거운 시간 보내세요!" - youCanContinueTutorial: "이대로 {name}(Misskey)의 사용법에 대해 튜토리얼을 진행할 수도 있지만, 여기서 중단하고 바로 시작할 수도 있습니다." + continueTutorial: "이대로 {name}(Misskey)의 사용법에 대해 튜토리얼을 진행합니다." startTutorial: "튜토리얼 시작" skipAreYouSure: "초기 설정을 중단하시겠습니까?" laterAreYouSure: "초기 설정을 나중에 진행하시겠습니까?" diff --git a/packages/frontend/src/components/MkModalWindow.vue b/packages/frontend/src/components/MkModalWindow.vue index d3657afa9..935461be9 100644 --- a/packages/frontend/src/components/MkModalWindow.vue +++ b/packages/frontend/src/components/MkModalWindow.vue @@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +
@@ -27,12 +27,16 @@ import MkModal from './MkModal.vue'; const props = withDefaults(defineProps<{ withOkButton: boolean; + withCloseButton: boolean; okButtonDisabled: boolean; + escKeyDisabled: boolean; width: number; height: number; }>(), { withOkButton: false, + withCloseButton: true, okButtonDisabled: false, + escKeyDisabled: false, width: 400, height: 500, }); @@ -60,6 +64,7 @@ const onBgClick = () => { const onKeydown = (evt) => { if (evt.which === 27) { // Esc + if (props.escKeyDisabled) return; evt.preventDefault(); evt.stopPropagation(); close(); diff --git a/packages/frontend/src/components/MkTutorialDialog.vue b/packages/frontend/src/components/MkTutorialDialog.vue index dd14a146f..b326ed922 100644 --- a/packages/frontend/src/components/MkTutorialDialog.vue +++ b/packages/frontend/src/components/MkTutorialDialog.vue @@ -8,7 +8,8 @@ SPDX-License-Identifier: AGPL-3.0-only ref="dialog" :width="600" :height="650" - @close="close(true)" + :withCloseButton="false" + :escKeyDisabled="true" @closed="emit('closed')" > @@ -35,7 +36,6 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts._initialTutorial._landing.title }}
{{ i18n.ts._initialTutorial._landing.description }}
{{ i18n.ts._initialTutorial.launchTutorial }} - {{ i18n.ts.close }}
diff --git a/packages/frontend/src/components/MkUserSetupDialog.vue b/packages/frontend/src/components/MkUserSetupDialog.vue index 5f4c1150a..9c95991a7 100644 --- a/packages/frontend/src/components/MkUserSetupDialog.vue +++ b/packages/frontend/src/components/MkUserSetupDialog.vue @@ -9,6 +9,8 @@ SPDX-License-Identifier: AGPL-3.0-only :width="500" :height="550" data-cy-user-setup + :withCloseButton="false" + :escKeyDisabled="true" @closed="emit('closed')" > @@ -38,7 +40,6 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts._initialAccountSetting.accountCreated }}
{{ i18n.ts._initialAccountSetting.letsStartAccountSetup }}
{{ i18n.ts._initialAccountSetting.profileSetting }} - {{ i18n.ts.later }} @@ -109,13 +110,11 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts._initialAccountSetting.initialAccountSettingCompleted }}
-
{{ i18n.tsx._initialAccountSetting.youCanContinueTutorial({ name: instance.name ?? host }) }}
+
{{ i18n.tsx._initialAccountSetting.continueTutorial({ name: instance.name ?? host }) }}
+
- {{ i18n.ts._initialAccountSetting.startTutorial }} -
-
{{ i18n.ts.goBack }} - {{ i18n.ts.close }} + {{ i18n.ts._initialAccountSetting.startTutorial }}