Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
5231e70b7c
commit
224b4edcad
@@ -181,7 +181,16 @@ function WorkflowsPage() {
|
||||
selected?.id === t.id ? "bg-accent" : ""
|
||||
}`}
|
||||
>
|
||||
<div className="font-medium text-sm">{t.name}</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<div className="font-medium text-sm truncate">{t.name}</div>
|
||||
<span className={`text-[10px] px-1.5 py-0.5 rounded shrink-0 ${
|
||||
t.kind === "collection"
|
||||
? "bg-amber-500/15 text-amber-700 dark:text-amber-300"
|
||||
: "bg-blue-500/15 text-blue-700 dark:text-blue-300"
|
||||
}`}>
|
||||
{t.kind === "collection" ? "Collection" : "Task"}
|
||||
</span>
|
||||
</div>
|
||||
{t.description && <div className="text-xs text-muted-foreground truncate">{t.description}</div>}
|
||||
</button>
|
||||
))}
|
||||
@@ -195,16 +204,31 @@ function WorkflowsPage() {
|
||||
</div>
|
||||
) : (
|
||||
<div className="rounded-md border bg-card">
|
||||
<div className="px-4 py-3 border-b flex items-center justify-between">
|
||||
<div>
|
||||
<div className="font-semibold">{selected.name}</div>
|
||||
<div className="px-4 py-3 border-b flex items-center justify-between gap-3">
|
||||
<div className="min-w-0">
|
||||
<div className="font-semibold truncate">{selected.name}</div>
|
||||
{selected.description && (
|
||||
<div className="text-xs text-muted-foreground">{selected.description}</div>
|
||||
<div className="text-xs text-muted-foreground truncate">{selected.description}</div>
|
||||
)}
|
||||
</div>
|
||||
<Button variant="ghost" size="sm" onClick={() => deleteTemplate(selected.id)}>
|
||||
<Trash2 className="h-3.5 w-3.5 text-destructive" />
|
||||
</Button>
|
||||
<div className="flex items-center gap-2 shrink-0">
|
||||
<Label className="text-xs text-muted-foreground">Type</Label>
|
||||
<Select
|
||||
value={selected.kind}
|
||||
onValueChange={(v) => updateTemplateKind(selected.id, v as "task" | "collection")}
|
||||
>
|
||||
<SelectTrigger className="w-36 h-8">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="task">Task workflow</SelectItem>
|
||||
<SelectItem value="collection">Collection workflow</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button variant="ghost" size="sm" onClick={() => deleteTemplate(selected.id)}>
|
||||
<Trash2 className="h-3.5 w-3.5 text-destructive" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="divide-y">
|
||||
{tasks.map((t) => (
|
||||
|
||||
Reference in New Issue
Block a user