Fixes #6051 -- Apply per-station branding to embed pages too.

This commit is contained in:
Buster Neece 2023-01-30 09:11:57 -06:00
parent f0666ab175
commit 88e455f57a
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
4 changed files with 36 additions and 4 deletions

View File

@ -28,7 +28,15 @@ final class HistoryAction
throw new StationNotFoundException();
}
return $request->getView()->renderVuePage(
$view = $request->getView();
// Add station public code.
$view->fetch(
'frontend/public/partials/station-custom',
['station' => $station]
);
return $view->renderVuePage(
response: $response->withHeader('X-Frame-Options', '*'),
component: 'Vue_PublicHistory',
id: 'song-history',

View File

@ -58,7 +58,15 @@ final class OnDemandAction
$pageClass .= ' embed';
}
return $request->getView()->renderVuePage(
$view = $request->getView();
// Add station public code.
$view->fetch(
'frontend/public/partials/station-custom',
['station' => $station]
);
return $view->renderVuePage(
response: $response->withHeader('X-Frame-Options', '*'),
component: 'Vue_PublicOnDemand',
id: 'station-on-demand',

View File

@ -46,7 +46,15 @@ final class PlayerAction
$pageClasses[] = 'page-station-public-player-embed station-' . $station->getShortName();
$pageClasses[] = ('social' === $embed) ? 'embed-social' : 'embed';
return $request->getView()->renderVuePage(
$view = $request->getView();
// Add station public code.
$view->fetch(
'frontend/public/partials/station-custom',
['station' => $station]
);
return $view->renderVuePage(
response: $response,
component: 'Vue_PublicPlayer',
id: 'station-nowplaying',

View File

@ -30,7 +30,15 @@ final class ScheduleAction
$pageClass .= ' embed';
}
return $request->getView()->renderVuePage(
$view = $request->getView();
// Add station public code.
$view->fetch(
'frontend/public/partials/station-custom',
['station' => $station]
);
return $view->renderVuePage(
response: $response
->withHeader('X-Frame-Options', '*'),
component: 'Vue_PublicSchedule',