mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-01 16:49:33 +08:00
✨ Feature(custom): add new set item to open config file path
This commit is contained in:
@@ -283,6 +283,18 @@
|
||||
{{ $T('SETTINGS_CLICK_TO_OPEN') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_CONFIG_FILE_PATH')"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="openDirectory()"
|
||||
>
|
||||
{{ $T('SETTINGS_CLICK_TO_OPEN') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -582,6 +594,18 @@
|
||||
label-width="50%"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_LOG_FILE_PATH')"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="openDirectory()"
|
||||
>
|
||||
{{ $T('SETTINGS_CLICK_TO_OPEN') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_SET_LOG_FILE')"
|
||||
>
|
||||
@@ -1603,7 +1627,7 @@ import { Reading, Close, Edit, InfoFilled } from '@element-plus/icons-vue'
|
||||
import pkg from 'root/package.json'
|
||||
|
||||
// 事件常量
|
||||
import { PICGO_OPEN_FILE, OPEN_URL, GET_PICBEDS, HIDE_DOCK } from '#/events/constants'
|
||||
import { PICGO_OPEN_FILE, PICGO_OPEN_DIRECTORY, OPEN_URL, GET_PICBEDS, HIDE_DOCK } from '#/events/constants'
|
||||
import { IRPCActionType } from '~/universal/types/enum'
|
||||
|
||||
// Electron 相关
|
||||
@@ -2046,6 +2070,10 @@ function openFile (file: string) {
|
||||
sendToMain(PICGO_OPEN_FILE, file)
|
||||
}
|
||||
|
||||
function openDirectory (directory?: string, inStorePath = true) {
|
||||
sendToMain(PICGO_OPEN_DIRECTORY, directory, inStorePath)
|
||||
}
|
||||
|
||||
function openLogSetting () {
|
||||
logFileVisible.value = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user