mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-04-13 09:44:40 +00:00
merge: Make confirm follow prompt not show up when cancelling a follow request (!941)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/941 Closes #822 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
commit
aa1691295b
3 changed files with 16 additions and 1 deletions
4
locales/index.d.ts
vendored
4
locales/index.d.ts
vendored
|
@ -11637,6 +11637,10 @@ export interface Locale extends ILocale {
|
||||||
* Pending follow requests
|
* Pending follow requests
|
||||||
*/
|
*/
|
||||||
"pendingFollowRequests": string;
|
"pendingFollowRequests": string;
|
||||||
|
/**
|
||||||
|
* Are you sure you want to cancel your follow request?
|
||||||
|
*/
|
||||||
|
"undoFollowRequestConfirm": string;
|
||||||
/**
|
/**
|
||||||
* Show quotes
|
* Show quotes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -106,7 +106,7 @@ async function onClick() {
|
||||||
userId: props.user.id,
|
userId: props.user.id,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (defaultStore.state.alwaysConfirmFollow) {
|
if (defaultStore.state.alwaysConfirmFollow && !hasPendingFollowRequestFromYou.value) {
|
||||||
const { canceled } = await os.confirm({
|
const { canceled } = await os.confirm({
|
||||||
type: 'question',
|
type: 'question',
|
||||||
text: i18n.tsx.followConfirm({ name: props.user.name || props.user.username }),
|
text: i18n.tsx.followConfirm({ name: props.user.name || props.user.username }),
|
||||||
|
@ -119,6 +119,16 @@ async function onClick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasPendingFollowRequestFromYou.value) {
|
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', {
|
await misskeyApi('following/requests/cancel', {
|
||||||
userId: props.user.id,
|
userId: props.user.id,
|
||||||
});
|
});
|
||||||
|
|
|
@ -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}!"
|
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."
|
severAllFollowRelationsQueued: "Severing all follow relations with {host} queued."
|
||||||
pendingFollowRequests: "Pending follow requests"
|
pendingFollowRequests: "Pending follow requests"
|
||||||
|
undoFollowRequestConfirm: "Are you sure you want to cancel your follow request?"
|
||||||
showQuotes: "Show quotes"
|
showQuotes: "Show quotes"
|
||||||
showReplies: "Show replies"
|
showReplies: "Show replies"
|
||||||
showNonPublicNotes: "Show non-public"
|
showNonPublicNotes: "Show non-public"
|
||||||
|
|
Loading…
Add table
Reference in a new issue