mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 06:38:13 -05:00
✨ Feature: click the picbed name at upload page will route to config page now
This commit is contained in:
parent
3dd55bde74
commit
7fe5f123d8
@ -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
|
||||
|
@ -29,6 +29,7 @@ CURRENT_PICBED: 当前图床
|
||||
|
||||
CHOOSE_YOUR_DEFAULT_PICBED: 选择 ${d} 作为你默认图床:
|
||||
UPLOAD_AREA: 上传区
|
||||
UPLOAD_VIEW_HINT: 点击打开图床设置
|
||||
GALLERY: 相册
|
||||
PICBEDS_SETTINGS: 图床设置
|
||||
PICBEDS_MANAGE: 图床管理
|
||||
|
@ -29,6 +29,7 @@ CURRENT_PICBED: 當前圖床
|
||||
|
||||
CHOOSE_YOUR_DEFAULT_PICBED: 選擇 ${d} 作為你的預設圖床:
|
||||
UPLOAD_AREA: 上傳區
|
||||
UPLOAD_VIEW_HINT: 點擊打開圖床設定
|
||||
GALLERY: 相簿
|
||||
PICBEDS_SETTINGS: 圖床設定
|
||||
PICBEDS_MANAGE: 圖床管理
|
||||
|
@ -8,7 +8,18 @@
|
||||
:span="24"
|
||||
>
|
||||
<div class="view-title">
|
||||
<el-tooltip
|
||||
placement="top"
|
||||
effect="light"
|
||||
:content="$T('UPLOAD_VIEW_HINT')"
|
||||
>
|
||||
<span
|
||||
id = "upload-view-title"
|
||||
@click="handlePicBedNameClick(picBedName, picBedConfigName)"
|
||||
>
|
||||
{{ $T('PICTURE_UPLOAD') }} - {{ picBedName }} - {{ picBedConfigName }}
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<el-icon
|
||||
style="cursor: pointer; margin-left: 4px;"
|
||||
@click="handleChangePicBed"
|
||||
@ -358,6 +369,9 @@ import {
|
||||
import { ElMessage as $message } from 'element-plus'
|
||||
import { getConfig, saveConfig, sendToMain } from '@/utils/dataSender'
|
||||
import { IBuildInCompressOptions, IBuildInWaterMarkOptions } from 'piclist'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { PICBEDS_PAGE } from '@/router/config'
|
||||
const $router = useRouter()
|
||||
|
||||
const imageProcessDialogVisible = ref(false)
|
||||
|
||||
@ -491,6 +505,24 @@ function onProgressChange (val: number) {
|
||||
}
|
||||
}
|
||||
|
||||
async function handlePicBedNameClick (picBedName: string, picBedConfigName: string) {
|
||||
const currentPicBed = await getConfig<string>('picBed.current')
|
||||
const currentPicBedConfig = await getConfig<any[]>(`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
|
||||
|
1
src/universal/types/i18n.d.ts
vendored
1
src/universal/types/i18n.d.ts
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user