replace ElMessage with Sonner

This commit is contained in:
pa
2026-01-07 19:16:31 +09:00
committed by Natsumi
parent f819a3f500
commit 7e4de15ef2
85 changed files with 574 additions and 1144 deletions

View File

@@ -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
});

View File

@@ -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(() => {

View File

@@ -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(() => {