2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: Enable maximise button in Mac

This commit is contained in:
Faris Ansari 2019-12-16 17:26:53 +05:30
parent 2db4484ab2
commit 2212b007ee
2 changed files with 5 additions and 6 deletions

View File

@ -4,11 +4,7 @@
:style="sidebarBackground"
>
<div class="window-no-drag">
<WindowControls
v-if="platform === 'Mac'"
class="px-3 mb-6"
:buttons="['close', 'minimize']"
/>
<WindowControls v-if="platform === 'Mac'" class="px-3 mb-6" />
<div class="px-3">
<h6 class="text-base font-semibold" @click="$router.push('/')">
{{ companyName }}

View File

@ -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]();
}
},