mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-04 13:56:07 +02:00
replace el-progress
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<strong>{{ fetchState.processedFriends }} / {{ totalFriends }}</strong>
|
||||
</div>
|
||||
|
||||
<el-progress :percentage="progressPercent" :status="progressStatus" :stroke-width="14"> </el-progress>
|
||||
<Progress :model-value="progressPercent" class="h-3" />
|
||||
</div>
|
||||
|
||||
<div ref="chartRef" class="mutual-graph__canvas"></div>
|
||||
@@ -144,6 +144,7 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { Settings } from 'lucide-vue-next';
|
||||
import { Progress } from '@/components/ui/progress';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -213,7 +214,6 @@
|
||||
const progressPercent = computed(() =>
|
||||
totalFriends.value ? Math.min(100, Math.round((fetchState.processedFriends / totalFriends.value) * 100)) : 0
|
||||
);
|
||||
const progressStatus = computed(() => (isFetching.value ? 'warning' : ''));
|
||||
const forceDefaults = computed(() =>
|
||||
computeForceOptions(graphPayload.value?.nodes ?? [], graphPayload.value?.links ?? [])
|
||||
);
|
||||
|
||||
@@ -241,10 +241,10 @@
|
||||
:show-close="false"
|
||||
align-center>
|
||||
<div style="margin-bottom: 10px" v-text="t('view.friend_list.load_dialog_message')"></div>
|
||||
<el-progress
|
||||
:percentage="friendsListLoadingPercent"
|
||||
:text-inside="true"
|
||||
:stroke-width="16"></el-progress>
|
||||
<div class="flex items-center gap-2">
|
||||
<Progress :model-value="friendsListLoadingPercent" class="h-4 w-full" />
|
||||
<span class="text-xs w-10 text-right">{{ friendsListLoadingPercent }}%</span>
|
||||
</div>
|
||||
<div style="margin-top: 10px; text-align: right">
|
||||
<span>{{ friendsListLoadingCurrent }} / {{ friendsListLoadingTotal }}</span>
|
||||
</div>
|
||||
@@ -262,6 +262,7 @@
|
||||
import { computed, nextTick, reactive, ref, watch } from 'vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { InputGroupField } from '@/components/ui/input-group';
|
||||
import { Progress } from '@/components/ui/progress';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
|
||||
+52
-43
@@ -6,13 +6,6 @@
|
||||
</Button>
|
||||
<span class="header">{{ t('dialog.gallery_icons.header') }}</span>
|
||||
</div>
|
||||
<el-progress
|
||||
v-if="isUploading"
|
||||
:show-text="false"
|
||||
:indeterminate="true"
|
||||
:percentage="100"
|
||||
:stroke-width="3"
|
||||
style="margin-bottom: 12px" />
|
||||
<el-tabs>
|
||||
<el-tab-pane v-loading="galleryDialogGalleryLoading">
|
||||
<template #label>
|
||||
@@ -680,13 +673,16 @@
|
||||
r.onload = function () {
|
||||
try {
|
||||
const base64Body = btoa(r.result.toString());
|
||||
vrcPlusImageRequest
|
||||
.uploadGalleryImage(base64Body)
|
||||
.then((args) => {
|
||||
handleGalleryImageAdd(args);
|
||||
toast.success(t('message.gallery.uploaded'));
|
||||
return args;
|
||||
})
|
||||
const uploadPromise = vrcPlusImageRequest.uploadGalleryImage(base64Body).then((args) => {
|
||||
handleGalleryImageAdd(args);
|
||||
return args;
|
||||
});
|
||||
toast.promise(uploadPromise, {
|
||||
loading: t('message.upload.loading'),
|
||||
success: t('message.upload.success'),
|
||||
error: t('message.upload.error')
|
||||
});
|
||||
uploadPromise
|
||||
.catch((error) => {
|
||||
console.error('Failed to upload', error);
|
||||
})
|
||||
@@ -772,15 +768,18 @@
|
||||
r.onload = function () {
|
||||
try {
|
||||
const base64Body = btoa(r.result.toString());
|
||||
vrcPlusIconRequest
|
||||
.uploadVRCPlusIcon(base64Body)
|
||||
.then((args) => {
|
||||
if (Object.keys(VRCPlusIconsTable.value).length !== 0) {
|
||||
VRCPlusIconsTable.value.unshift(args.json);
|
||||
}
|
||||
toast.success(t('message.icon.uploaded'));
|
||||
return args;
|
||||
})
|
||||
const uploadPromise = vrcPlusIconRequest.uploadVRCPlusIcon(base64Body).then((args) => {
|
||||
if (Object.keys(VRCPlusIconsTable.value).length !== 0) {
|
||||
VRCPlusIconsTable.value.unshift(args.json);
|
||||
}
|
||||
return args;
|
||||
});
|
||||
toast.promise(uploadPromise, {
|
||||
loading: t('message.upload.loading'),
|
||||
success: t('message.upload.success'),
|
||||
error: t('message.upload.error')
|
||||
});
|
||||
uploadPromise
|
||||
.catch((error) => {
|
||||
console.error('Failed to upload VRC+ icon', error);
|
||||
})
|
||||
@@ -902,15 +901,18 @@
|
||||
params.loopStyle = 'pingpong';
|
||||
}
|
||||
const base64Body = btoa(r.result.toString());
|
||||
vrcPlusImageRequest
|
||||
.uploadEmoji(base64Body, params)
|
||||
.then((args) => {
|
||||
if (Object.keys(emojiTable.value).length !== 0) {
|
||||
emojiTable.value.unshift(args.json);
|
||||
}
|
||||
toast.success(t('message.emoji.uploaded'));
|
||||
return args;
|
||||
})
|
||||
const uploadPromise = vrcPlusImageRequest.uploadEmoji(base64Body, params).then((args) => {
|
||||
if (Object.keys(emojiTable.value).length !== 0) {
|
||||
emojiTable.value.unshift(args.json);
|
||||
}
|
||||
return args;
|
||||
});
|
||||
toast.promise(uploadPromise, {
|
||||
loading: t('message.upload.loading'),
|
||||
success: t('message.upload.success'),
|
||||
error: t('message.upload.error')
|
||||
});
|
||||
uploadPromise
|
||||
.catch((error) => {
|
||||
console.error('Failed to upload', error);
|
||||
})
|
||||
@@ -969,13 +971,16 @@
|
||||
maskTag: 'square'
|
||||
};
|
||||
const base64Body = btoa(r.result.toString());
|
||||
vrcPlusImageRequest
|
||||
.uploadSticker(base64Body, params)
|
||||
.then((args) => {
|
||||
handleStickerAdd(args);
|
||||
toast.success(t('message.sticker.uploaded'));
|
||||
return args;
|
||||
})
|
||||
const uploadPromise = vrcPlusImageRequest.uploadSticker(base64Body, params).then((args) => {
|
||||
handleStickerAdd(args);
|
||||
return args;
|
||||
});
|
||||
toast.promise(uploadPromise, {
|
||||
loading: t('message.upload.loading'),
|
||||
success: t('message.upload.success'),
|
||||
error: t('message.upload.error')
|
||||
});
|
||||
uploadPromise
|
||||
.catch((error) => {
|
||||
console.error('Failed to upload', error);
|
||||
})
|
||||
@@ -1041,16 +1046,20 @@
|
||||
};
|
||||
const base64Body = btoa(r.result.toString());
|
||||
const cropWhiteBorder = printCropBorder.value;
|
||||
vrcPlusImageRequest
|
||||
const uploadPromise = vrcPlusImageRequest
|
||||
.uploadPrint(base64Body, cropWhiteBorder, params)
|
||||
.then((args) => {
|
||||
toast.success(t('message.print.uploaded'));
|
||||
if (Object.keys(printTable.value).length !== 0) {
|
||||
printTable.value.unshift(args.json);
|
||||
}
|
||||
|
||||
return args;
|
||||
})
|
||||
});
|
||||
toast.promise(uploadPromise, {
|
||||
loading: t('message.upload.loading'),
|
||||
success: t('message.upload.success'),
|
||||
error: t('message.upload.error')
|
||||
});
|
||||
uploadPromise
|
||||
.catch((error) => {
|
||||
console.error('Failed to upload', error);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user