From 2212b007ee4cdb5f1e116b99b46f17dcb220b53f Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 16 Dec 2019 17:26:53 +0530 Subject: [PATCH] fix: Enable maximise button in Mac --- src/components/Sidebar.vue | 6 +----- src/components/WindowControls.vue | 5 ++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 1d86f78e..5096f429 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -4,11 +4,7 @@ :style="sidebarBackground" >
- +
{{ companyName }} diff --git a/src/components/WindowControls.vue b/src/components/WindowControls.vue index 368af1fa..81cb596f 100644 --- a/src/components/WindowControls.vue +++ b/src/components/WindowControls.vue @@ -32,8 +32,11 @@ export default { methods: { action(name) { if (this.buttons.includes(name)) { - this.$emit(name); let window = electron.remote.getCurrentWindow(); + if (name === 'maximize' && window.isMaximized()) { + name = 'unmaximize'; + } + this.$emit(name); window[name](); } },