From 635da2be828c86edd7eadebe0189a97ec6b0d9ed Mon Sep 17 00:00:00 2001 From: xpltd Date: Thu, 19 Mar 2026 04:31:38 -0500 Subject: [PATCH] Wireframe background, unified loading, admin format enforcement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wireframe background: - Canvas-based constellation animation — 45 floating nodes connected by proximity lines, subtle pulsing glow on select nodes - Blue primary + orange accent line colors match cyberpunk palette - Pauses on tab hidden, respects devicePixelRatio, ~0% CPU idle - Only renders when cyberpunk theme is active (v-if on theme) - Replaces CSS-only diagonal lines/pulse (removed from cyberpunk.css) Unified URL analysis: - Merged 'Checking URL...' and 'Extracting available formats...' into a single loading state with rotating messages: 'Peeking at the URL', 'Interrogating the server', 'Decoding the matrix', etc. - Both fetches run in parallel via Promise.all, single spinner shown - Phase messages rotate every 1.5s during analysis Admin format enforcement: - Backend PUT /admin/settings now accepts default_video_format and default_audio_format fields with validation - Stored in settings_overrides alongside welcome_message - UrlInput reads admin defaults from config store — Auto label shows 'Auto (.mp3)' etc. when admin has set a default - effectiveOutputFormat computed resolves admin default when user selects Auto, sends the resolved format to the backend --- backend/app/routers/admin.py | 19 ++ frontend/src/components/AppLayout.vue | 10 +- frontend/src/components/UrlInput.vue | 76 +++++--- .../src/components/WireframeBackground.vue | 181 ++++++++++++++++++ frontend/src/themes/cyberpunk.css | 47 ----- 5 files changed, 254 insertions(+), 79 deletions(-) create mode 100644 frontend/src/components/WireframeBackground.vue diff --git a/backend/app/routers/admin.py b/backend/app/routers/admin.py index 2ae2cbd..7413e68 100644 --- a/backend/app/routers/admin.py +++ b/backend/app/routers/admin.py @@ -168,6 +168,8 @@ async def update_settings( Accepts a JSON body with optional fields: - welcome_message: str + - default_video_format: str (auto, mp4, webm) + - default_audio_format: str (auto, mp3, m4a, flac, wav, opus) """ body = await request.json() @@ -188,4 +190,21 @@ async def update_settings( updated.append("welcome_message") logger.info("Admin updated welcome_message to: %s", msg[:80]) + valid_video_formats = {"auto", "mp4", "webm"} + valid_audio_formats = {"auto", "mp3", "m4a", "flac", "wav", "opus"} + + if "default_video_format" in body: + fmt = body["default_video_format"] + if fmt in valid_video_formats: + request.app.state.settings_overrides["default_video_format"] = fmt + updated.append("default_video_format") + logger.info("Admin updated default_video_format to: %s", fmt) + + if "default_audio_format" in body: + fmt = body["default_audio_format"] + if fmt in valid_audio_formats: + request.app.state.settings_overrides["default_audio_format"] = fmt + updated.append("default_audio_format") + logger.info("Admin updated default_audio_format to: %s", fmt) + return {"updated": updated, "status": "ok"} diff --git a/frontend/src/components/AppLayout.vue b/frontend/src/components/AppLayout.vue index 6f4f684..715ca4a 100644 --- a/frontend/src/components/AppLayout.vue +++ b/frontend/src/components/AppLayout.vue @@ -1,5 +1,10 @@ + + + + diff --git a/frontend/src/themes/cyberpunk.css b/frontend/src/themes/cyberpunk.css index 9810af2..f1150fb 100644 --- a/frontend/src/themes/cyberpunk.css +++ b/frontend/src/themes/cyberpunk.css @@ -79,50 +79,3 @@ --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5); --shadow-glow: 0 0 20px rgba(0, 168, 255, 0.15); } - -/* Animated geometric background — cyberpunk only */ -:root[data-theme="cyberpunk"] body::after { - background: - /* Diagonal lines moving slowly */ - repeating-linear-gradient( - 45deg, - transparent, - transparent 60px, - rgba(0, 168, 255, 0.015) 60px, - rgba(0, 168, 255, 0.015) 61px - ), - repeating-linear-gradient( - -45deg, - transparent, - transparent 80px, - rgba(255, 107, 43, 0.01) 80px, - rgba(255, 107, 43, 0.01) 81px - ), - /* Base grid */ - linear-gradient(rgba(0, 168, 255, 0.025) 1px, transparent 1px), - linear-gradient(90deg, rgba(0, 168, 255, 0.025) 1px, transparent 1px); - background-size: 200px 200px, 240px 240px, 32px 32px, 32px 32px; - animation: grid-drift 60s linear infinite; -} - -@keyframes grid-drift { - 0% { - background-position: 0 0, 0 0, 0 0, 0 0; - } - 100% { - background-position: 200px 200px, -240px 240px, 32px 32px, 32px 32px; - } -} - -/* Subtle pulsing glow dot at intersections — extra depth */ -:root[data-theme="cyberpunk"] body { - background-image: - radial-gradient(circle at 50% 50%, rgba(0, 168, 255, 0.04) 0%, transparent 70%); - background-size: 100% 100%; - animation: bg-pulse 8s ease-in-out infinite alternate; -} - -@keyframes bg-pulse { - 0% { background-size: 100% 100%; } - 100% { background-size: 120% 120%; } -}