From 7fe5f123d81d3995a5683d2360cb1a25e9778df4 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: Thu, 16 Mar 2023 14:09:18 +0800 Subject: [PATCH] :sparkles: Feature: click the picbed name at upload page will route to config page now --- public/i18n/en.yml | 1 + public/i18n/zh-CN.yml | 1 + public/i18n/zh-TW.yml | 1 + src/renderer/pages/Upload.vue | 36 +++++++++++++++++++++++++++++++++++ src/universal/types/i18n.d.ts | 1 + 5 files changed, 40 insertions(+) diff --git a/public/i18n/en.yml b/public/i18n/en.yml index e659e16..d211d45 100644 --- a/public/i18n/en.yml +++ b/public/i18n/en.yml @@ -29,6 +29,7 @@ CURRENT_PICBED: Current Picbed CHOOSE_YOUR_DEFAULT_PICBED: 'Choose ${d} as your default picbed:' UPLOAD_AREA: Upload Area +UPLOAD_VIEW_HINT: Click to open picbeds settings GALLERY: Gallery PICBEDS_SETTINGS: Picbeds Settings PICBEDS_MANAGE: Picbeds Manage diff --git a/public/i18n/zh-CN.yml b/public/i18n/zh-CN.yml index 437ffcb..58b26ca 100644 --- a/public/i18n/zh-CN.yml +++ b/public/i18n/zh-CN.yml @@ -29,6 +29,7 @@ CURRENT_PICBED: 当前图床 CHOOSE_YOUR_DEFAULT_PICBED: 选择 ${d} 作为你默认图床: UPLOAD_AREA: 上传区 +UPLOAD_VIEW_HINT: 点击打开图床设置 GALLERY: 相册 PICBEDS_SETTINGS: 图床设置 PICBEDS_MANAGE: 图床管理 diff --git a/public/i18n/zh-TW.yml b/public/i18n/zh-TW.yml index 0b24301..cd9881f 100644 --- a/public/i18n/zh-TW.yml +++ b/public/i18n/zh-TW.yml @@ -29,6 +29,7 @@ CURRENT_PICBED: 當前圖床 CHOOSE_YOUR_DEFAULT_PICBED: 選擇 ${d} 作為你的預設圖床: UPLOAD_AREA: 上傳區 +UPLOAD_VIEW_HINT: 點擊打開圖床設定 GALLERY: 相簿 PICBEDS_SETTINGS: 圖床設定 PICBEDS_MANAGE: 圖床管理 diff --git a/src/renderer/pages/Upload.vue b/src/renderer/pages/Upload.vue index abb95af..129e6d6 100644 --- a/src/renderer/pages/Upload.vue +++ b/src/renderer/pages/Upload.vue @@ -8,7 +8,18 @@ :span="24" >
+ + {{ $T('PICTURE_UPLOAD') }} - {{ picBedName }} - {{ picBedConfigName }} + + ('picBed.current') + const currentPicBedConfig = await getConfig(`uploader.${currentPicBed}`) as any || {} + const configList = currentPicBedConfig.configList || [] + const config = configList.find((item: any) => item._configName === picBedConfigName) + $router.push({ + name: PICBEDS_PAGE, + params: { + type: currentPicBed, + configId: config._id + }, + query: { + defaultConfigId: currentPicBedConfig.defaultId || '' + } + }) + console.log(configList, picBedConfigName) +} + onBeforeUnmount(() => { $bus.off(SHOW_INPUT_BOX_RESPONSE) ipcRenderer.removeAllListeners('uploadProgress') @@ -625,6 +657,10 @@ export default { margin 10px auto align-items center justify-content center +#upload-view-title + &:hover + cursor pointer + color #409EFF #upload-view position absolute left 140px diff --git a/src/universal/types/i18n.d.ts b/src/universal/types/i18n.d.ts index 28dcc54..cced578 100644 --- a/src/universal/types/i18n.d.ts +++ b/src/universal/types/i18n.d.ts @@ -27,6 +27,7 @@ interface ILocales { CURRENT_PICBED: string CHOOSE_YOUR_DEFAULT_PICBED: string UPLOAD_AREA: string + UPLOAD_VIEW_HINT: string GALLERY: string PICBEDS_SETTINGS: string PICBEDS_MANAGE: string