mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 16:23:50 +02:00
replace ElMessageBox(alert, confirm) with alert dialog
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { toast } from 'vue-sonner';
|
||||
|
||||
import Noty from 'noty';
|
||||
@@ -6,6 +5,7 @@ import Noty from 'noty';
|
||||
import {
|
||||
useAuthStore,
|
||||
useAvatarStore,
|
||||
useModalStore,
|
||||
useNotificationStore,
|
||||
useUpdateLoopStore,
|
||||
useUserStore
|
||||
@@ -33,6 +33,7 @@ export function request(endpoint, options) {
|
||||
const userStore = useUserStore();
|
||||
const avatarStore = useAvatarStore();
|
||||
const authStore = useAuthStore();
|
||||
const modalStore = useModalStore();
|
||||
const notificationStore = useNotificationStore();
|
||||
const updateLoopStore = useUpdateLoopStore();
|
||||
if (
|
||||
@@ -187,10 +188,10 @@ export function request(endpoint, options) {
|
||||
}
|
||||
}
|
||||
if (status === 403 && endpoint === 'config') {
|
||||
ElMessageBox.alert(
|
||||
t('api.error.message.vpn_in_use'),
|
||||
`403 ${t('api.error.message.login_error')}`
|
||||
).catch(() => {});
|
||||
modalStore.alert({
|
||||
description: t('api.error.message.vpn_in_use'),
|
||||
title: `403 ${t('api.error.message.login_error')}`
|
||||
});
|
||||
authStore.handleLogoutEvent();
|
||||
$throw(403, endpoint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user