mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-08 19:54:05 +08:00
commit
7db7b9e391
@ -1,2 +1,4 @@
|
|||||||
export const WINDOW_WIDTH = 688;
|
export const WINDOW_WIDTH = 688;
|
||||||
export const WINDOW_HEIGHT = 60;
|
export const WINDOW_HEIGHT = 60;
|
||||||
|
|
||||||
|
export const WINDOW_MIN_HEIGHT = 60;
|
||||||
|
@ -69,8 +69,7 @@ function fileDisplay(filePath) {
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
!appDetail.target ||
|
!appDetail.target ||
|
||||||
appDetail.target.toLowerCase().indexOf('unin') >= 0 ||
|
appDetail.target.toLowerCase().indexOf('unin') >= 0
|
||||||
appDetail.args
|
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { BrowserWindow, ipcMain, nativeTheme } from 'electron';
|
import { BrowserWindow, ipcMain, nativeTheme } from 'electron';
|
||||||
import localConfig from '../common/initLocalConfig';
|
import localConfig from '../common/initLocalConfig';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { WINDOW_MIN_HEIGHT } from '@/common/constans/common';
|
||||||
export default () => {
|
export default () => {
|
||||||
let win: any;
|
let win: any;
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ export default () => {
|
|||||||
const createWindow = async (pluginInfo, viewInfo, view) => {
|
const createWindow = async (pluginInfo, viewInfo, view) => {
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
height: viewInfo.height,
|
height: viewInfo.height,
|
||||||
|
minHeight: WINDOW_MIN_HEIGHT,
|
||||||
width: viewInfo.width,
|
width: viewInfo.width,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
titleBarStyle: 'hidden',
|
titleBarStyle: 'hidden',
|
||||||
@ -36,6 +38,7 @@ export default () => {
|
|||||||
webviewTag: true,
|
webviewTag: true,
|
||||||
devTools: true,
|
devTools: true,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
spellcheck: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { BrowserWindow, ipcMain, nativeTheme, screen } from 'electron';
|
import { BrowserWindow, ipcMain, nativeTheme, screen } from 'electron';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { WINDOW_HEIGHT, WINDOW_MIN_HEIGHT, WINDOW_WIDTH } from '@/common/constans/common';
|
||||||
|
|
||||||
const getWindowPos = (width, height) => {
|
const getWindowPos = (width, height) => {
|
||||||
const screenPoint = screen.getCursorScreenPoint();
|
const screenPoint = screen.getCursorScreenPoint();
|
||||||
@ -39,8 +40,9 @@ export default () => {
|
|||||||
enableLargerThanScreen: true,
|
enableLargerThanScreen: true,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
width: 800,
|
width: WINDOW_WIDTH,
|
||||||
height: 600,
|
height: WINDOW_HEIGHT,
|
||||||
|
minHeight: WINDOW_MIN_HEIGHT,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webSecurity: false,
|
webSecurity: false,
|
||||||
backgroundThrottling: false,
|
backgroundThrottling: false,
|
||||||
@ -48,6 +50,7 @@ export default () => {
|
|||||||
webviewTag: true,
|
webviewTag: true,
|
||||||
devTools: true,
|
devTools: true,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
spellcheck: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||||
|
@ -3,7 +3,7 @@ import path from 'path';
|
|||||||
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib';
|
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib';
|
||||||
// import versonHandler from '../common/versionHandler';
|
// import versonHandler from '../common/versionHandler';
|
||||||
import localConfig from '@/main/common/initLocalConfig';
|
import localConfig from '@/main/common/initLocalConfig';
|
||||||
import { WINDOW_HEIGHT, WINDOW_WIDTH } from '@/common/constans/common';
|
import { WINDOW_HEIGHT, WINDOW_MIN_HEIGHT, WINDOW_WIDTH } from '@/common/constans/common';
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
require('@electron/remote/main').initialize();
|
require('@electron/remote/main').initialize();
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ export default () => {
|
|||||||
const createWindow = async () => {
|
const createWindow = async () => {
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
height: WINDOW_HEIGHT,
|
height: WINDOW_HEIGHT,
|
||||||
|
minHeight: WINDOW_MIN_HEIGHT,
|
||||||
useContentSize: true,
|
useContentSize: true,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
width: WINDOW_WIDTH,
|
width: WINDOW_WIDTH,
|
||||||
@ -34,6 +35,7 @@ export default () => {
|
|||||||
webviewTag: true,
|
webviewTag: true,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
preload: path.join(__static, 'preload.js'),
|
preload: path.join(__static, 'preload.js'),
|
||||||
|
spellcheck: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
if (process.env.WEBPACK_DEV_SERVER_URL) {
|
||||||
|
@ -128,6 +128,7 @@ export default () => {
|
|||||||
standard: 'system-ui',
|
standard: 'system-ui',
|
||||||
serif: 'system-ui',
|
serif: 'system-ui',
|
||||||
},
|
},
|
||||||
|
spellcheck: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
window.setBrowserView(view);
|
window.setBrowserView(view);
|
||||||
|
@ -93,6 +93,7 @@ const emit = defineEmits([
|
|||||||
'focus',
|
'focus',
|
||||||
'clearSearchValue',
|
'clearSearchValue',
|
||||||
'readClipboardContent',
|
'readClipboardContent',
|
||||||
|
'clearClipbord',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const keydownEvent = (e, key: string) => {
|
const keydownEvent = (e, key: string) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user