diff --git a/media_server/config.py b/media_server/config.py index 4c72903..c6db317 100644 --- a/media_server/config.py +++ b/media_server/config.py @@ -45,6 +45,7 @@ class LinkConfig(BaseModel): url: str = Field(..., description="URL to open") icon: str = Field(default="mdi:link", description="MDI icon name (e.g., 'mdi:led-strip-variant')") label: str = Field(default="", description="Tooltip text") + description: str = Field(default="", description="Optional description") class Settings(BaseSettings): diff --git a/media_server/routes/links.py b/media_server/routes/links.py index 45d5b31..e8e2891 100644 --- a/media_server/routes/links.py +++ b/media_server/routes/links.py @@ -23,6 +23,7 @@ class LinkInfo(BaseModel): url: str icon: str label: str + description: str class LinkCreateRequest(BaseModel): @@ -31,6 +32,7 @@ class LinkCreateRequest(BaseModel): url: str = Field(..., description="URL to open", min_length=1) icon: str = Field(default="mdi:link", description="MDI icon name (e.g., 'mdi:led-strip-variant')") label: str = Field(default="", description="Tooltip text") + description: str = Field(default="", description="Optional description") def _validate_link_name(name: str) -> None: @@ -67,6 +69,7 @@ async def list_links(_: str = Depends(verify_token)) -> list[LinkInfo]: url=config.url, icon=config.icon, label=config.label, + description=config.description, ) for name, config in settings.links.items() ] diff --git a/media_server/static/css/styles.css b/media_server/static/css/styles.css index 27b10a4..19c1a9e 100644 --- a/media_server/static/css/styles.css +++ b/media_server/static/css/styles.css @@ -42,6 +42,7 @@ :root[data-theme="light"] .browser-container, :root[data-theme="light"] .scripts-container, :root[data-theme="light"] .script-management, +:root[data-theme="light"] .settings-section, :root[data-theme="light"] .display-container { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); } @@ -979,6 +980,91 @@ button:disabled { color: var(--text-primary); } +/* Settings Container */ +.settings-container.active { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.settings-section { + background: var(--bg-secondary); + border-radius: 12px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); + overflow: hidden; +} + +.settings-section summary { + padding: 1rem 1.5rem; + font-size: 1rem; + font-weight: 600; + color: var(--text-primary); + cursor: pointer; + user-select: none; + display: flex; + align-items: center; + gap: 0.5rem; + transition: background 0.2s; + list-style: none; +} + +.settings-section summary::-webkit-details-marker { + display: none; +} + +.settings-section summary::before { + content: ''; + display: inline-block; + width: 0.5rem; + height: 0.5rem; + border-right: 2px solid var(--text-muted); + border-bottom: 2px solid var(--text-muted); + transform: rotate(-45deg); + transition: transform 0.2s; + flex-shrink: 0; +} + +.settings-section[open] > summary::before { + transform: rotate(45deg); +} + +.settings-section summary:hover { + background: var(--bg-tertiary); +} + +.settings-section-content { + padding: 0 1.5rem 1.5rem; + overflow-x: auto; +} + +.settings-section-description { + color: var(--text-secondary); + font-size: 0.875rem; + margin-bottom: 1rem; +} + +/* Link card in Quick Access */ +.link-card { + text-decoration: none; + color: var(--text-primary); + border: 1px dashed var(--border); +} + +.link-card:hover { + border-style: solid; +} + +/* Mini player nav buttons */ +.mini-nav-btn { + width: 28px; + height: 28px; +} + +.mini-nav-btn svg { + width: 16px; + height: 16px; +} + /* Display Control Section */ .display-container { background: var(--bg-secondary); diff --git a/media_server/static/index.html b/media_server/static/index.html index 88d4014..2a5cade 100644 --- a/media_server/static/index.html +++ b/media_server/static/index.html @@ -18,11 +18,17 @@
+ +
@@ -112,19 +118,11 @@ - - -
@@ -268,100 +266,106 @@
-

No scripts configured

-
-
- + +

No quick actions or links configured

- -
- - - - - - - - - - - - - - - -
NameLabelCommandTimeoutActions
-
- -

No scripts configured. Click "Add" to create one.

-
-
-
- + -
-
+ +
+
+ Scripts +
+ + + + + + + + + + + + + + + +
NameLabelCommandTimeoutActions
+
+ +

No scripts configured. Click "Add" to create one.

+
+
+
+ + +
+
+
- -
-

- Callbacks are scripts triggered automatically by media control events (play, pause, stop, etc.) -

- - - - - - - - - - - - - - -
EventCommandTimeoutActions
-
- -

No callbacks configured. Click "Add" to create one.

-
-
-
- + -
-
+
+ Links +
+

+ Quick links displayed as icons in the header bar. Click an icon to open the URL in a new tab. +

+ + + + + + + + + + + + + + +
NameURLLabelActions
+
+ +

No links configured. Click "Add" to create one.

+
+
+
+ + +
+
+
- - @@ -508,6 +512,11 @@ Label + +