Feature: add picbed config name in upload page

This commit is contained in:
萌萌哒赫萝 2023-02-23 14:02:21 +08:00
parent be68f0fadb
commit 0a3114339b

View File

@ -8,7 +8,7 @@
:span="24" :span="24"
> >
<div class="view-title"> <div class="view-title">
{{ $T('PICTURE_UPLOAD') }} - {{ picBedName }} {{ $T('PICTURE_UPLOAD') }} - {{ picBedName }} - {{ picBedConfigName }}
<el-icon <el-icon
style="cursor: pointer; margin-left: 4px;" style="cursor: pointer; margin-left: 4px;"
@click="handleChangePicBed" @click="handleChangePicBed"
@ -140,6 +140,7 @@ const pasteStyle = ref('')
const picBed = ref<IPicBedType[]>([]) const picBed = ref<IPicBedType[]>([])
const picBedName = ref('') const picBedName = ref('')
const customLink = ref('') const customLink = ref('')
const picBedConfigName = ref('')
onBeforeMount(() => { onBeforeMount(() => {
ipcRenderer.on('uploadProgress', (_event: IpcRendererEvent, _progress: number) => { ipcRenderer.on('uploadProgress', (_event: IpcRendererEvent, _progress: number) => {
if (_progress !== -1) { if (_progress !== -1) {
@ -282,6 +283,7 @@ async function getDefaultPicBed () {
picBedName.value = item.name picBedName.value = item.name
} }
}) })
picBedConfigName.value = await getConfig<string>(`picBed.${currentPicBed}._configName`) || ''
} }
function getPicBeds (_event: Event, picBeds: IPicBedType[]) { function getPicBeds (_event: Event, picBeds: IPicBedType[]) {