This commit is contained in:
muwoo
2023-07-31 17:45:22 +08:00
parent cc6098258c
commit 5946e06693
9 changed files with 61 additions and 26 deletions

View File

@@ -1,12 +1,12 @@
export default {
version: 9,
version: 11,
perf: {
custom: {
primaryColor: '#106898',
primaryColor: '#ff4ea4',
errorColor: '#ed6d46',
warningColor: '#e5a84b',
successColor: '#c0d695',
infoColor: '#007175',
infoColor: '#aa8eeB',
logo: `file://${__static}/logo.png`,
placeholder: '你好 rubick',
},

View File

@@ -13,6 +13,7 @@ export default () => {
width: viewInfo.width,
autoHideMenuBar: true,
titleBarStyle: 'hidden',
titleBarOverlay: true,
trafficLightPosition: { x: 12, y: 21 },
title: pluginInfo.pluginName,
resizable: true,
@@ -44,6 +45,11 @@ export default () => {
});
win.once('ready-to-show', () => {
const darkMode = global.OP_CONFIG.get().perf.common.darkMode;
darkMode &&
win.webContents.executeJavaScript(
`document.body.classList.add("dark");window.rubick.theme="dark"`
);
win.setBrowserView(view);
win.webContents.executeJavaScript(
`window.initDetach(${JSON.stringify(pluginInfo)})`