forked from BRETT/BRETT
17 lines
605 B
Vue
17 lines
605 B
Vue
<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>
|