mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-08 19:54:05 +08:00
🐛 修复插件市场搜索空白问题
This commit is contained in:
parent
5cfaa70c67
commit
dc656d3bca
@ -15,7 +15,7 @@
|
||||
"插件市场"
|
||||
]
|
||||
},{
|
||||
"code": "plugins",
|
||||
"code": "installed",
|
||||
"explain": "rubick 已安装插件",
|
||||
"cmds":[
|
||||
"已安装插件"
|
||||
|
@ -55,6 +55,11 @@ const changeMenu = (key: any) => {
|
||||
router.push(key);
|
||||
};
|
||||
|
||||
window.rubick.onPluginEnter(({ code }: { code: string }) => {
|
||||
changeMenu(code);
|
||||
active.value = [code];
|
||||
});
|
||||
|
||||
const store = useStore();
|
||||
const init = () => store.dispatch("init");
|
||||
init();
|
||||
|
@ -55,6 +55,14 @@
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="title">通用</div>
|
||||
<div class="settings-item-li">
|
||||
<div class="label">输入框自动粘贴</div>
|
||||
<a-switch
|
||||
v-model:checked="config.perf.common.autoPast"
|
||||
checked-children="开"
|
||||
un-checked-children="关"
|
||||
></a-switch>
|
||||
</div>
|
||||
<div class="settings-item-li">
|
||||
<div class="label">开机启动</div>
|
||||
<a-switch
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick",
|
||||
"version": "2.0.1-beta.6",
|
||||
"version": "2.0.1-beta.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>feature</title><link href="css/app.f8214d90.css" rel="preload" as="style"><link href="js/app.07c58e42.js" rel="preload" as="script"><link href="js/chunk-vendors.ebb3d342.js" rel="preload" as="script"><link href="css/app.f8214d90.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but feature doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.ebb3d342.js"></script><script src="js/app.07c58e42.js"></script></body></html>
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>feature</title><link href="css/app.f8214d90.css" rel="preload" as="style"><link href="js/app.9afe693f.js" rel="preload" as="script"><link href="js/chunk-vendors.ebb3d342.js" rel="preload" as="script"><link href="css/app.f8214d90.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but feature doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.ebb3d342.js"></script><script src="js/app.9afe693f.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/feature/js/app.9afe693f.js
Normal file
2
public/feature/js/app.9afe693f.js
Normal file
File diff suppressed because one or more lines are too long
1
public/feature/js/app.9afe693f.js.map
Normal file
1
public/feature/js/app.9afe693f.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -15,7 +15,7 @@
|
||||
"插件市场"
|
||||
]
|
||||
},{
|
||||
"code": "plugins",
|
||||
"code": "installed",
|
||||
"explain": "rubick 已安装插件",
|
||||
"cmds":[
|
||||
"已安装插件"
|
||||
|
@ -1,16 +1,15 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import getLocalDataFile from "./getLocalDataFile";
|
||||
import { app } from "electron";
|
||||
import commonConst from "./commonConst";
|
||||
|
||||
const configPath = path.join(getLocalDataFile(), "./rubick-config.json");
|
||||
|
||||
const defaultConfigForAnyPlatform = {
|
||||
version: 1,
|
||||
version: 2,
|
||||
perf: {
|
||||
shortCut: {
|
||||
showAndHidden: "Option+R",
|
||||
showAndHidden: "OptionOrAlt+R",
|
||||
separate: "Ctrl+D",
|
||||
quit: "Shift+Escape",
|
||||
},
|
||||
@ -19,6 +18,7 @@ const defaultConfigForAnyPlatform = {
|
||||
space: true,
|
||||
// 是否失焦隐藏。默认在dev环境不隐藏,在打包后隐藏。
|
||||
hideOnBlur: commonConst.production(),
|
||||
autoPast: false,
|
||||
},
|
||||
local: {
|
||||
search: true,
|
||||
|
@ -23,6 +23,7 @@ const API: any = {
|
||||
DBKEY: "RUBICK_DB_DEFAULT",
|
||||
openPlugin({ plugin }, window) {
|
||||
if (API.currentPlugin && API.currentPlugin.name === plugin.name) return;
|
||||
window.setSize(window.getSize()[0], 60);
|
||||
runnerInstance.removeView(window);
|
||||
runnerInstance.init(plugin, window);
|
||||
API.currentPlugin = plugin;
|
||||
|
@ -12,6 +12,10 @@ export default ({
|
||||
}) => {
|
||||
const clipboardFile: any = ref([]);
|
||||
const searchFocus = () => {
|
||||
const config = remote.getGlobal("OP_CONFIG").get();
|
||||
// 未开启自动粘贴
|
||||
if (!config.perf.common.autoPast) return;
|
||||
|
||||
if (currentPlugin.value.name) return;
|
||||
const fileList = getCopyFiles();
|
||||
// 拷贝的是文件
|
||||
|
@ -71,6 +71,7 @@ const createPluginManager = (): any => {
|
||||
);
|
||||
return {
|
||||
...pluginInfo,
|
||||
icon: pluginInfo.logo,
|
||||
indexPath: commonConst.dev()
|
||||
? "http://localhost:8081/#/"
|
||||
: `file://${path.join(pluginPath, "../", pluginInfo.main)}`,
|
||||
|
@ -26,5 +26,11 @@ export default function pluginClickEvent({ plugin, fe, cmd, ext, openPlugin }) {
|
||||
? "http://localhost:8082/#/"
|
||||
: `file://${__static}/tpl/index.html`;
|
||||
}
|
||||
// 插件市场
|
||||
if (plugin.name === "rubick-system-feature") {
|
||||
pluginDist.indexPath = commonConst.dev()
|
||||
? "http://localhost:8081/#/"
|
||||
: `file://${__static}/feature/index.html`;
|
||||
}
|
||||
openPlugin(pluginDist);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user