upd: confirm dialog for undoing follow request

This commit is contained in:
Marie 2025-03-08 11:54:19 +00:00
parent 19fc0a9351
commit 91e15fafbf
3 changed files with 15 additions and 0 deletions

4
locales/index.d.ts vendored
View file

@ -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
*/

View file

@ -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,
});

View file

@ -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"