mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-09 12:24:09 +08:00
✨ 支持网页快开插件
This commit is contained in:
parent
9663232864
commit
562a13fdff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rubick",
|
"name": "rubick",
|
||||||
"version": "4.1.2",
|
"version": "4.1.3",
|
||||||
"author": "muwoo <2424880409@qq.com>",
|
"author": "muwoo <2424880409@qq.com>",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export const WINDOW_WIDTH = 688;
|
export const WINDOW_WIDTH = 688;
|
||||||
export const WINDOW_HEIGHT = 60;
|
export const WINDOW_HEIGHT = 60;
|
||||||
|
export const WINDOW_PLUGIN_HEIGHT = 600;
|
||||||
|
|
||||||
export const GUIDE_WIDTH = 800;
|
export const GUIDE_WIDTH = 800;
|
||||||
export const GUIDE_HEIGHT = 600;
|
export const GUIDE_HEIGHT = 600;
|
||||||
|
@ -3,6 +3,11 @@ import path from 'path';
|
|||||||
import commonConst from '../../common/utils/commonConst';
|
import commonConst from '../../common/utils/commonConst';
|
||||||
import { PLUGIN_INSTALL_DIR as baseDir } from '@/common/constans/main';
|
import { PLUGIN_INSTALL_DIR as baseDir } from '@/common/constans/main';
|
||||||
import localConfig from '@/main/common/initLocalConfig';
|
import localConfig from '@/main/common/initLocalConfig';
|
||||||
|
import {
|
||||||
|
WINDOW_HEIGHT,
|
||||||
|
WINDOW_PLUGIN_HEIGHT,
|
||||||
|
WINDOW_WIDTH,
|
||||||
|
} from '@/common/constans/common';
|
||||||
|
|
||||||
const getRelativePath = (indexPath) => {
|
const getRelativePath = (indexPath) => {
|
||||||
return commonConst.windows()
|
return commonConst.windows()
|
||||||
@ -57,8 +62,13 @@ export default () => {
|
|||||||
const viewReadyFn = async (window, { pluginSetting, ext }) => {
|
const viewReadyFn = async (window, { pluginSetting, ext }) => {
|
||||||
if (!view) return;
|
if (!view) return;
|
||||||
const height = pluginSetting && pluginSetting.height;
|
const height = pluginSetting && pluginSetting.height;
|
||||||
window.setSize(800, height || 600);
|
window.setSize(WINDOW_WIDTH, height || WINDOW_PLUGIN_HEIGHT);
|
||||||
view.setBounds({ x: 0, y: 60, width: 800, height: height || 540 });
|
view.setBounds({
|
||||||
|
x: 0,
|
||||||
|
y: WINDOW_HEIGHT,
|
||||||
|
width: WINDOW_WIDTH,
|
||||||
|
height: height || WINDOW_PLUGIN_HEIGHT - WINDOW_HEIGHT,
|
||||||
|
});
|
||||||
view.setAutoResize({ width: true, height: true });
|
view.setAutoResize({ width: true, height: true });
|
||||||
executeHooks('PluginEnter', ext);
|
executeHooks('PluginEnter', ext);
|
||||||
executeHooks('PluginReady', ext);
|
executeHooks('PluginReady', ext);
|
||||||
|
@ -78,13 +78,13 @@ getPluginInfo({
|
|||||||
|
|
||||||
watch([options, pluginHistory, currentPlugin], () => {
|
watch([options, pluginHistory, currentPlugin], () => {
|
||||||
currentSelect.value = 0;
|
currentSelect.value = 0;
|
||||||
// if (currentPlugin.value.name) return;
|
if (currentPlugin.value.name) return;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
ipcRenderer.sendSync('msg-trigger', {
|
ipcRenderer.sendSync('msg-trigger', {
|
||||||
type: 'setExpendHeight',
|
type: 'setExpendHeight',
|
||||||
data: getWindowHeight(
|
data: getWindowHeight(
|
||||||
options.value,
|
options.value,
|
||||||
(pluginLoading.value || currentPlugin.value.name) ? [] : pluginHistory.value
|
(pluginLoading.value) ? [] : pluginHistory.value
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user