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

@@ -42,10 +42,10 @@
</template>
<script setup>
import { ElMessage } from 'element-plus';
import { Upload } from '@element-plus/icons-vue';
import { ref } from 'vue';
import { storeToRefs } from 'pinia';
import { toast } from 'vue-sonner';
import { useI18n } from 'vue-i18n';
import { imageRequest, worldRequest } from '../../../api';
@@ -281,10 +281,7 @@
function worldImageSet(args) {
changeWorldImageDialogLoading.value = false;
if (args.json.imageUrl === args.params.imageUrl) {
ElMessage({
message: t('message.world.image_changed'),
type: 'success'
});
toast.success(t('message.world.image_changed'));
emit('update:previousImageUrl', args.json.imageUrl);
} else {
$throw(0, 'World image change failed', args.params.imageUrl);
@@ -303,10 +300,7 @@
const ref = applyWorld(worldArgs.json);
changeWorldImageDialogLoading.value = false;
emit('update:previousImageUrl', ref.imageUrl);
ElMessage({
message: t('message.world.image_changed'),
type: 'success'
});
toast.success(t('message.world.image_changed'));
// closeDialog();
}