mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-30 20:23:46 +02:00
add destructive variant to alert dialogs for destructive actions
This commit is contained in:
@@ -287,7 +287,8 @@ export function useAvatarDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.avatar.actions.block')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: (id) => {
|
||||
avatarModerationRequest
|
||||
@@ -369,7 +370,8 @@ export function useAvatarDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.avatar.actions.delete')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: (id) => {
|
||||
avatarRequest
|
||||
@@ -399,7 +401,8 @@ export function useAvatarDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.avatar.actions.delete_impostor')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: (id) => {
|
||||
avatarRequest
|
||||
@@ -432,7 +435,8 @@ export function useAvatarDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.avatar.actions.regenerate_impostor')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: (id) => {
|
||||
avatarRequest
|
||||
|
||||
@@ -770,7 +770,8 @@
|
||||
const dashboardId = String(dashboardKey || '').replace(DASHBOARD_NAV_KEY_PREFIX, '');
|
||||
const { ok } = await modalStore.confirm({
|
||||
title: t('dashboard.confirmations.delete_title'),
|
||||
description: t('dashboard.confirmations.delete_description')
|
||||
description: t('dashboard.confirmations.delete_description'),
|
||||
destructive: true
|
||||
});
|
||||
if (!ok) {
|
||||
return;
|
||||
|
||||
@@ -561,7 +561,8 @@
|
||||
modalStore
|
||||
.confirm({
|
||||
description: t('confirm.delete_post'),
|
||||
title: t('confirm.title')
|
||||
title: t('confirm.title'),
|
||||
destructive: true
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
|
||||
@@ -84,7 +84,8 @@ export function useGroupDialogCommands(
|
||||
'Block Group': {
|
||||
confirm: () => ({
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.block_group')
|
||||
description: t('confirm.block_group'),
|
||||
destructive: true
|
||||
}),
|
||||
handler: (id) => {
|
||||
groupRequest.blockGroup({ groupId: id }).then((args) => {
|
||||
|
||||
@@ -486,7 +486,8 @@ export function useUserDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.user.actions.moderation_block')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: async (userId) => {
|
||||
const args =
|
||||
@@ -518,7 +519,8 @@ export function useUserDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.user.actions.moderation_mute')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: async (userId) => {
|
||||
const args =
|
||||
@@ -554,7 +556,8 @@ export function useUserDialogCommands(
|
||||
command: t(
|
||||
'dialog.user.actions.moderation_disable_avatar_interaction'
|
||||
)
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: async (userId) => {
|
||||
const args =
|
||||
@@ -590,7 +593,8 @@ export function useUserDialogCommands(
|
||||
command: t(
|
||||
'dialog.user.actions.moderation_disable_chatbox'
|
||||
)
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: async (userId) => {
|
||||
const args =
|
||||
@@ -622,7 +626,8 @@ export function useUserDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.user.actions.unfriend')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: async (userId) => {
|
||||
const args = await friendRequest.deleteFriend(
|
||||
|
||||
@@ -528,7 +528,8 @@ export function useWorldDialogCommands(
|
||||
title: t('confirm.title'),
|
||||
description: t('confirm.command_question', {
|
||||
command: t('dialog.world.actions.delete')
|
||||
})
|
||||
}),
|
||||
destructive: true
|
||||
}),
|
||||
handler: (id) => {
|
||||
worldRequest.deleteWorld({ worldId: id }).then((args) => {
|
||||
|
||||
Reference in New Issue
Block a user