KI-AGENT: Zentralen Push-Server Stack ergänzen
This commit is contained in:
31
push-server/apps/admin/components/AdminShell.vue
Normal file
31
push-server/apps/admin/components/AdminShell.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<script setup lang="ts">
|
||||
const route = useRoute();
|
||||
const items = [
|
||||
{ label: "Übersicht", icon: "i-lucide-layout-dashboard", to: "/" },
|
||||
{ label: "Instanzen", icon: "i-lucide-server-cog", to: "/instances" },
|
||||
{ label: "Zustellungen", icon: "i-lucide-send", to: "/jobs" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen">
|
||||
<header class="border-b border-gray-200 bg-white">
|
||||
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-4 sm:px-6 lg:px-8">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-wide text-green-700">FEDEO Push</p>
|
||||
<h1 class="text-xl font-bold text-gray-950">Zentraler Push-Server</h1>
|
||||
</div>
|
||||
<UBadge color="success" variant="soft">Admin</UBadge>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="mx-auto grid max-w-7xl gap-6 px-4 py-6 sm:px-6 lg:grid-cols-[220px_1fr] lg:px-8">
|
||||
<aside class="lg:sticky lg:top-6 lg:self-start">
|
||||
<UNavigationMenu orientation="vertical" :items="items" />
|
||||
</aside>
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
25
push-server/apps/admin/components/TokenGate.vue
Normal file
25
push-server/apps/admin/components/TokenGate.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
const pushApi = usePushApi();
|
||||
const draft = ref("");
|
||||
|
||||
onMounted(() => {
|
||||
pushApi.hydrateToken();
|
||||
draft.value = pushApi.token.value;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UCard v-if="!pushApi.token.value" class="mx-auto mt-16 max-w-lg">
|
||||
<template #header>
|
||||
<div>
|
||||
<h2 class="text-lg font-bold">Admin-Zugang</h2>
|
||||
<p class="text-sm text-gray-500">Gib den Admin-Token aus der Push-Server-Umgebung ein.</p>
|
||||
</div>
|
||||
</template>
|
||||
<form class="space-y-4" @submit.prevent="pushApi.setToken(draft)">
|
||||
<UInput v-model="draft" type="password" placeholder="ADMIN_TOKEN" icon="i-lucide-key-round" autofocus />
|
||||
<UButton type="submit" block icon="i-lucide-log-in">Verbinden</UButton>
|
||||
</form>
|
||||
</UCard>
|
||||
<slot v-else />
|
||||
</template>
|
||||
Reference in New Issue
Block a user