mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-14 21:26:37 +00:00
Add "Podcasts" to the Embed Widgets modal dialog in the station profile.
This commit is contained in:
parent
e783895317
commit
d7b8c59ff9
|
@ -120,6 +120,10 @@ const types = computed(() => {
|
|||
value: 'history',
|
||||
text: $gettext('History')
|
||||
},
|
||||
{
|
||||
value: 'podcasts',
|
||||
text: $gettext('Podcasts')
|
||||
},
|
||||
{
|
||||
value: 'schedule',
|
||||
text: $gettext('Schedule')
|
||||
|
@ -174,6 +178,9 @@ const baseEmbedUrl = computed(() => {
|
|||
case 'schedule':
|
||||
return props.publicScheduleEmbedUri;
|
||||
|
||||
case 'podcasts':
|
||||
return props.publicPodcastsEmbedUri;
|
||||
|
||||
case 'player':
|
||||
default:
|
||||
return props.publicPageEmbedUri;
|
||||
|
@ -181,14 +188,17 @@ const baseEmbedUrl = computed(() => {
|
|||
});
|
||||
|
||||
const embedUrl = computed(() => {
|
||||
return (selectedTheme.value !== "browser")
|
||||
? baseEmbedUrl.value + '?theme=' + selectedTheme.value
|
||||
: baseEmbedUrl.value;
|
||||
const baseUrl = new URL(baseEmbedUrl.value);
|
||||
if (selectedTheme.value !== 'browser') {
|
||||
baseUrl.searchParams.set('theme', selectedTheme.value);
|
||||
}
|
||||
return baseUrl.toString();
|
||||
});
|
||||
|
||||
const embedHeight = computed(() => {
|
||||
switch (selectedType.value) {
|
||||
case 'ondemand':
|
||||
case 'podcasts':
|
||||
return '400px';
|
||||
|
||||
case 'requests':
|
||||
|
|
|
@ -42,5 +42,9 @@ export default {
|
|||
publicScheduleEmbedUri: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
publicPodcastsEmbedUri: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,6 +140,12 @@ final class ProfileAction implements SingleActionInterface
|
|||
routeParams: ['station_id' => $station->getShortName(), 'embed' => 'embed'],
|
||||
absolute: true
|
||||
),
|
||||
'publicPodcastsEmbedUri' => $router->named(
|
||||
routeName: 'public:podcasts',
|
||||
routeParams: ['station_id' => $station->getShortName()],
|
||||
queryParams: ['embed' => 'true'],
|
||||
absolute: true
|
||||
),
|
||||
|
||||
// Frontend
|
||||
'frontendAdminUri' => (string)$frontend?->getAdminUrl($station, $router->getBaseUrl()),
|
||||
|
|
Loading…
Reference in New Issue
Block a user