mirror of
https://github.com/rubickCenter/rubick
synced 2026-02-25 16:34:36 +08:00
✨ 支持本地启动,修改mac 下获取 APP icon 的方式
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "rubick-system-feature",
|
||||
"pluginName": "rubick 系统菜单",
|
||||
"description": "rubick 系统菜单",
|
||||
"pluginName": "系统菜单",
|
||||
"description": "系统菜单",
|
||||
"main": "index.html",
|
||||
"logo": "https://pic1.zhimg.com/80/v2-c09780808301668a82e6646cb42f0806_720w.png",
|
||||
"version": "0.0.0",
|
||||
@@ -10,19 +10,19 @@
|
||||
"features": [
|
||||
{
|
||||
"code": "market",
|
||||
"explain": "rubick 插件市场",
|
||||
"explain": "插件市场",
|
||||
"cmds":[
|
||||
"插件市场"
|
||||
]
|
||||
},{
|
||||
"code": "installed",
|
||||
"explain": "rubick 已安装插件",
|
||||
"explain": "已安装插件",
|
||||
"cmds":[
|
||||
"已安装插件"
|
||||
]
|
||||
},{
|
||||
"code": "settings",
|
||||
"explain": "rubick 偏好设置",
|
||||
"explain": "偏好设置",
|
||||
"cmds":[
|
||||
"偏好设置"
|
||||
]
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
const remote = require('@electron/remote');
|
||||
const { ipcRenderer } = require('electron');
|
||||
|
||||
const ipcSendSync = (type, data) => {
|
||||
const returnValue = ipcRenderer.sendSync('msg-trigger', {
|
||||
type,
|
||||
data,
|
||||
});
|
||||
if (returnValue instanceof Error) throw returnValue;
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
const ipcSend = (type, data) => {
|
||||
ipcRenderer.send('msg-trigger', {
|
||||
type,
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
||||
window.market = {
|
||||
getLocalPlugins() {
|
||||
@@ -13,4 +30,10 @@ window.market = {
|
||||
refreshPlugin(plugin) {
|
||||
return remote.getGlobal('LOCAL_PLUGINS').refreshPlugin(plugin);
|
||||
},
|
||||
addLocalStartPlugin(plugin) {
|
||||
ipcSend('addLocalStartPlugin', { plugin });
|
||||
},
|
||||
removeLocalStartPlugin(plugin) {
|
||||
ipcSend('removeLocalStartPlugin', { plugin });
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user