mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-10 04:22:13 +10:00
25 lines
554 B
Vue
25 lines
554 B
Vue
<template>
|
|
<HeaderButton v-if="showMinimise" @click="() => minimise()">
|
|
<MinusIcon />
|
|
</HeaderButton>
|
|
<HeaderButton @click="() => close()">
|
|
<XMarkIcon />
|
|
</HeaderButton>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { MinusIcon, XMarkIcon } from "@heroicons/vue/16/solid";
|
|
import { getCurrentWindow } from "@tauri-apps/api/window";
|
|
|
|
const window = getCurrentWindow();
|
|
const showMinimise = await window.isMinimizable();
|
|
|
|
async function close() {
|
|
await window.close();
|
|
}
|
|
|
|
async function minimise() {
|
|
await window.minimize();
|
|
}
|
|
</script>
|