Commit graph

7 commits

Author SHA1 Message Date
xpltd
dd60505f5a Settings layout rework, purge fix, SSE broadcast
Settings tab reorganized into 3 sections:
- Appearance & Defaults: welcome message + output formats + Save
- Privacy & Data: privacy mode toggle + manual purge
- Security: change password

Manual purge fix:
- purge_all=True clears ALL completed/failed jobs regardless of age
- Previously only cleared jobs older than max_age_hours (7 days),
  so recent downloads were never purged on manual trigger

SSE broadcast for purge:
- Added SSEBroker.publish_all() for cross-session broadcasts
- Purge endpoint sends job_removed events for each deleted job
- Frontend queue clears in real-time when admin purges
2026-03-19 06:04:59 -05:00
xpltd
c3278fcac2 Privacy Mode: consolidated purge + auto-cleanup
Privacy Mode feature:
- Toggle in Admin > Settings enables automatic purge of download
  history, session logs, and files after configurable retention period
- Default retention: 24 hours when privacy mode is on
- Configurable 1-8760 hours via number input
- When enabled, starts purge scheduler (every 30 min) if not running
- When disabled, data persists indefinitely

Admin panel consolidation:
- Removed separate 'Purge' tab — manual purge moved to Settings
- Settings tab order: Privacy Mode > Manual Purge > Welcome Message >
  Output Formats > Change Password
- Toggle switch UI with accent color and smooth animation
- Retention input with left accent border and unit label

Backend:
- PurgeConfig: added privacy_mode (bool) and privacy_retention_hours
- Purge service: uses privacy_retention_hours when privacy mode active
- PUT /admin/settings: accepts privacy_mode + privacy_retention_hours
- GET /config/public: exposes privacy settings to frontend
- Runtime overrides passed to purge service via config._runtime_overrides
2026-03-19 05:55:08 -05:00
xpltd
5da223c5f8 Admin UX, change password, mobile responsive, loading messages
Admin:
- Username field autofocused on login page
- Change password section in Settings tab — current password
  verification, new password + confirm, min 4 chars, updates
  bcrypt hash at runtime via PUT /admin/password
- Password change updates stored credentials in admin store

Loading messages:
- Replaced 'Peeking at the URL' with: Scanning the airwaves,
  Negotiating with the server, Cracking the codec, Reading
  the fine print, Locking on target

Mobile responsive:
- Progress column hidden on mobile (<640px) — table fits viewport
- Action buttons compact (28px) on mobile with 2px gap
- Status badges smaller on mobile (0.625rem)
- Filter tabs scroll horizontally, Download All + Clear go
  full-width below as equal-sized buttons
- min-width:0 on section containers prevents flex overflow
- download-table-wrap constrained with max-width:100%
2026-03-19 05:12:03 -05:00
xpltd
635da2be82 Wireframe background, unified loading, admin format enforcement
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
2026-03-19 04:31:38 -05:00
xpltd
0d9e6b18ac M002/S04: URL preview, playlist support, admin improvements, UX polish
URL preview & playlist support:
- POST /url-info endpoint extracts metadata (title, type, entry count)
- Preview box shows playlist contents before downloading (up to 10 items)
- Auto-detect audio-only sources (SoundCloud, etc) and switch to Audio mode
- Video toggle grayed out for audio-only sources
- Enable playlist downloading (noplaylist=False)

Admin panel improvements:
- Expandable session rows show per-session job list with filename, size,
  status, timestamp, and source URL link
- GET /admin/sessions/{id}/jobs endpoint for session job details
- Logout now redirects to home page instead of staying on login form
- Logo in header is clickable → navigates to home

UX polish:
- Tooltips on output format chips (explains Auto vs specific formats)
- Format tooltips change based on video/audio mode
2026-03-19 02:32:14 -05:00
xpltd
9b62d50461 GSD: M002/S03 complete — Mobile + integration polish
- Admin panel: Settings tab with welcome message editor (runtime override)
- Backend: PUT /api/admin/settings endpoint for runtime config
- Backend: public config reads runtime overrides (settings_overrides on app.state)
- Removed unused ThemePicker.vue (replaced by DarkModeToggle in S01)
- Removed unused DownloadItem.vue (replaced by DownloadTable in S02)
- All 34 frontend + 179 backend tests passing
- M002 COMPLETE — all 3 slices done
2026-03-18 21:34:46 -05:00
xpltd
efc2ead796 M001: media.rip() v1.0 — complete application
Full-featured self-hosted yt-dlp web frontend:
- Python 3.12+ / FastAPI backend with async SQLite, SSE transport, session isolation
- Vue 3 / TypeScript / Pinia frontend with real-time progress, theme picker
- 3 built-in themes (cyberpunk/dark/light) + drop-in custom theme system
- Admin auth (bcrypt), purge system, cookie upload, file serving
- Docker multi-stage build, GitHub Actions CI/CD
- 179 backend tests, 29 frontend tests (208 total)

Slices: S01 (Foundation), S02 (SSE+Sessions), S03 (Frontend),
        S04 (Admin+Auth), S05 (Themes), S06 (Docker+CI)
2026-03-18 20:00:17 -05:00