Feature: finish custom config path

ISSUES CLOSED: #255
This commit is contained in:
PiEgg
2021-08-01 17:02:54 +08:00
parent 96a63ea11a
commit 7030f7a764
13 changed files with 122 additions and 65 deletions

View File

@@ -338,8 +338,8 @@
<script lang="ts">
import keyDetect from '@/utils/key-binding'
import pkg from 'root/package.json'
import path from 'path'
import { IConfig } from 'picgo/dist/src/types/index'
import { PICGO_OPEN_FILE } from '#/events/constants'
import {
ipcRenderer,
remote
@@ -471,10 +471,7 @@ export default class extends Vue {
}) as string[]
}
openFile (file: string) {
const { app, shell } = remote
const STORE_PATH = app.getPath('userData')
const FILE = path.join(STORE_PATH, `/${file}`)
shell.openItem(FILE)
ipcRenderer.send(PICGO_OPEN_FILE, file)
}
openLogSetting () {
this.logFileVisible = true