mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2026-07-25 01:13:57 +10:00
fixed windows issues
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div
|
||||
@mousedown="() => window.startDragging()"
|
||||
class="h-16 cursor-pointer bg-gray-950 flex flex-row justify-between"
|
||||
>
|
||||
<div class="flex flex-row grow items-center justify-between pl-5 pr-2 py-3">
|
||||
<div class="h-16 cursor-pointer bg-gray-950 flex flex-row justify-between">
|
||||
<div
|
||||
@mousedown="() => window.startDragging()"
|
||||
class="flex flex-row grow items-center justify-between pl-5 pr-2 py-3"
|
||||
>
|
||||
<div class="inline-flex items-center gap-x-10">
|
||||
<Wordmark class="h-8 mb-0.5" />
|
||||
<nav class="inline-flex items-center mt-0.5">
|
||||
|
||||
@@ -38,15 +38,16 @@
|
||||
<div class="h-0.5 rounded-full w-full bg-zinc-800" />
|
||||
<div class="flex flex-col mb-1">
|
||||
<MenuItem v-slot="{ active }">
|
||||
<NuxtLink
|
||||
@click="() => openAdminUrl()"
|
||||
<a
|
||||
:href="adminUrl"
|
||||
target="_blank"
|
||||
:class="[
|
||||
active ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400',
|
||||
'transition block px-4 py-2 text-sm',
|
||||
]"
|
||||
>
|
||||
Admin Dashboard
|
||||
</NuxtLink>
|
||||
</a>
|
||||
</MenuItem>
|
||||
<MenuItem v-for="(nav, navIdx) in navigation" v-slot="{ active }">
|
||||
<NuxtLink
|
||||
@@ -82,10 +83,6 @@ const adminUrl: string = await invoke("gen_drop_url", {
|
||||
path: "/admin",
|
||||
});
|
||||
|
||||
async function openAdminUrl() {
|
||||
await invoke("open_url", { path: adminUrl });
|
||||
}
|
||||
|
||||
const navigation: NavigationItem[] = [
|
||||
{
|
||||
label: "Account settings",
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<div
|
||||
@mousedown="() => window.startDragging()"
|
||||
class="h-10 cursor-pointer flex flex-row items-center justify-between bg-zinc-950"
|
||||
>
|
||||
<div class="px-5 py-3">
|
||||
<div class="px-5 py-3" @mousedown="() => window.startDragging()">
|
||||
<Wordmark class="mt-1" />
|
||||
</div>
|
||||
<WindowControl />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<HeaderButton @click="() => window.close()">
|
||||
<HeaderButton @click="() => close()">
|
||||
<XMarkIcon />
|
||||
</HeaderButton>
|
||||
</template>
|
||||
@@ -8,5 +8,11 @@
|
||||
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();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user