diff --git a/locales/index.d.ts b/locales/index.d.ts index f125a9fa53..d8b60cc941 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -11637,6 +11637,10 @@ export interface Locale extends ILocale { * Pending follow requests */ "pendingFollowRequests": string; + /** + * Are you sure you want to cancel your follow request? + */ + "undoFollowRequestConfirm": string; /** * Show quotes */ diff --git a/packages/frontend/src/components/MkFollowButton.vue b/packages/frontend/src/components/MkFollowButton.vue index 23d039bc58..2fadd39afc 100644 --- a/packages/frontend/src/components/MkFollowButton.vue +++ b/packages/frontend/src/components/MkFollowButton.vue @@ -119,6 +119,16 @@ async function onClick() { } if (hasPendingFollowRequestFromYou.value) { + const { canceled } = await os.confirm({ + type: 'question', + text: i18n.ts.undoFollowRequestConfirm, + }); + + if (canceled) { + wait.value = false; + return; + } + await misskeyApi('following/requests/cancel', { userId: props.user.id, }); diff --git a/sharkey-locales/en-US.yml b/sharkey-locales/en-US.yml index 7be3022f24..a164f6731c 100644 --- a/sharkey-locales/en-US.yml +++ b/sharkey-locales/en-US.yml @@ -161,6 +161,7 @@ severAllFollowRelations: "Break following relationships" severAllFollowRelationsConfirm: "Really break all follow relationships? This is irreversible! This will break {followingCount} following and {followersCount} follower relations on {instanceName}!" severAllFollowRelationsQueued: "Severing all follow relations with {host} queued." pendingFollowRequests: "Pending follow requests" +undoFollowRequestConfirm: "Are you sure you want to cancel your follow request?" showQuotes: "Show quotes" showReplies: "Show replies" showNonPublicNotes: "Show non-public"