mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-25 09:43:49 +02:00
replace ElMessageBox(alert, confirm) with alert dialog
This commit is contained in:
@@ -559,6 +559,7 @@
|
||||
useFavoriteStore,
|
||||
useGalleryStore,
|
||||
useGameStore,
|
||||
useModalStore,
|
||||
useUserStore
|
||||
} from '../../../stores';
|
||||
import {
|
||||
@@ -591,6 +592,7 @@
|
||||
const { deleteVRChatCache } = useGameStore();
|
||||
const { showFullscreenImageDialog } = useGalleryStore();
|
||||
const { isDarkMode } = storeToRefs(useAppearanceSettingsStore());
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -752,15 +754,13 @@
|
||||
showFavoriteDialog('avatar', D.id);
|
||||
break;
|
||||
default:
|
||||
ElMessageBox.confirm(`Continue? ${command}`, 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action !== 'confirm') {
|
||||
return;
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
title: 'Confirm',
|
||||
description: `Continue? ${command}`
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
switch (command) {
|
||||
case 'Delete Favorite':
|
||||
favoriteRequest.deleteFavorite({
|
||||
@@ -897,8 +897,7 @@
|
||||
});
|
||||
break;
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1146,11 +1146,10 @@
|
||||
View,
|
||||
Warning
|
||||
} from '@element-plus/icons-vue';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { computed, nextTick, reactive, ref, watch } from 'vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { InputGroupField } from '@/components/ui/input-group';
|
||||
import { RefreshCcw } from 'lucide-vue-next';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
@@ -1176,6 +1175,14 @@
|
||||
userImage,
|
||||
userStatusClass
|
||||
} from '../../../shared/utils';
|
||||
import {
|
||||
useAppearanceSettingsStore,
|
||||
useGalleryStore,
|
||||
useGroupStore,
|
||||
useLocationStore,
|
||||
useModalStore,
|
||||
useUserStore
|
||||
} from '../../../stores';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -1183,13 +1190,6 @@
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger
|
||||
} from '../../ui/dropdown-menu';
|
||||
import {
|
||||
useAppearanceSettingsStore,
|
||||
useGalleryStore,
|
||||
useGroupStore,
|
||||
useLocationStore,
|
||||
useUserStore
|
||||
} from '../../../stores';
|
||||
import { formatJsonVars, getNextDialogIndex } from '../../../shared/utils/base/ui';
|
||||
import { groupDialogFilterOptions, groupDialogSortingOptions } from '../../../shared/constants';
|
||||
import { Badge } from '../../ui/badge';
|
||||
@@ -1203,6 +1203,8 @@
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const { showUserDialog } = useUserStore();
|
||||
const { currentUser } = storeToRefs(useUserStore());
|
||||
const { groupDialog, inviteGroupDialog } = storeToRefs(useGroupStore());
|
||||
@@ -1469,43 +1471,42 @@
|
||||
});
|
||||
}
|
||||
function confirmDeleteGroupPost(post) {
|
||||
ElMessageBox.confirm('Are you sure you want to delete this post?', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
groupRequest
|
||||
.deleteGroupPost({
|
||||
groupId: post.groupId,
|
||||
postId: post.id
|
||||
})
|
||||
.then((args) => {
|
||||
const D = groupDialog.value;
|
||||
if (D.id !== args.params.groupId) {
|
||||
return;
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Are you sure you want to delete this post?',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
groupRequest
|
||||
.deleteGroupPost({
|
||||
groupId: post.groupId,
|
||||
postId: post.id
|
||||
})
|
||||
.then((args) => {
|
||||
const D = groupDialog.value;
|
||||
if (D.id !== args.params.groupId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const postId = args.params.postId;
|
||||
// remove existing post
|
||||
for (const item of D.posts) {
|
||||
if (item.id === postId) {
|
||||
removeFromArray(D.posts, item);
|
||||
break;
|
||||
}
|
||||
const postId = args.params.postId;
|
||||
// remove existing post
|
||||
for (const item of D.posts) {
|
||||
if (item.id === postId) {
|
||||
removeFromArray(D.posts, item);
|
||||
break;
|
||||
}
|
||||
// remove/update announcement
|
||||
if (postId === D.announcement.id) {
|
||||
if (D.posts.length > 0) {
|
||||
D.announcement = D.posts[0];
|
||||
} else {
|
||||
D.announcement = {};
|
||||
}
|
||||
}
|
||||
// remove/update announcement
|
||||
if (postId === D.announcement.id) {
|
||||
if (D.posts.length > 0) {
|
||||
D.announcement = D.posts[0];
|
||||
} else {
|
||||
D.announcement = {};
|
||||
}
|
||||
updateGroupPostSearch();
|
||||
});
|
||||
}
|
||||
}
|
||||
updateGroupPostSearch();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
@@ -1571,46 +1572,44 @@
|
||||
}
|
||||
|
||||
function blockGroup(groupId) {
|
||||
ElMessageBox.confirm('Are you sure you want to block this group?', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
groupRequest
|
||||
.blockGroup({
|
||||
groupId
|
||||
})
|
||||
.then((args) => {
|
||||
if (groupDialog.value.visible && groupDialog.value.id === args.params.groupId) {
|
||||
showGroupDialog(args.params.groupId);
|
||||
}
|
||||
});
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Are you sure you want to block this group?',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
groupRequest
|
||||
.blockGroup({
|
||||
groupId
|
||||
})
|
||||
.then((args) => {
|
||||
if (groupDialog.value.visible && groupDialog.value.id === args.params.groupId) {
|
||||
showGroupDialog(args.params.groupId);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
function unblockGroup(groupId) {
|
||||
ElMessageBox.confirm('Are you sure you want to unblock this group?', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
groupRequest
|
||||
.unblockGroup({
|
||||
groupId,
|
||||
userId: currentUser.value.id
|
||||
})
|
||||
.then((args) => {
|
||||
if (groupDialog.value.visible && groupDialog.value.id === args.params.groupId) {
|
||||
showGroupDialog(args.params.groupId);
|
||||
}
|
||||
});
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Are you sure you want to unblock this group?',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
groupRequest
|
||||
.unblockGroup({
|
||||
groupId,
|
||||
userId: currentUser.value.id
|
||||
})
|
||||
.then((args) => {
|
||||
if (groupDialog.value.visible && groupDialog.value.id === args.params.groupId) {
|
||||
showGroupDialog(args.params.groupId);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
@@ -87,12 +87,11 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Check as CheckIcon } from 'lucide-vue-next';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { useFriendStore, useGalleryStore, useInviteStore, useUserStore } from '../../../stores';
|
||||
import { useFriendStore, useGalleryStore, useInviteStore, useModalStore, useUserStore } from '../../../stores';
|
||||
import { parseLocation, userImage, userStatusClass } from '../../../shared/utils';
|
||||
import { instanceRequest, notificationRequest } from '../../../api';
|
||||
import { VirtualCombobox } from '../../ui/virtual-combobox';
|
||||
@@ -104,6 +103,8 @@
|
||||
const { currentUser } = storeToRefs(useUserStore());
|
||||
const { clearInviteImageUpload } = useGalleryStore();
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
inviteDialog: {
|
||||
@@ -233,14 +234,15 @@
|
||||
}
|
||||
|
||||
function sendInvite() {
|
||||
ElMessageBox.confirm('Continue? Invite', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Invite',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
const D = props.inviteDialog;
|
||||
if (action !== 'confirm' || D.loading === true) {
|
||||
if (D.loading === true) {
|
||||
return;
|
||||
}
|
||||
D.loading = true;
|
||||
@@ -275,7 +277,8 @@
|
||||
}
|
||||
};
|
||||
inviteLoop();
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
}) .catch(() => {});
|
||||
|
||||
@@ -79,14 +79,13 @@
|
||||
import { computed, nextTick, ref, watch } from 'vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Check as CheckIcon } from 'lucide-vue-next';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { hasGroupPermission, userImage, userStatusClass } from '../../shared/utils';
|
||||
import { useFriendStore, useGroupStore, useModalStore } from '../../stores';
|
||||
import { groupRequest, userRequest } from '../../api';
|
||||
import { useFriendStore, useGroupStore } from '../../stores';
|
||||
import { VirtualCombobox } from '../ui/virtual-combobox';
|
||||
import { getNextDialogIndex } from '../../shared/utils/base/ui';
|
||||
|
||||
@@ -96,6 +95,7 @@
|
||||
const { currentUserGroups, inviteGroupDialog } = storeToRefs(useGroupStore());
|
||||
const { applyGroup } = useGroupStore();
|
||||
const { t } = useI18n();
|
||||
const modalStore = useModalStore();
|
||||
|
||||
watch(
|
||||
() => inviteGroupDialog.value.visible,
|
||||
@@ -272,14 +272,15 @@
|
||||
});
|
||||
}
|
||||
function sendGroupInvite() {
|
||||
ElMessageBox.confirm('Continue? Invite User(s) To Group', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Invite User(s) To Group',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
const D = inviteGroupDialog.value;
|
||||
if (action !== 'confirm' || D.loading === true) {
|
||||
if (D.loading === true) {
|
||||
return;
|
||||
}
|
||||
D.loading = true;
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ButtonGroup } from '@/components/ui/button-group';
|
||||
import { Copy } from 'lucide-vue-next';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { InputGroupField } from '@/components/ui/input-group';
|
||||
import { MoreHorizontal } from 'lucide-vue-next';
|
||||
import { Warning } from '@element-plus/icons-vue';
|
||||
@@ -143,7 +142,14 @@
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { useFriendStore, useGameStore, useInviteStore, useLaunchStore, useLocationStore } from '../../stores';
|
||||
import {
|
||||
useFriendStore,
|
||||
useGameStore,
|
||||
useInviteStore,
|
||||
useLaunchStore,
|
||||
useLocationStore,
|
||||
useModalStore
|
||||
} from '../../stores';
|
||||
import { checkCanInvite, getLaunchURL, isRealInstance, parseLocation } from '../../shared/utils';
|
||||
import { instanceRequest, worldRequest } from '../../api';
|
||||
import { getNextDialogIndex } from '../../shared/utils/base/ui';
|
||||
@@ -153,6 +159,8 @@
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const { friends } = storeToRefs(useFriendStore());
|
||||
const { lastLocation } = storeToRefs(useLocationStore());
|
||||
const { launchGame, tryOpenInstanceInVrc } = useLaunchStore();
|
||||
@@ -245,16 +253,17 @@
|
||||
}
|
||||
function handleLaunchGame(location, shortName, desktop) {
|
||||
if (isGameRunning.value) {
|
||||
ElMessageBox.confirm(t('dialog.launch.game_running_warning'), t('dialog.launch.header'), {
|
||||
confirmButtonText: t('dialog.launch.confirm_yes'),
|
||||
cancelButtonText: t('dialog.launch.confirm_no'),
|
||||
type: 'warning'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
launchGame(location, shortName, desktop);
|
||||
isVisible.value = false;
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: t('dialog.launch.game_running_warning'),
|
||||
title: t('dialog.launch.header'),
|
||||
confirmText: t('dialog.launch.confirm_yes'),
|
||||
cancelText: t('dialog.launch.confirm_no')
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
launchGame(location, shortName, desktop);
|
||||
isVisible.value = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
return;
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, nextTick, ref, watch } from 'vue';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { InputGroupField } from '@/components/ui/input-group';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -41,7 +40,7 @@
|
||||
removeFromArray,
|
||||
timeToText
|
||||
} from '../../../shared/utils';
|
||||
import { useInstanceStore, useSearchStore, useUiStore, useVrcxStore } from '../../../stores';
|
||||
import { useInstanceStore, useModalStore, useSearchStore, useUiStore, useVrcxStore } from '../../../stores';
|
||||
import { DataTableLayout } from '../../ui/data-table';
|
||||
import { createColumns } from './previousInstancesGroupColumns.jsx';
|
||||
import { database } from '../../../service/database';
|
||||
@@ -56,6 +55,8 @@
|
||||
const previousInstancesGroupDialogIndex = ref(2000);
|
||||
const loading = ref(false);
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const vrcxStore = useVrcxStore();
|
||||
const rawRows = ref([]);
|
||||
const search = ref('');
|
||||
@@ -169,15 +170,14 @@
|
||||
}
|
||||
|
||||
function deleteGameLogGroupInstancePrompt(row) {
|
||||
ElMessageBox.confirm('Continue? Delete GameLog Instance', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
deleteGameLogGroupInstance(row);
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Delete GameLog Instance',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
deleteGameLogGroupInstance(row);
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
@@ -30,11 +30,18 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, nextTick, ref, watch } from 'vue';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { InputGroupField } from '@/components/ui/input-group';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import {
|
||||
useInstanceStore,
|
||||
useModalStore,
|
||||
useSearchStore,
|
||||
useUiStore,
|
||||
useUserStore,
|
||||
useVrcxStore
|
||||
} from '../../../stores';
|
||||
import {
|
||||
compareByCreatedAt,
|
||||
localeIncludes,
|
||||
@@ -42,7 +49,6 @@
|
||||
removeFromArray,
|
||||
timeToText
|
||||
} from '../../../shared/utils';
|
||||
import { useInstanceStore, useSearchStore, useUiStore, useUserStore, useVrcxStore } from '../../../stores';
|
||||
import { DataTableLayout } from '../../ui/data-table';
|
||||
import { createColumns } from './previousInstancesWorldColumns.jsx';
|
||||
import { database } from '../../../service/database';
|
||||
@@ -51,6 +57,8 @@
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const props = defineProps({
|
||||
previousInstancesWorldDialog: {
|
||||
type: Object,
|
||||
@@ -164,15 +172,14 @@
|
||||
}
|
||||
|
||||
function deleteGameLogWorldInstancePrompt(row) {
|
||||
ElMessageBox.confirm('Continue? Delete GameLog Instance', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
deleteGameLogWorldInstance(row);
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Delete GameLog Instance',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
deleteGameLogWorldInstance(row);
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
@@ -30,11 +30,18 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, nextTick, ref, watch } from 'vue';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { InputGroupField } from '@/components/ui/input-group';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import {
|
||||
useInstanceStore,
|
||||
useLaunchStore,
|
||||
useModalStore,
|
||||
useSearchStore,
|
||||
useUiStore,
|
||||
useVrcxStore
|
||||
} from '../../../stores';
|
||||
import {
|
||||
compareByCreatedAt,
|
||||
localeIncludes,
|
||||
@@ -42,7 +49,6 @@
|
||||
removeFromArray,
|
||||
timeToText
|
||||
} from '../../../shared/utils';
|
||||
import { useInstanceStore, useLaunchStore, useSearchStore, useUiStore, useVrcxStore } from '../../../stores';
|
||||
import { DataTableLayout } from '../../ui/data-table';
|
||||
import { createColumns } from './previousInstancesUserColumns.jsx';
|
||||
import { database } from '../../../service/database';
|
||||
@@ -68,6 +74,8 @@
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:previous-instances-user-dialog']);
|
||||
|
||||
const modalStore = useModalStore();
|
||||
const loading = ref(false);
|
||||
const rawRows = ref([]);
|
||||
const search = ref('');
|
||||
@@ -189,13 +197,14 @@
|
||||
}
|
||||
|
||||
function deleteGameLogUserInstancePrompt(row) {
|
||||
ElMessageBox.confirm('Continue? Delete User From GameLog Instance', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') deleteGameLogUserInstance(row);
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Delete User From GameLog Instance',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
deleteGameLogUserInstance(row);
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
@@ -1318,7 +1318,6 @@
|
||||
import { Download, LogOut, RefreshCcw } from 'lucide-vue-next';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
@@ -1358,6 +1357,7 @@
|
||||
useGroupStore,
|
||||
useInviteStore,
|
||||
useLocationStore,
|
||||
useModalStore,
|
||||
useModerationStore,
|
||||
useUiStore,
|
||||
useUserStore,
|
||||
@@ -1393,6 +1393,8 @@
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const { hideUserNotes, hideUserMemos, isDarkMode } = storeToRefs(useAppearanceSettingsStore());
|
||||
const { bioLanguage, avatarRemoteDatabase, translationApi, translationApiType } =
|
||||
storeToRefs(useAdvancedSettingsStore());
|
||||
@@ -1894,19 +1896,17 @@
|
||||
? command
|
||||
: t(`${i18nPreFix}${formattedCommand}`);
|
||||
|
||||
ElMessageBox.confirm(
|
||||
t('confirm.message', {
|
||||
command: displayCommandText
|
||||
}),
|
||||
t('confirm.title'),
|
||||
{
|
||||
confirmButtonText: t('confirm.confirm_button'),
|
||||
cancelButtonText: t('confirm.cancel_button'),
|
||||
type: 'info'
|
||||
}
|
||||
)
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: t('confirm.message', {
|
||||
command: displayCommandText
|
||||
}),
|
||||
title: t('confirm.title'),
|
||||
confirmText: t('confirm.confirm_button'),
|
||||
cancelText: t('confirm.cancel_button')
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (ok) {
|
||||
performUserDialogCommand(command, D.id);
|
||||
}
|
||||
})
|
||||
@@ -2422,22 +2422,21 @@
|
||||
}
|
||||
|
||||
function resetHome() {
|
||||
ElMessageBox.confirm('Continue? Reset Home', 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action === 'confirm') {
|
||||
userRequest
|
||||
.saveCurrentUser({
|
||||
homeLocation: ''
|
||||
})
|
||||
.then((args) => {
|
||||
toast.success('Home world has been reset');
|
||||
return args;
|
||||
});
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Reset Home',
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
userRequest
|
||||
.saveCurrentUser({
|
||||
homeLocation: ''
|
||||
})
|
||||
.then((args) => {
|
||||
toast.success('Home world has been reset');
|
||||
return args;
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
@@ -795,6 +795,7 @@
|
||||
useInstanceStore,
|
||||
useInviteStore,
|
||||
useLocationStore,
|
||||
useModalStore,
|
||||
useUserStore,
|
||||
useWorldStore
|
||||
} from '../../../stores';
|
||||
@@ -810,6 +811,8 @@
|
||||
import { Badge } from '../../ui/badge';
|
||||
import { database } from '../../../service/database.js';
|
||||
|
||||
const modalStore = useModalStore();
|
||||
|
||||
const NewInstanceDialog = defineAsyncComponent(() => import('../NewInstanceDialog.vue'));
|
||||
const PreviousInstancesWorldDialog = defineAsyncComponent(
|
||||
() => import('../PreviousInstancesDialog/PreviousInstancesWorldDialog.vue')
|
||||
@@ -988,15 +991,13 @@
|
||||
case 'Unpublish':
|
||||
case 'Delete Persistent Data':
|
||||
case 'Delete':
|
||||
ElMessageBox.confirm(`Continue? ${command}`, 'Confirm', {
|
||||
confirmButtonText: 'Confirm',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info'
|
||||
})
|
||||
.then((action) => {
|
||||
if (action !== 'confirm') {
|
||||
return;
|
||||
}
|
||||
modalStore
|
||||
.confirm({
|
||||
description: `Continue? ${command}`,
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
if (!ok) return;
|
||||
switch (command) {
|
||||
case 'Delete Favorite':
|
||||
favoriteRequest.deleteFavorite({
|
||||
|
||||
Reference in New Issue
Block a user