mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-16 16:37:36 +08:00
Added: plugin config save
This commit is contained in:
@@ -23,9 +23,9 @@ const getConfig = (name, type, ctx) => {
|
||||
export default (app, ipcMain) => {
|
||||
const STORE_PATH = app.getPath('userData')
|
||||
const CONFIG_PATH = path.join(STORE_PATH, '/data.json')
|
||||
const picgo = new PicGo(CONFIG_PATH)
|
||||
|
||||
ipcMain.on('getPluginList', event => {
|
||||
const picgo = new PicGo(CONFIG_PATH)
|
||||
const pluginList = picgo.pluginLoader.getList()
|
||||
const list = []
|
||||
for (let i in pluginList) {
|
||||
|
||||
@@ -10,7 +10,8 @@ import fecha from 'fecha'
|
||||
// eslint-disable-next-line
|
||||
const requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require
|
||||
const PicGo = requireFunc('picgo')
|
||||
|
||||
const STORE_PATH = app.getPath('userData')
|
||||
const CONFIG_PATH = path.join(STORE_PATH, '/data.json')
|
||||
const renameURL = process.env.NODE_ENV === 'development' ? `http://localhost:9080/#rename-page` : `file://${__dirname}/index.html#rename-page`
|
||||
|
||||
const createRenameWindow = () => {
|
||||
@@ -38,9 +39,6 @@ const createRenameWindow = () => {
|
||||
return window
|
||||
}
|
||||
|
||||
const STORE_PATH = app.getPath('userData')
|
||||
const CONFIG_PATH = path.join(STORE_PATH, '/data.json')
|
||||
|
||||
const waitForShow = (webcontent) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
webcontent.on('dom-ready', () => {
|
||||
|
||||
Reference in New Issue
Block a user