mirror of
https://github.com/rubickCenter/rubick
synced 2026-01-12 07:22:52 +08:00
🐛 修复插件市场搜索空白问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user