From 51fc57efe8e96e56bc623b6a1032833ebcf23ddc Mon Sep 17 00:00:00 2001 From: "Mr. Will" Date: Fri, 12 Feb 2021 12:03:01 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=20Windows=20=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B2=89=E6=B5=B8=E5=BC=8F=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E6=A0=8F=20(#277)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/background.js | 9 ++- src/components/Navbar.vue | 118 ++++++++++++++++++++++++++++++++++++ src/electron/ipcMain.js | 8 +++ src/electron/ipcRenderer.js | 4 ++ src/main.js | 4 ++ yarn.lock | 5 ++ 7 files changed, 147 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d56130a..4240245 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "register-service-worker": "^1.7.1", "svg-sprite-loader": "^5.0.0", "tunnel": "^0.0.6", + "vscode-codicons": "^0.0.14", "vue": "^2.6.11", "vue-analytics": "^5.22.1", "vue-electron": "^1.0.6", diff --git a/src/background.js b/src/background.js index 3f46503..ec11712 100644 --- a/src/background.js +++ b/src/background.js @@ -88,15 +88,20 @@ class Background { createWindow() { console.log("creating app window"); + // Only for Windows, a special title bar for it + const withoutFrame = process.platform == "win32"; + this.window = new BrowserWindow({ width: this.store.get("window.width") | 1440, height: this.store.get("window.height") | 840, - minWidth: 1080, - minHeight: 720, + minWidth: 360, + minHeight: 240, titleBarStyle: "hiddenInset", + frame: !withoutFrame, webPreferences: { webSecurity: false, nodeIntegration: true, + enableRemoteModule: true, }, }); diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 20e6f6a..dbc4dc1 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -1,5 +1,26 @@