mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-27 20:21:59 +02:00
fix(premium-podcasts): remove cache in unlock form + redirect to podcast if podcast is not premium
This commit is contained in:
parent
b1303c5255
commit
242352c4d9
@ -43,11 +43,13 @@ class LockController extends BaseController
|
|||||||
return $this->{$method}();
|
return $this->{$method}();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index(): string
|
public function index(): RedirectResponse|string
|
||||||
{
|
{
|
||||||
|
if (! $this->podcast->is_premium) {
|
||||||
|
return redirect()->route('podcast-activity', [$this->podcast->handle]);
|
||||||
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
// TODO: metatags for locked premium podcasts
|
|
||||||
'metatags' => '',
|
|
||||||
'podcast' => $this->podcast,
|
'podcast' => $this->podcast,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?= $metatags ?>
|
|
||||||
|
|
||||||
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
|
<link rel='stylesheet' type='text/css' href='<?= route_to('themes-colors-css') ?>' />
|
||||||
<?= service('vite')
|
<?= service('vite')
|
||||||
->asset('styles/index.css', 'css') ?>
|
->asset('styles/index.css', 'css') ?>
|
||||||
@ -77,8 +75,8 @@
|
|||||||
<div class="flex items-center pl-4 -mb-6 md:pl-8 md:-mb-8 gap-x-4">
|
<div class="flex items-center pl-4 -mb-6 md:pl-8 md:-mb-8 gap-x-4">
|
||||||
<img src="<?= $podcast->cover->thumbnail_url ?>" alt="<?= esc($podcast->title) ?>" class="z-[45] h-24 rounded-full sm:h-28 md:h-36 ring-3 ring-background-elevated aspect-square" loading="lazy" />
|
<img src="<?= $podcast->cover->thumbnail_url ?>" alt="<?= esc($podcast->title) ?>" class="z-[45] h-24 rounded-full sm:h-28 md:h-36 ring-3 ring-background-elevated aspect-square" loading="lazy" />
|
||||||
<div class="relative flex flex-col text-white -top-3 sm:top-0 md:top-2">
|
<div class="relative flex flex-col text-white -top-3 sm:top-0 md:top-2">
|
||||||
<h1 class="text-lg font-bold leading-none line-clamp-2 md:leading-none md:text-2xl font-display"><?= esc($podcast->title) ?><span class="ml-1 font-sans text-base font-normal">@<?= esc($podcast->handle) ?></span></h1>
|
<div class="text-lg font-bold leading-none line-clamp-2 md:leading-none md:text-2xl font-display"><?= esc($podcast->title) ?><span class="ml-1 font-sans text-base font-normal">@<?= esc($podcast->handle) ?></span></div>
|
||||||
<div class="">
|
<div>
|
||||||
<?= explicit_badge($podcast->parental_advisory === 'explicit', 'mr-1') ?>
|
<?= explicit_badge($podcast->parental_advisory === 'explicit', 'mr-1') ?>
|
||||||
<span class="text-xs"><?= lang('Podcast.followers', [
|
<span class="text-xs"><?= lang('Podcast.followers', [
|
||||||
'numberOfFollowers' => $podcast->actor->followers_count,
|
'numberOfFollowers' => $podcast->actor->followers_count,
|
||||||
|
Loading…
Reference in New Issue
Block a user