52 lines
1.8 KiB
Vue
52 lines
1.8 KiB
Vue
<script setup lang="ts">
|
|
import { ArrowRight } from "@lucide/vue";
|
|
|
|
import { computed } from "vue";
|
|
|
|
import PageHeader from "@/base/PageHeader.vue";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Card, CardHeader, CardTitle } from "@/components/ui/card";
|
|
import { hiddenPaths } from "@/lib/nav";
|
|
import { useSessionStore } from "@/stores/session";
|
|
|
|
/**
|
|
* The organisation home: where each kind of organisation configuration lives,
|
|
* linked, so an operator can reach the thing a run needs without guessing
|
|
* which page owns it. It states no readiness of its own -- a saved value is
|
|
* not proof a run will work, and that answer belongs to the service that
|
|
* consumes it.
|
|
*/
|
|
const allAreas = [
|
|
{ title: "Execution identities", to: "/org/agents" },
|
|
{ title: "Connections", to: "/org/connections" },
|
|
{ title: "Models", to: "/org/models" },
|
|
{ title: "Schedules and playbooks", to: "/org/schedules" },
|
|
{ title: "Members and access", to: "/org/members" },
|
|
];
|
|
const session = useSessionStore();
|
|
const areas = computed(() => {
|
|
const hidden = hiddenPaths(session.sections);
|
|
return allAreas.filter((area) => !hidden.includes(area.to));
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<PageHeader title="Organisation">
|
|
<Button as-child>
|
|
<RouterLink to="/tasks">Start a task<ArrowRight data-icon="inline-end" /></RouterLink>
|
|
</Button>
|
|
</PageHeader>
|
|
|
|
<div class="grid gap-3 sm:grid-cols-2">
|
|
<RouterLink v-for="area in areas" :key="area.to" :to="area.to" class="focus-visible:outline-2 focus-visible:outline-ring">
|
|
<Card size="sm" class="h-full transition-colors hover:border-primary/40">
|
|
<CardHeader>
|
|
<CardTitle>{{ area.title }}</CardTitle>
|
|
</CardHeader>
|
|
</Card>
|
|
</RouterLink>
|
|
</div>
|
|
</div>
|
|
</template>
|