media-rip/frontend/src/components/WelcomeMessage.vue
xpltd ccd863f57d GSD: M002/S01 complete — Bug fixes + header/footer rework
- Fix cancel download bug: add @click.stop, debounce with cancelling ref
- Rework header: remove nav tabs, replace ThemePicker with DarkModeToggle
- Add isDark computed + toggleDarkMode() to theme store
- Add WelcomeMessage component above URL input, reads from public config
- Add welcome_message to UIConfig and public config endpoint
- Add AppFooter with app version, yt-dlp version, GitHub link
- Remove SSE status dot from header
- Remove connectionStatus prop from AppLayout
- 5 new theme toggle tests (34 frontend tests total)
- 179 backend tests still passing
2026-03-18 21:16:24 -05:00

44 lines
990 B
Vue

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { api } from '@/api/client'
const message = ref('Paste any video or audio URL. We rip it, you download it. No accounts, no tracking.')
const visible = ref(true)
onMounted(async () => {
try {
const config = await api.getPublicConfig()
if (config.welcome_message !== undefined && config.welcome_message !== null) {
if (config.welcome_message === '') {
visible.value = false
} else {
message.value = config.welcome_message
}
}
} catch {
// Use default message on error
}
})
</script>
<template>
<div v-if="visible" class="welcome-message">
<p>{{ message }}</p>
</div>
</template>
<style scoped>
.welcome-message {
text-align: center;
padding: var(--space-md) var(--space-lg);
color: var(--color-text-muted);
font-size: var(--font-size-base);
line-height: 1.6;
max-width: 600px;
margin: 0 auto;
}
.welcome-message p {
margin: 0;
}
</style>