feat(webui): finish redesign dashboard task and secret settings
This commit is contained in:
42 files changed
+1090
-502
No files matched your search
@@ -23,6 +23,7 @@ import { statusLabel } from "@/lib/task-meta";
|
||||
* read when the palette opens, so it never shows a stale list for long.
|
||||
*/
|
||||
const props = defineProps<{ hidden: string[] }>();
|
||||
const emit = defineEmits<{ newTask: [] }>();
|
||||
|
||||
const router = useRouter();
|
||||
const open = ref(false);
|
||||
@@ -61,6 +62,11 @@ function go(path: string): void {
|
||||
void router.push(path);
|
||||
}
|
||||
|
||||
function newTask(): void {
|
||||
open.value = false;
|
||||
emit("newTask");
|
||||
}
|
||||
|
||||
// '/' opens only when the keystroke was not meant for a field.
|
||||
function isEditableTarget(event: KeyboardEvent): boolean {
|
||||
const el = event.target;
|
||||
@@ -100,6 +106,9 @@ onUnmounted(() => document.removeEventListener("keydown", onGlobalKeydown));
|
||||
<CommandInput placeholder="Find a page, task or workflow" />
|
||||
<CommandList>
|
||||
<CommandEmpty>No matches.</CommandEmpty>
|
||||
<CommandGroup v-if="showWorkflows" heading="Actions">
|
||||
<CommandItem value="New task" @select="newTask">New task</CommandItem>
|
||||
</CommandGroup>
|
||||
<CommandGroup heading="Pages">
|
||||
<CommandItem
|
||||
v-for="entry in pages"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import AlertsBell from "@/alerts/AlertsBell.vue";
|
||||
import CommandPalette from "@/components/command-palette/CommandPalette.vue";
|
||||
import NewTaskButton from "@/tasks/NewTaskButton.vue";
|
||||
@@ -8,6 +9,7 @@ import Nav from "./Nav.vue";
|
||||
import ProfileDropdown from "./ProfileDropdown.vue";
|
||||
|
||||
const props = defineProps<{ hidden: string[] }>();
|
||||
const newTaskOpen = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -18,8 +20,8 @@ const props = defineProps<{ hidden: string[] }>();
|
||||
<Nav :hidden="props.hidden" />
|
||||
<div class="flex shrink-0 items-center gap-2">
|
||||
<ConnectionPill />
|
||||
<CommandPalette :hidden="props.hidden" />
|
||||
<NewTaskButton v-if="!props.hidden.includes('/workflows')" />
|
||||
<CommandPalette :hidden="props.hidden" @new-task="newTaskOpen = true" />
|
||||
<NewTaskButton v-if="!props.hidden.includes('/workflows')" v-model:open="newTaskOpen" />
|
||||
<AlertsBell />
|
||||
<ProfileDropdown />
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user