mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-08 01:01:13 +08:00
✨ Feature: add i18n for en
This commit is contained in:
@@ -81,9 +81,11 @@ const getPluginList = (): IPicGoPlugin[] => {
|
||||
const pluginPKG = requireFunc(path.join(pluginPath, 'package.json'))
|
||||
const uploaderName = plugin.uploader || ''
|
||||
const transformerName = plugin.transformer || ''
|
||||
let menu: IGuiMenuItem[] = []
|
||||
let menu: Omit<IGuiMenuItem, 'handle'>[] = []
|
||||
if (plugin.guiMenu) {
|
||||
menu = plugin.guiMenu(picgo)
|
||||
menu = plugin.guiMenu(picgo).map(item => ({
|
||||
label: item.label
|
||||
}))
|
||||
}
|
||||
let gui = false
|
||||
if (pluginPKG.keywords && pluginPKG.keywords.length > 0) {
|
||||
@@ -127,6 +129,8 @@ const getPluginList = (): IPicGoPlugin[] => {
|
||||
const handleGetPluginList = () => {
|
||||
ipcMain.on('getPluginList', (event: IpcMainEvent) => {
|
||||
const list = getPluginList()
|
||||
// here can just send JS Object not function
|
||||
// or will cause [Failed to serialize arguments] error
|
||||
event.sender.send('pluginList', list)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user