mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-29 19:41:43 +08:00
✨ Feature(custom): add more log file quick open item
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
ipcMain,
|
||||
clipboard
|
||||
} from 'electron'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
// Electron modules
|
||||
|
||||
@@ -371,6 +372,9 @@ const handlePicGoGalleryDB = () => {
|
||||
const handleOpenFile = () => {
|
||||
ipcMain.on(PICGO_OPEN_FILE, (event: IpcMainEvent, fileName: string) => {
|
||||
const abFilePath = path.join(STORE_PATH, fileName)
|
||||
if (!fs.existsSync(abFilePath)) {
|
||||
fs.writeFileSync(abFilePath, '')
|
||||
}
|
||||
shell.openPath(abFilePath)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -975,6 +975,30 @@
|
||||
{{ $T('SETTINGS_CLICK_TO_OPEN') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_GUI_LOG_FILE')"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="openFile('piclist-gui-local.log')"
|
||||
>
|
||||
{{ $T('SETTINGS_CLICK_TO_OPEN') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_MANAGE_LOG_FILE')"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
round
|
||||
size="small"
|
||||
@click="openFile('manage.log')"
|
||||
>
|
||||
{{ $T('SETTINGS_CLICK_TO_OPEN') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_LOG_LEVEL')"
|
||||
>
|
||||
|
||||
2
src/universal/types/i18n.d.ts
vendored
2
src/universal/types/i18n.d.ts
vendored
@@ -185,6 +185,8 @@ interface ILocales {
|
||||
SETTINGS_GETING: string
|
||||
SETTINGS_TIPS_HAS_NEW_VERSION: string
|
||||
SETTINGS_LOG_FILE: string
|
||||
SETTINGS_GUI_LOG_FILE: string
|
||||
SETTINGS_MANAGE_LOG_FILE: string
|
||||
SETTINGS_LOG_LEVEL: string
|
||||
SETTINGS_LOG_FILE_SIZE: string
|
||||
SETTINGS_SET_PICGO_SERVER: string
|
||||
|
||||
Reference in New Issue
Block a user