=__('Relay') ?> | -=__('Is Public') ?> | -=__('First Connected') ?> | -=__('Latest Update') ?> | -
---|---|---|---|
= __('Relay') ?> | += __('Is Public') ?> | += __('First Connected') ?> | += __('Latest Update') ?> | +
- =$this->e($row['name']) ?> + = $this->e($row['name']) ?> |
diff --git a/templates/admin/sidebar.phtml b/templates/admin/sidebar.phtml
index d16ce9506..63b304879 100644
--- a/templates/admin/sidebar.phtml
+++ b/templates/admin/sidebar.phtml
@@ -1,7 +1,15 @@
+
+
=__('Please log in to continue.')?> =sprintf( '%s', - (string)$router->named('account:forgot'), + $router->named('account:forgot'), __('Forgot your password?') )?> diff --git a/templates/frontend/public/index.phtml b/templates/frontend/public/index.phtml index 29b7bbb31..9d96c2f40 100644 --- a/templates/frontend/public/index.phtml +++ b/templates/frontend/public/index.phtml @@ -1,7 +1,11 @@ layout( @@ -12,47 +16,52 @@ $this->layout( ] ); -/** @var \App\Assets $assets */ -$assets->addVueRender('Vue_PublicFullPlayer', '#public-radio-player', $props); - // Register PWA service worker -$swJsRoute = (string)$router->named('public:sw'); +$swJsRoute = $router->named('public:sw'); -$assets->addInlineJs( - <<
- Loading...
-
+$sections->appendStart('bodyjs');
+?>
+
+end();
+
+echo $this->fetch(
+ 'partials/vue_body',
+ [
+ 'component' => 'Vue_PublicFullPlayer',
+ 'id' => 'public-radio-player',
+ 'props' => $props,
+ ]
+);
diff --git a/templates/frontend/public/podcast-episode.js.phtml b/templates/frontend/public/podcast-episode.js.phtml
deleted file mode 100644
index e816a6591..000000000
--- a/templates/frontend/public/podcast-episode.js.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-$(function () {
- $('[data-toggle="tooltip"]').tooltip();
-});
diff --git a/templates/frontend/public/podcast-episode.phtml b/templates/frontend/public/podcast-episode.phtml
index 9721927d7..54185b199 100644
--- a/templates/frontend/public/podcast-episode.phtml
+++ b/templates/frontend/public/podcast-episode.phtml
@@ -1,4 +1,8 @@
layout('minimal', [
'hide_footer' => true,
]);
-/** @var \App\Assets $assets */
-$assets->addInlineJs(
- $this->fetch('frontend/public/podcast-episode.js', [])
-);
-
-$episodeAudioSrc = (string) $router->named(
+$episodeAudioSrc = $router->named(
'api:stations:podcast:episode:download',
[
'station_id' => $station->getId(),
@@ -30,11 +29,20 @@ if ($episode->getPublishAt() !== null) {
$publishedAt = CarbonImmutable::createFromTimestamp($episode->getPublishAt());
}
-$this->push('head');
+$sections->append(
+ 'head',
+ <<
+ HTML
+);
+
+$sections->appendStart('bodyjs');
?>
-
-
-
+
end();
?>
@@ -43,16 +51,17 @@ $this->end();
-
=$this->e($podcast->getTitle())?>+= $this->e($podcast->getTitle()) ?>
@@ -60,31 +69,34 @@ $this->end();
- named(
'api:stations:podcast:episode:art',
[
'station_id' => $station->getId(),
'podcast_id' => $podcast->getId(),
'episode_id' => $episode->getId() . '|' . $episode->getArtUpdatedAt(),
]
- );?>" class="card-img img-fluid" alt="=$this->e($podcast->getTitle())?>">
+ ); ?>" class="card-img img-fluid" alt="= $this->e($podcast->getTitle()) ?>">
- =$publishedAt->format('d. M. Y')?>
+ = $publishedAt->format('d. M. Y') ?>
getExplicit()) : ?>
- =__('Explicit') ?>
+ = __('Explicit') ?>
-
+
diff --git a/templates/frontend/public/podcast-episodes.js.phtml b/templates/frontend/public/podcast-episodes.js.phtml
deleted file mode 100644
index e816a6591..000000000
--- a/templates/frontend/public/podcast-episodes.js.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-$(function () {
- $('[data-toggle="tooltip"]').tooltip();
-});
diff --git a/templates/frontend/public/podcast-episodes.phtml b/templates/frontend/public/podcast-episodes.phtml
index aebced38f..c213b37e2 100644
--- a/templates/frontend/public/podcast-episodes.phtml
+++ b/templates/frontend/public/podcast-episodes.phtml
@@ -1,4 +1,8 @@
layout(
]
);
-/** @var \App\Assets $assets */
-$assets->addInlineJs(
- $this->fetch('frontend/public/podcast-episodes.js', [])
+$sections->append(
+ 'head',
+ <<
+ HTML
);
-$this->push('head');
+$sections->appendStart('bodyjs');
?>
-
-
-
+
end();
?>
@@ -29,20 +37,22 @@ $this->end();
-
=__('Episodes')?>+= __('Episodes') ?>
-
=$this->e($podcast->getTitle())?>+= $this->e($podcast->getTitle()) ?>
diff --git a/templates/frontend/public/webdj.phtml b/templates/frontend/public/webdj.phtml
new file mode 100644
index 000000000..d820da6ad
--- /dev/null
+++ b/templates/frontend/public/webdj.phtml
@@ -0,0 +1,48 @@
+layout(
+ 'minimal',
+ [
+ 'page_class' => 'dj station-' . $station->getShortName(),
+ 'hide_footer' => true,
+ 'title' => __('Web DJ') . ' - ' . $station->getName(),
+ 'manual' => true,
+ ]
+);
+
+$jsLibs = [
+ $this->assetUrl('dist/lib/webcaster/libshine.js'),
+ $this->assetUrl('dist/lib/webcaster/libsamplerate.js'),
+ $this->assetUrl('dist/lib/webcaster/taglib.js'),
+ $this->assetUrl('dist/lib/webcaster/webcast.js'),
+];
+
+$libUrls = [];
+foreach ($jsLibs as $script) {
+ $libUrls[] = (string)($router->getBaseUrl()->withPath($script));
+}
+
+$scriptLines = [];
+foreach ($jsLibs as $jsLib) {
+ $scriptLines[] = <<
+ HTML;
+}
+
+$sections->append('bodyjs', implode("\n", $scriptLines));
+
+echo $this->fetch(
+ 'partials/vue_body',
+ [
+ 'component' => 'Vue_PublicWebDJ',
+ 'id' => 'web_dj',
+ 'props' => [
+ 'stationName' => $station->getName(),
+ 'libUrls' => $libUrls,
+ 'baseUri' => $wss_url,
+ ],
+ ]
+);
diff --git a/templates/mail/forgot.phtml b/templates/mail/forgot.phtml
index 0e4d9ff22..a7d4740d1 100644
--- a/templates/mail/forgot.phtml
+++ b/templates/mail/forgot.phtml
@@ -1,18 +1,18 @@
= __('Account Recovery') ?>
-
= sprintf(__('An account recovery link has been requested for your account on "%s".'), $environment->getAppName()) ?>
-
= __('Click the link below to log in to your account.') ?>
-
= $router->named(
- 'account:recover',
- ['token' => $token],
- [],
- true
+ routeName: 'account:recover',
+ routeParams: ['token' => $token],
+ absolute: true
)?>
diff --git a/templates/main.phtml b/templates/main.phtml
index d8c7b30ec..d24f792cf 100644
--- a/templates/main.phtml
+++ b/templates/main.phtml
@@ -6,11 +6,11 @@
* @var App\Http\Router $router
* @var App\Session\Flash $flash
* @var App\Customization $customization
- * @var App\Assets $assets
* @var App\Version $version
* @var App\Http\ServerRequest $request
* @var App\Environment $environment
* @var App\Entity\User $user
+ * @var App\View\GlobalSections $sections
*/
$manual ??= false;
@@ -26,29 +26,44 @@ $header ??= null;
|
-=$this->fetch('partials/sidebar_menu', ['menu' => $admin_panels]) ?>
\ No newline at end of file
+= $this->fetch('partials/sidebar_menu', ['menu' => $admin_panels]) ?>
diff --git a/templates/frontend/account/login.phtml b/templates/frontend/account/login.phtml
index a30a14ef6..38fe8da29 100644
--- a/templates/frontend/account/login.phtml
+++ b/templates/frontend/account/login.phtml
@@ -1,4 +1,9 @@
layout(
'minimal',
@@ -70,7 +75,7 @@ $this->layout(