feat(download widget): download widget and queue fix

This commit is contained in:
DecDuck
2024-12-08 12:33:45 +11:00
parent 5cbeb3bdb6
commit 532d13e96f
9 changed files with 85 additions and 45 deletions

View File

@ -1,53 +1,58 @@
<template>
<div
class="h-16 bg-zinc-950 flex flex-row justify-between"
>
<div class="h-16 bg-zinc-950 flex flex-row justify-between">
<div class="flex flex-row grow items-center pl-5 pr-2 py-3">
<div class="inline-flex items-center gap-x-10">
<NuxtLink to="/store">
<Wordmark class="h-8 mb-0.5"/>
<Wordmark class="h-8 mb-0.5" />
</NuxtLink>
<nav class="inline-flex items-center mt-0.5">
<ol class="inline-flex items-center gap-x-6">
<NuxtLink
v-for="(nav, navIdx) in navigation"
:class="[
v-for="(nav, navIdx) in navigation"
:class="[
'transition uppercase font-display font-semibold text-md',
navIdx === currentPageIndex
? 'text-zinc-100'
: 'text-zinc-400 hover:text-zinc-200',
]"
:href="nav.route"
:href="nav.route"
>
{{ nav.label }}
</NuxtLink>
</ol>
</nav>
</div>
<div @mousedown="() => window.startDragging()" class="flex cursor-pointer grow h-full" />
<div
@mousedown="() => window.startDragging()"
class="flex cursor-pointer grow h-full"
/>
<div class="inline-flex items-center">
<ol class="inline-flex gap-3">
<HeaderQueueWidget
v-if="currentQueueObject"
:object="currentQueueObject"
/>
<li v-for="(item, itemIdx) in quickActions">
<HeaderWidget
@click="item.action"
:notifications="item.notifications"
@click="item.action"
:notifications="item.notifications"
>
<component class="h-5" :is="item.icon"/>
<component class="h-5" :is="item.icon" />
</HeaderWidget>
</li>
<HeaderUserWidget/>
<HeaderUserWidget />
</ol>
</div>
</div>
<WindowControl class="h-16 w-16 p-4"/>
<WindowControl class="h-16 w-16 p-4" />
</div>
</template>
<script setup lang="ts">
import {BellIcon, UserGroupIcon} from "@heroicons/vue/16/solid";
import type {NavigationItem, QuickActionNav} from "../types";
import { BellIcon, UserGroupIcon } from "@heroicons/vue/16/solid";
import type { NavigationItem, QuickActionNav } from "../types";
import HeaderWidget from "./HeaderWidget.vue";
import {getCurrentWindow} from "@tauri-apps/api/window";
import { getCurrentWindow } from "@tauri-apps/api/window";
const window = getCurrentWindow();
@ -79,13 +84,14 @@ const currentPageIndex = useCurrentNavigationIndex(navigation);
const quickActions: Array<QuickActionNav> = [
{
icon: UserGroupIcon,
action: async () => {
},
action: async () => {},
},
{
icon: BellIcon,
action: async () => {
},
action: async () => {},
},
];
const queue = useQueueState();
const currentQueueObject = computed(() => queue.value.queue.at(0));
</script>