Adds the new shows admin screen and drives schedule from it
This commit is contained in:
1 parent
e627fe3637
commit
eb9a00f21a
28 files changed
+546
-54
No files matched your search
@@ -21,7 +21,7 @@
|
||||
<!-- Left: Show art badge -->
|
||||
<div class="show-card-art">
|
||||
@if (show.show_art_url) {
|
||||
<img [src]="show.show_art_url" [alt]="show.title + ' art'" class="show-art-img" />
|
||||
<img [src]="resolveAsset(show.show_art_url)" [alt]="show.title + ' art'" class="show-art-img" />
|
||||
} @else {
|
||||
<div class="show-art-placeholder">
|
||||
<span aria-hidden="true">🎵</span>
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Right: Hero-backed info area -->
|
||||
<div class="show-card-right" [class.has-hero]="show.hero_image_url" [style.background-image]="show.hero_image_url ? 'url(' + show.hero_image_url + ')' : ''">
|
||||
<div class="show-card-right" [class.has-hero]="show.hero_image_url" [style.background-image]="show.hero_image_url ? 'url(' + resolveAsset(show.hero_image_url) + ')' : ''">
|
||||
<div class="show-card-overlay"></div>
|
||||
<div class="show-card-info">
|
||||
<h3 class="show-title">{{ show.title }}</h3>
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
|
||||
.show-card-art {
|
||||
flex-shrink: 0;
|
||||
width: 140px;
|
||||
width: 256px;
|
||||
height: 256px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -73,7 +74,7 @@
|
||||
|
||||
.show-art-placeholder {
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -195,7 +196,6 @@
|
||||
|
||||
@include responsive(md) {
|
||||
.show-card-art {
|
||||
width: 110px;
|
||||
padding: $spacing-sm;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ShowService } from '../services/show.service';
|
||||
import { Show } from '../interfaces/show';
|
||||
import { StationConfigService } from '../services/station-config.service';
|
||||
import { SortSchedulesPipe } from '../pipes/sort-schedules.pipe';
|
||||
import { getAppConfig } from '../services/app-config.service';
|
||||
|
||||
interface ScheduleState {
|
||||
loading: boolean;
|
||||
@@ -29,4 +30,11 @@ export class ScheduleComponent {
|
||||
map((shows) => ({ loading: false, shows })),
|
||||
startWith({ loading: true, shows: [] }),
|
||||
);
|
||||
|
||||
/** Resolve a relative uploads/… path to an absolute URL for image rendering. */
|
||||
resolveAsset(url: string | null): string {
|
||||
if (!url) return '';
|
||||
if (url.startsWith('http://') || url.startsWith('https://')) return url;
|
||||
return `${getAppConfig().apiBaseUrl}/${url}`;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user