From e436aefc6613240179ed10d5680e3a13c7fab01c Mon Sep 17 00:00:00 2001 From: Shatyuka <958182453@qq.com> Date: Tue, 18 May 2021 19:12:51 +0800 Subject: [PATCH] feat: add vibrancy sidebar for macos --- package.json | 2 +- src/main/ui/WindowManager.js | 6 ++++-- src/renderer/components/Aside/Index.vue | 14 +++++++++++++- src/renderer/pages/index/main.js | 2 -- yarn.lock | 8 ++++---- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 826cee18d..428430eb9 100644 --- a/package.json +++ b/package.json @@ -240,7 +240,7 @@ "css-loader": "^5.2.4", "css-minimizer-webpack-plugin": "^3.0.0", "del": "^6.0.0", - "electron": "^11.4.5", + "electron": "^11.4.7", "electron-builder": "22.10.5", "electron-builder-notarize": "^1.2.0", "electron-devtools-installer": "^3.2.0", diff --git a/src/main/ui/WindowManager.js b/src/main/ui/WindowManager.js index b0c52ff2a..2faebffd7 100644 --- a/src/main/ui/WindowManager.js +++ b/src/main/ui/WindowManager.js @@ -11,6 +11,9 @@ const defaultBrowserOptions = { show: false, width: 1024, height: 768, + vibrancy: 'ultra-dark', + visualEffectState: 'active', + backgroundColor: is.macOS() ? '#00000000' : '#FFF', webPreferences: { nodeIntegration: true } @@ -87,8 +90,7 @@ export default class WindowManager extends EventEmitter { contextIsolation: false, nodeIntegration: true, nodeIntegrationInWorker: true - }, - hasShadow: !is.macOS() + } }) const bounds = this.getPageBounds(page) diff --git a/src/renderer/components/Aside/Index.vue b/src/renderer/components/Aside/Index.vue index 992594529..dc772f09a 100644 --- a/src/renderer/components/Aside/Index.vue +++ b/src/renderer/components/Aside/Index.vue @@ -1,5 +1,5 @@