Files
archie/ui/src/tasks/NewTaskButton.vue
T
sam 8278e76266 fix(webui): cut help text to the facts a label cannot carry
Drops every page subtitle and the hints that restated their label; the
rest become a few words ('Empty: truncate.', '0 = no limit.'). Empty states
and notes shrink the same way.
2026-09-25 17:42:29 +10:00

38 lines
926 B
Vue

<script setup lang="ts">
import { ref } from "vue";
import { useRouter } from "vue-router";
import { Plus } from "@lucide/vue";
import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import NewTaskForm from "./NewTaskForm.vue";
const router = useRouter();
const open = ref(false);
function started(taskId: number) {
open.value = false;
void router.push(`/tasks/${taskId}`);
}
</script>
<template>
<Dialog v-model:open="open">
<DialogTrigger as-child>
<Button size="sm"><Plus data-icon="inline-start" /> New task</Button>
</DialogTrigger>
<DialogContent class="sm:max-w-[640px]">
<DialogHeader>
<DialogTitle>New task</DialogTitle>
</DialogHeader>
<NewTaskForm v-if="open" @started="started" @cancel="open = false" />
</DialogContent>
</Dialog>
</template>