2
0
mirror of https://github.com/frappe/books.git synced 2024-11-13 00:46:28 +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" :style="sidebarBackground"
> >
<div class="window-no-drag"> <div class="window-no-drag">
<WindowControls <WindowControls v-if="platform === 'Mac'" class="px-3 mb-6" />
v-if="platform === 'Mac'"
class="px-3 mb-6"
:buttons="['close', 'minimize']"
/>
<div class="px-3"> <div class="px-3">
<h6 class="text-base font-semibold" @click="$router.push('/')"> <h6 class="text-base font-semibold" @click="$router.push('/')">
{{ companyName }} {{ companyName }}

View File

@ -32,8 +32,11 @@ export default {
methods: { methods: {
action(name) { action(name) {
if (this.buttons.includes(name)) { if (this.buttons.includes(name)) {
this.$emit(name);
let window = electron.remote.getCurrentWindow(); let window = electron.remote.getCurrentWindow();
if (name === 'maximize' && window.isMaximized()) {
name = 'unmaximize';
}
this.$emit(name);
window[name](); window[name]();
} }
}, },