fix: re-add minimise button

This commit is contained in:
DecDuck
2025-05-10 14:22:21 +10:00
parent b0b1e397b1
commit fed3e08dce
3 changed files with 13 additions and 7 deletions

View File

@ -42,7 +42,7 @@
</ol>
</div>
</div>
<WindowControl class="h-16 w-16 p-4" />
<WindowControl />
</div>
</template>

View File

@ -1,5 +1,5 @@
<template>
<button class="transition h-10 w-10 text-zinc-300 hover:bg-zinc-800 hover:text-zinc-100 p-2">
<button class="transition h-full aspect-square text-zinc-300 hover:bg-zinc-800 hover:text-zinc-100 p-[1.1rem]">
<slot />
</button>
</template>

View File

@ -1,4 +1,7 @@
<template>
<HeaderButton v-if="showMinimise" @click="() => minimise()">
<MinusIcon />
</HeaderButton>
<HeaderButton @click="() => close()">
<XMarkIcon />
</HeaderButton>
@ -8,11 +11,14 @@
import { MinusIcon, XMarkIcon } from "@heroicons/vue/16/solid";
import { getCurrentWindow } from "@tauri-apps/api/window";
async function close(){
console.log(window);
const result = await window.close();
console.log(`closed window: ${result}`);
const window = getCurrentWindow();
const showMinimise = await window.isMinimizable();
async function close() {
await window.close();
}
const window = getCurrentWindow();
async function minimise() {
await window.minimize();
}
</script>