mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
replace ElMessage with Sonner
This commit is contained in:
@@ -78,9 +78,10 @@
|
||||
useVueTable
|
||||
} from '@tanstack/vue-table';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import Noty from 'noty';
|
||||
@@ -376,7 +377,7 @@
|
||||
row.senderUserId
|
||||
)
|
||||
.then((_args) => {
|
||||
ElMessage('Invite sent');
|
||||
toast('Invite sent');
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: row.id
|
||||
});
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { inviteMessagesRequest, notificationRequest } from '../../../api';
|
||||
@@ -79,13 +79,10 @@
|
||||
})
|
||||
.then((args) => {
|
||||
if (args.json[slot].message === I.messageSlot.message) {
|
||||
ElMessage({
|
||||
message: "VRChat API didn't update message, try again",
|
||||
type: 'error'
|
||||
});
|
||||
toast.error("VRChat API didn't update message, try again");
|
||||
throw new Error("VRChat API didn't update message, try again");
|
||||
} else {
|
||||
ElMessage('Invite message updated');
|
||||
toast('Invite message updated');
|
||||
}
|
||||
return args;
|
||||
});
|
||||
@@ -104,10 +101,7 @@
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: I.invite.id
|
||||
});
|
||||
ElMessage({
|
||||
message: 'Invite response message sent',
|
||||
type: 'success'
|
||||
});
|
||||
toast.success('Invite response message sent');
|
||||
return args;
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -123,10 +117,7 @@
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: I.invite.id
|
||||
});
|
||||
ElMessage({
|
||||
message: 'Invite response message sent',
|
||||
type: 'success'
|
||||
});
|
||||
toast.success('Invite response message sent');
|
||||
return args;
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { notificationRequest } from '../../../api';
|
||||
@@ -65,10 +65,7 @@
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: D.invite.id
|
||||
});
|
||||
ElMessage({
|
||||
message: 'Invite response photo message sent',
|
||||
type: 'success'
|
||||
});
|
||||
toast.success('Invite response photo message sent');
|
||||
return args;
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -84,10 +81,7 @@
|
||||
notificationRequest.hideNotification({
|
||||
notificationId: D.invite.id
|
||||
});
|
||||
ElMessage({
|
||||
message: 'Invite response message sent',
|
||||
type: 'success'
|
||||
});
|
||||
toast.success('Invite response message sent');
|
||||
return args;
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
Reference in New Issue
Block a user