From dfb6f767d2d231936991ccda8b826af7515d22cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E8=90=8C=E5=93=92=E8=B5=AB=E8=90=9D?= Date: Sun, 10 Sep 2023 20:44:22 -0700 Subject: [PATCH] :sparkles: Feature: optimize title text jump action of upload page --- package.json | 2 +- src/renderer/pages/Gallery.vue | 7 ++----- src/renderer/pages/PicGoSetting.vue | 2 +- src/renderer/pages/Upload.vue | 15 +++++++++------ yarn.lock | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 2e425d4..4d428dd 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "cos-nodejs-sdk-v5": "^2.12.4", "dexie": "^3.2.4", "electron-updater": "^6.1.4", - "element-plus": "^2.3.9", + "element-plus": "2.3.12", "epipebomb": "^1.0.0", "fast-xml-parser": "^4.2.7", "form-data": "^4.0.0", diff --git a/src/renderer/pages/Gallery.vue b/src/renderer/pages/Gallery.vue index 255c328..85e80f7 100644 --- a/src/renderer/pages/Gallery.vue +++ b/src/renderer/pages/Gallery.vue @@ -502,11 +502,8 @@ const isShowBatchRenameDialog = ref(false) const batchRenameMatch = ref('') const batchRenameReplace = ref('') const mathcedCount = computed(() => { - const matchedFiles = [] as any[] - filterList.value.forEach((item: any) => { - if (customStrMatch(item.imgUrl, batchRenameMatch.value)) { - matchedFiles.push(item) - } + const matchedFiles = filterList.value.filter((item: any) => { + return customStrMatch(item.imgUrl, batchRenameMatch.value) }) return matchedFiles.length }) diff --git a/src/renderer/pages/PicGoSetting.vue b/src/renderer/pages/PicGoSetting.vue index 106b445..a7b5b61 100644 --- a/src/renderer/pages/PicGoSetting.vue +++ b/src/renderer/pages/PicGoSetting.vue @@ -1248,7 +1248,7 @@ > - {{ $T('UPLOAD_PAGE_IMAGE_PROCESS_WMTYPE_TEXT') }}} + {{ $T('UPLOAD_PAGE_IMAGE_PROCESS_WMTYPE_TEXT') }} {{ $T('UPLOAD_PAGE_IMAGE_PROCESS_WMTYPE_IMAGE') }} diff --git a/src/renderer/pages/Upload.vue b/src/renderer/pages/Upload.vue index 7b8cc44..dc32117 100644 --- a/src/renderer/pages/Upload.vue +++ b/src/renderer/pages/Upload.vue @@ -17,7 +17,7 @@ id="upload-view-title" @click="handlePicBedNameClick(picBedName, picBedConfigName)" > - {{ picBedName }} - {{ picBedConfigName }} + {{ picBedName }} - {{ picBedConfigName || 'Default' }} ('picBed.current') const currentPicBedConfig = await getConfig(`uploader.${currentPicBed}`) as any || {} - const configList = currentPicBedConfig.configList || [] - const config = configList.find((item: any) => item._configName === picBedConfigName) + const configList = await triggerRPC(IRPCActionType.GET_PICBED_CONFIG_LIST, currentPicBed) + const currentConfigList = configList?.configList ?? [] + const config = currentConfigList.find((item: any) => item._configName === formatedpicBedConfigName) $router.push({ name: PICBEDS_PAGE, params: { type: currentPicBed, - configId: config._id + configId: config?._id || '' }, query: { defaultConfigId: currentPicBedConfig.defaultId || '' diff --git a/yarn.lock b/yarn.lock index 5c267a5..6cad8a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7440,10 +7440,10 @@ electron@^22.0.2: "@types/node" "^16.11.26" extract-zip "^2.0.1" -element-plus@^2.3.9: - version "2.3.9" - resolved "https://registry.npmjs.org/element-plus/-/element-plus-2.3.9.tgz#4a3363c62e6cc9b0a2f40f4df5aaa7b6feb4e6e4" - integrity sha512-TIOLnPl4cnoCPXqK3QYh+jpkthUBQnAM21O7o3Lhbse8v9pfrRXRTaBJtoEKnYNa8GZ4lZptUfH0PeZgDCNLUg== +element-plus@2.3.12: + version "2.3.12" + resolved "https://registry.npmjs.org/element-plus/-/element-plus-2.3.12.tgz#d3c91d0c701b2b3e67d06a351cb0c42dcc46460e" + integrity sha512-fAWpbKCyt+l1dsqSNPOs/F/dBN4Wp5CGAyxbiS5zqDwI4q3QPM+LxLU2h3GUHMIBtMGCvmsG98j5HPMkTKkvcA== dependencies: "@ctrl/tinycolor" "^3.4.1" "@element-plus/icons-vue" "^2.0.6"