mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-20 14:49:31 +08:00
🐛 fix #185
This commit is contained in:
parent
e2ea081d25
commit
a827438dbe
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rubick",
|
"name": "rubick",
|
||||||
"version": "2.2.10",
|
"version": "2.2.11",
|
||||||
"author": "muwoo <2424880409@qq.com>",
|
"author": "muwoo <2424880409@qq.com>",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -78,6 +78,7 @@ export default () => {
|
|||||||
window.setBrowserView(view);
|
window.setBrowserView(view);
|
||||||
view.webContents.loadURL(pluginIndexPath);
|
view.webContents.loadURL(pluginIndexPath);
|
||||||
view.webContents.once('dom-ready', () => {
|
view.webContents.once('dom-ready', () => {
|
||||||
|
if (!view) return;
|
||||||
const height = pluginSetting && pluginSetting.height;
|
const height = pluginSetting && pluginSetting.height;
|
||||||
window.setSize(800, height || 660);
|
window.setSize(800, height || 660);
|
||||||
view.setBounds({ x: 0, y: 60, width: 800, height: height || 600 });
|
view.setBounds({ x: 0, y: 60, width: 800, height: height || 600 });
|
||||||
|
@ -1,26 +1,24 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import path from "path";
|
import path from 'path';
|
||||||
import fs from "fs";
|
import fs from 'fs';
|
||||||
import { PLUGIN_INSTALL_DIR } from "@/common/constans/main";
|
import { PLUGIN_INSTALL_DIR } from '@/common/constans/main';
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
// 读取所有插件
|
// 读取所有插件
|
||||||
const totalPlugins = global.LOCAL_PLUGINS.getLocalPlugins();
|
const totalPlugins = global.LOCAL_PLUGINS.getLocalPlugins();
|
||||||
let systemPlugins = totalPlugins.filter((plugin) => plugin.pluginType === "system");
|
let systemPlugins = totalPlugins.filter(
|
||||||
|
(plugin) => plugin.pluginType === 'system'
|
||||||
|
);
|
||||||
systemPlugins = systemPlugins.map((plugin) => {
|
systemPlugins = systemPlugins.map((plugin) => {
|
||||||
const pluginPath = path.resolve(
|
const pluginPath = path.resolve(
|
||||||
PLUGIN_INSTALL_DIR,
|
PLUGIN_INSTALL_DIR,
|
||||||
"node_modules",
|
'node_modules',
|
||||||
plugin.name
|
plugin.name
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
...plugin,
|
...plugin,
|
||||||
indexPath: path.join(
|
indexPath: path.join(pluginPath, './', plugin.entry),
|
||||||
pluginPath,
|
};
|
||||||
"./",
|
|
||||||
plugin.entry
|
|
||||||
),
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const hooks = {
|
const hooks = {
|
||||||
@ -39,14 +37,14 @@ export default () => {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
hooks.onReady.forEach((hook: any) => {
|
hooks.onReady.forEach((hook: any) => {
|
||||||
try {
|
try {
|
||||||
hook(ctx);
|
hook && hook(ctx);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
triggerReadyHooks
|
triggerReadyHooks,
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
29
yarn.lock
29
yarn.lock
@ -1423,6 +1423,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/semver@^7.3.6":
|
||||||
|
version "7.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a"
|
||||||
|
integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==
|
||||||
|
|
||||||
"@types/semver@^7.3.9":
|
"@types/semver@^7.3.9":
|
||||||
version "7.3.10"
|
version "7.3.10"
|
||||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.10.tgz#5f19ee40cbeff87d916eedc8c2bfe2305d957f73"
|
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.10.tgz#5f19ee40cbeff87d916eedc8c2bfe2305d957f73"
|
||||||
@ -4685,6 +4690,20 @@ electron-to-chromium@^1.4.202:
|
|||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.211.tgz#afaa8b58313807501312d598d99b953568d60f91"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.211.tgz#afaa8b58313807501312d598d99b953568d60f91"
|
||||||
integrity sha512-BZSbMpyFQU0KBJ1JG26XGeFI3i4op+qOYGxftmZXFZoHkhLgsSv4DHDJfl8ogII3hIuzGt51PaZ195OVu0yJ9A==
|
integrity sha512-BZSbMpyFQU0KBJ1JG26XGeFI3i4op+qOYGxftmZXFZoHkhLgsSv4DHDJfl8ogII3hIuzGt51PaZ195OVu0yJ9A==
|
||||||
|
|
||||||
|
electron-updater@^4.6.5:
|
||||||
|
version "4.6.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.6.5.tgz#e9a75458bbfd6bb41a58a829839e150ad2eb2d3d"
|
||||||
|
integrity sha512-kdTly8O9mSZfm9fslc1mnCY+mYOeaYRy7ERa2Fed240u01BKll3aiupzkd07qKw69KvhBSzuHroIW3mF0D8DWA==
|
||||||
|
dependencies:
|
||||||
|
"@types/semver" "^7.3.6"
|
||||||
|
builder-util-runtime "8.9.2"
|
||||||
|
fs-extra "^10.0.0"
|
||||||
|
js-yaml "^4.1.0"
|
||||||
|
lazy-val "^1.0.5"
|
||||||
|
lodash.escaperegexp "^4.1.2"
|
||||||
|
lodash.isequal "^4.5.0"
|
||||||
|
semver "^7.3.5"
|
||||||
|
|
||||||
electron@^13.0.0:
|
electron@^13.0.0:
|
||||||
version "13.6.9"
|
version "13.6.9"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-13.6.9.tgz#7bd83cc1662ceaaa09dcd132a7b507cec888b028"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-13.6.9.tgz#7bd83cc1662ceaaa09dcd132a7b507cec888b028"
|
||||||
@ -7399,6 +7418,16 @@ lodash.defaultsdeep@^4.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"
|
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"
|
||||||
integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==
|
integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==
|
||||||
|
|
||||||
|
lodash.escaperegexp@^4.1.2:
|
||||||
|
version "4.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347"
|
||||||
|
integrity sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==
|
||||||
|
|
||||||
|
lodash.isequal@^4.5.0:
|
||||||
|
version "4.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
|
||||||
|
integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==
|
||||||
|
|
||||||
lodash.kebabcase@^4.1.1:
|
lodash.kebabcase@^4.1.1:
|
||||||
version "4.1.1"
|
version "4.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
|
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user