feat(web): media detail pages + image folder browser (#141/#161)
Add the SPA screens over the new detail/info/image endpoints:
- Detail pages at /app/media/{movies|shows|seasons|artists}/{id}. MediaBrowseScreen
cards for movies/shows/artists (and season/show drill-in cards) navigate to them.
Shows list seasons -> seasons list episodes -> artists list music videos, each via
the browse parentId drill-in, paged. Layout: fanart/poster, title/year/plot, chip
lists, cast row, movie path + FileNotFound/Unavailable warnings. A "Media Info"
dialog (streams + chapters) backs onto GET /api/media-items/{id}/info. Add-to-
collection/playlist deferred to #153/#155 (TODO left in code).
- Image folder browser at /app/media/images/browser: lazy expandable tree, per-folder
image/subfolder counts + duration, edit dialog (PUT set/clear), and a per-folder
search link (library_folder_id:{id}). Reachable via a "Folder Browser" button on the
Images browse view.
New /app/media sub-paths are owned by a MediaRouteScreen wrapper that tracks pathname
locally + listens for popstate (App-level routing returns the same 'media' route object
for base and sub-paths). Client modules web/src/api/mediaDetail.ts + imageFolders.ts,
typed via the generated v1.d.ts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2580,6 +2580,234 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Media detail pages (#141/#161) */
|
||||
.ctv-detail {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-6, 12px);
|
||||
}
|
||||
|
||||
.ctv-detail-fanart {
|
||||
position: absolute;
|
||||
inset: -8px -8px auto -8px;
|
||||
height: 260px;
|
||||
background-size: cover;
|
||||
background-position: center 20%;
|
||||
opacity: 0.12;
|
||||
filter: saturate(0.9);
|
||||
border-radius: var(--radius-md, 8px);
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
-webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / 100%), transparent);
|
||||
mask-image: linear-gradient(to bottom, rgb(0 0 0 / 100%), transparent);
|
||||
}
|
||||
|
||||
.ctv-detail-head {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
gap: var(--space-7, 16px);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ctv-detail-poster {
|
||||
width: 200px;
|
||||
max-width: 40vw;
|
||||
aspect-ratio: 2 / 3;
|
||||
object-fit: cover;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border-hairline);
|
||||
background: var(--surface-card);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ctv-detail-poster-empty {
|
||||
background: repeating-linear-gradient(135deg, var(--surface-card) 0 8px, var(--surface-app) 8px 16px);
|
||||
}
|
||||
|
||||
.ctv-detail-headinfo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-4, 8px);
|
||||
min-width: 260px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.ctv-detail-title {
|
||||
margin: 0;
|
||||
font: var(--weight-semibold) var(--text-xl, 20px) / 1.2 var(--font-sans);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.ctv-detail-subtitle {
|
||||
color: var(--text-secondary);
|
||||
font-size: var(--text-sm, 13px);
|
||||
}
|
||||
|
||||
.ctv-detail-plot {
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.5;
|
||||
max-width: 70ch;
|
||||
}
|
||||
|
||||
.ctv-detail-actions {
|
||||
display: flex;
|
||||
gap: var(--space-5, 10px);
|
||||
flex-wrap: wrap;
|
||||
margin-top: var(--space-4, 8px);
|
||||
}
|
||||
|
||||
.ctv-detail-path {
|
||||
font-family: var(--font-mono, monospace);
|
||||
font-size: var(--text-xs, 12px);
|
||||
color: var(--text-secondary);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.ctv-detail-chipstack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-5, 10px);
|
||||
}
|
||||
|
||||
.ctv-detail-chiprow {
|
||||
display: flex;
|
||||
gap: var(--space-5, 10px);
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ctv-detail-chiplabel {
|
||||
min-width: 130px;
|
||||
color: var(--text-disabled);
|
||||
font-size: var(--text-2xs, 11px);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.ctv-detail-chips {
|
||||
display: flex;
|
||||
gap: var(--space-3, 6px);
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.ctv-detail-section {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-5, 10px);
|
||||
}
|
||||
|
||||
.ctv-detail-heading {
|
||||
margin: 0;
|
||||
font: var(--weight-semibold) var(--text-md, 15px) / 1.2 var(--font-sans);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.ctv-detail-actors {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
|
||||
gap: var(--space-6, 12px);
|
||||
}
|
||||
|
||||
.ctv-detail-actor {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ctv-detail-actor-thumb {
|
||||
width: 100%;
|
||||
aspect-ratio: 1 / 1;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--border-hairline);
|
||||
}
|
||||
|
||||
.ctv-detail-actor-thumb-empty {
|
||||
background: var(--surface-card);
|
||||
}
|
||||
|
||||
.ctv-detail-actor-name {
|
||||
font-size: var(--text-xs, 12px);
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ctv-detail-actor-role {
|
||||
font-size: var(--text-2xs, 11px);
|
||||
color: var(--text-secondary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ctv-detail-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-7, 16px);
|
||||
}
|
||||
|
||||
.ctv-detail-infogrid {
|
||||
display: grid;
|
||||
grid-template-columns: max-content 1fr;
|
||||
gap: var(--space-3, 6px) var(--space-6, 12px);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ctv-detail-infogrid dt {
|
||||
color: var(--text-disabled);
|
||||
font-size: var(--text-2xs, 11px);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.ctv-detail-infogrid dd {
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
font-size: var(--text-sm, 13px);
|
||||
}
|
||||
|
||||
.ctv-detail-info-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-4, 8px);
|
||||
}
|
||||
|
||||
.ctv-imgfolder-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4, 8px);
|
||||
padding: var(--space-3, 6px) 0;
|
||||
border-bottom: 1px solid var(--border-hairline);
|
||||
}
|
||||
|
||||
.ctv-imgfolder-name {
|
||||
font-size: var(--text-sm, 13px);
|
||||
color: var(--text-primary);
|
||||
font-weight: var(--weight-medium, 500);
|
||||
}
|
||||
|
||||
.ctv-imgfolder-meta {
|
||||
font-size: var(--text-2xs, 11px);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.ctv-imgfolder-duration {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: var(--text-2xs, 11px);
|
||||
color: var(--text-disabled);
|
||||
}
|
||||
|
||||
.ctv-media-section-header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
Reference in New Issue
Block a user