feat(ui): start tasks from the dashboard and slim it to activity and setup

This commit is contained in:
sam committed 2026-10-14 23:28:37 +11:00
1 parent c1554d63c0
commit 88ef6ca5b2
23 files changed
+297 -487

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
<script setup lang="ts">
import { useRouter } from "vue-router";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import NewTaskForm from "./NewTaskForm.vue";
const props = defineProps<{ workflow?: string; instructions?: string }>();
const router = useRouter();
const open = defineModel<boolean>("open", { default: false });
function started(taskId: number) {
open.value = false;
void router.push(`/tasks/${taskId}`);
}
</script>
<template>
<Dialog v-model:open="open">
<DialogContent class="sm:max-w-[640px]">
<DialogHeader>
<DialogTitle>New task</DialogTitle>
</DialogHeader>
<NewTaskForm
v-if="open"
:initial-workflow="props.workflow"
:initial-instructions="props.instructions"
@started="started"
@cancel="open = false"
/>
</DialogContent>
</Dialog>
</template>