Add master display UI with audio output management and styling
- Implement main.js for the master display functionality, including WebSocket connection, audio output management, and state handling. - Create style.css for the master display's visual design, ensuring a cohesive look and feel with a dark theme and responsive layout. - Integrate device management with a fallback for non-Electron environments, allowing users to select audio outputs. - Add features for managing favorites, including toggling favorites and filtering by genre. - Enhance user experience with a responsive favorites grid and drag-to-scroll functionality.
This commit is contained in:
@@ -3,6 +3,8 @@ import { getDb } from './db/index.js';
|
||||
|
||||
function rowToStation(row) {
|
||||
if (!row) return null;
|
||||
const imagePath = row.image_path || null;
|
||||
const remote = row.image_url || null;
|
||||
return {
|
||||
id: row.id,
|
||||
uuid: row.uuid,
|
||||
@@ -12,7 +14,12 @@ function rowToStation(row) {
|
||||
country: row.country,
|
||||
genres: row.genres ? JSON.parse(row.genres) : [],
|
||||
description: row.description,
|
||||
image_url: row.image_url,
|
||||
// image_url remains the remote/source URL (what admins edit).
|
||||
// image_display_url is what UIs should render — prefers the local cache.
|
||||
image_url: remote,
|
||||
image_path: imagePath,
|
||||
image_source: row.image_source || null,
|
||||
image_display_url: imagePath ? `/media/${imagePath}` : remote,
|
||||
source: row.source,
|
||||
source_ref: row.source_ref,
|
||||
category: row.category,
|
||||
|
||||
Reference in New Issue
Block a user