forked from BRETT/BRETT
Initial Commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
const motd = useMotd()
|
||||
const { data } = await useFetch<{ message: string }>('/api/motd', { default: () => ({ message: '' }) })
|
||||
|
||||
// SSR-/Init-Wert in den State übernehmen — danach kommen Updates per WebSocket
|
||||
if (data.value.message) motd.value = data.value.message
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="motd" class="border-b px-4 py-2 lg:px-6">
|
||||
<p class="flex items-center gap-2 text-sm">
|
||||
<Icon name="ph:warning-octagon-fill" class="size-4 shrink-0 text-muted-foreground" />
|
||||
<span class="min-w-0 whitespace-pre-wrap">{{ motd }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user