diff --git a/feature/public/package.json b/feature/public/package.json index d1b9b3b..890a1eb 100644 --- a/feature/public/package.json +++ b/feature/public/package.json @@ -18,7 +18,7 @@ "code": "installed", "explain": "已安装插件", "cmds":[ - "已安装插件" + "已安装插件", "installed" ] },{ "code": "settings", diff --git a/feature/src/App.vue b/feature/src/App.vue index 2cb5fc4..578411f 100644 --- a/feature/src/App.vue +++ b/feature/src/App.vue @@ -108,6 +108,7 @@ const changeMenu = (key: any) => { }; window.rubick.onPluginEnter(({ code }: { code: string }) => { + code = code === '已安装插件' ? 'installed' : code; changeMenu(code); store.commit('commonUpdate', {active: [code]}) }); diff --git a/feature/src/views/installed/index.vue b/feature/src/views/installed/index.vue index 45400eb..4d95231 100644 --- a/feature/src/views/installed/index.vue +++ b/feature/src/views/installed/index.vue @@ -185,7 +185,8 @@ const addCmdToSuperPanel = ({ cmd, code }) => { }, }; superPanelPlugins.value.data.push(plugin); - window.rubick.db.put(toRaw(superPanelPlugins.value)); + const { rev } = window.rubick.db.put(JSON.parse(JSON.stringify(superPanelPlugins.value))); + superPanelPlugins.value._rev = rev; }; const removePluginToSuperPanel = ({ cmd, name }) => { @@ -195,7 +196,8 @@ const removePluginToSuperPanel = ({ cmd, name }) => { return item.cmd !== cmd; } ); - window.rubick.db.put(toRaw(superPanelPlugins.value)); + const { rev } = window.rubick.db.put(toRaw(superPanelPlugins.value)); + superPanelPlugins.value._rev = rev; }; const hasAdded = (cmd) => { diff --git a/package.json b/package.json index 48ecc29..3a71fc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubick", - "version": "4.1.3", + "version": "4.1.4", "author": "muwoo <2424880409@qq.com>", "private": true, "scripts": { diff --git a/public/feature/package.json b/public/feature/package.json index d1b9b3b..890a1eb 100644 --- a/public/feature/package.json +++ b/public/feature/package.json @@ -18,7 +18,7 @@ "code": "installed", "explain": "已安装插件", "cmds":[ - "已安装插件" + "已安装插件", "installed" ] },{ "code": "settings", diff --git a/src/common/constans/common.ts b/src/common/constans/common.ts index 3a7310e..82b76c6 100644 --- a/src/common/constans/common.ts +++ b/src/common/constans/common.ts @@ -1,4 +1,4 @@ -export const WINDOW_WIDTH = 688; +export const WINDOW_WIDTH = 800; export const WINDOW_HEIGHT = 60; export const WINDOW_PLUGIN_HEIGHT = 600; diff --git a/src/main/common/api.ts b/src/main/common/api.ts index d8104d4..ec36a2d 100644 --- a/src/main/common/api.ts +++ b/src/main/common/api.ts @@ -26,6 +26,7 @@ import { runner, detach } from '../browsers'; import DBInstance from './db'; import getWinPosition from './getWinPosition'; import path from 'path'; +import commonConst from '@/common/utils/commonConst'; const runnerInstance = runner(); const detachInstance = detach(); @@ -97,7 +98,12 @@ class API extends DBInstance { ? 'http://localhost:8083/#/' : `file://${__static}/tpl/index.html`; } - if (!plugin.indexPath) { + if (plugin.name === 'rubick-system-feature') { + plugin.logo = plugin.logo || `file://${__static}/logo.png`; + plugin.indexPath = commonConst.dev() + ? 'http://localhost:8081/#/' + : `file://${__static}/feature/index.html`; + } else if (!plugin.indexPath) { const pluginPath = path.resolve(baseDir, 'node_modules', plugin.name); plugin.indexPath = `file://${path.join( pluginPath,