From 78921387b3a2db717ac61fcdaafa248a7f5452ae Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 4 Feb 2023 12:46:48 -0800 Subject: [PATCH] feat: :sparkles: dialog to remove follower co-authored-by: atsu1125 --- locales/en-US.yml | 1 + locales/ja-JP.yml | 1 + packages/client/src/scripts/get-user-menu.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/locales/en-US.yml b/locales/en-US.yml index cc741bd602..d236419020 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -816,6 +816,7 @@ lastCommunication: "Last communication" resolved: "Resolved" unresolved: "Unresolved" breakFollow: "Remove follower" +breakFollowConfirm: "Are you sure want to remove follower?" itsOn: "Enabled" itsOff: "Disabled" emailRequiredForSignup: "Require email address for sign-up" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 867331cc94..5372c8e3d0 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -816,6 +816,7 @@ lastCommunication: "直近の通信" resolved: "解決済み" unresolved: "未解決" breakFollow: "フォロワーを解除" +breakFollowConfirm: "フォロワー解除しますか?" itsOn: "オンになっています" itsOff: "オフになっています" emailRequiredForSignup: "アカウント登録にメールアドレスを必須にする" diff --git a/packages/client/src/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index 1d99548e46..9e357e92cc 100644 --- a/packages/client/src/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -192,6 +192,8 @@ export function getUserMenu(user, router: Router = mainRouter) { } async function invalidateFollow() { + if (!(await getConfirmed(i18n.ts.breakFollowConfirm))) return; + os.apiWithDialog("following/invalidate", { userId: user.id, }).then(() => {