Files
furumi-web/templates/player/podcasts.html
T
ab eefe8a9777
Build and Publish / Build and Publish Docker Image (push) Successful in 2m6s
Fix podcast page
2026-11-22 17:49:23 +02:00

212 lines
9.5 KiB
HTML

<template x-if="$store.library.view === 'podcasts'">
<section>
<div class="podcast-heading">
<h1 class="section-title" x-text="$store.podcasts.text('podcasts')"></h1>
<div class="release-actions">
<button
class="release-action-btn secondary"
@click="$store.podcasts.refreshAll()"
:disabled="$store.podcasts.busy || $store.podcasts.loading"
x-text="$store.podcasts.text('checkAll')"
></button>
<button
class="release-action-btn primary"
@click="$store.podcasts.adding=!$store.podcasts.adding"
:aria-expanded="$store.podcasts.adding"
aria-controls="podcast-add-feed"
x-text="$store.podcasts.text('add')"
></button>
</div>
</div>
<form
id="podcast-add-feed"
class="podcast-toolbar"
x-show="$store.podcasts.adding"
x-cloak
@submit.prevent="$store.podcasts.add()"
>
<input
type="text"
x-model="$store.podcasts.url"
placeholder="RSS / Atom URL"
aria-label="RSS / Atom URL"
required
/>
<button
class="release-action-btn primary"
:disabled="$store.podcasts.busy"
x-text="$store.podcasts.text('subscribe')"
></button>
</form>
<p
class="podcast-notice"
role="status"
aria-live="polite"
x-show="$store.podcasts.message"
x-text="$store.podcasts.message"
></p>
<h2 class="podcast-section-title" x-text="$store.podcasts.text('mine')"></h2>
<div
class="loading-spinner"
x-show="$store.podcasts.loading && !$store.podcasts.mine.length"
>
<div class="spinner"></div>
</div>
<div class="empty-state" x-show="!$store.podcasts.loading && !$store.podcasts.mine.length">
<p x-text="$store.podcasts.text('empty')"></p>
</div>
<div class="card-grid">
<template x-for="pod in $store.podcasts.mine" :key="pod.id"
>{% include "player/podcast_card.html" %}</template
>
</div>
<section class="podcast-section">
<h2
class="podcast-section-title"
x-text="$store.podcasts.text($store.podcasts.searched?'results':'public')"
></h2>
<form class="podcast-toolbar" @submit.prevent="$store.podcasts.search()">
<input
type="text"
x-model="$store.podcasts.query"
@input="$store.podcasts.resetSearch()"
:placeholder="$store.podcasts.text('searchNetwork')"
:aria-label="$store.podcasts.text('searchNetwork')"
minlength="2"
maxlength="200"
/>
<button
class="release-action-btn secondary"
:disabled="$store.podcasts.busy"
x-text="$store.podcasts.text('search')"
></button>
</form>
<div
class="empty-state"
x-show="!$store.podcasts.loading && !$store.podcasts.publicCards().length"
>
<p
x-text="$store.podcasts.text($store.podcasts.searched?'noMatches':'noPublic')"
></p>
</div>
<div class="card-grid">
<template x-for="pod in $store.podcasts.publicCards()" :key="pod.id"
>{% include "player/podcast_card.html" %}</template
>
</div>
</section>
</section>
</template>
<template x-if="$store.library.view === 'podcast_detail'">
<section class="podcast-detail">
<div class="breadcrumb">
<a
href="#podcasts"
@click.prevent="$store.podcasts.enter()"
x-text="$store.podcasts.text('podcasts')"
></a
><span>/</span>
<span
x-text="$store.podcasts.selected?.metadata.title || $store.podcasts.text($store.podcasts.loading?'working':'notFound')"
></span>
</div>
<div class="loading-spinner" x-show="$store.podcasts.loading && !$store.podcasts.selected">
<div class="spinner"></div>
</div>
<p
class="podcast-notice"
role="status"
aria-live="polite"
x-show="$store.podcasts.message"
x-text="$store.podcasts.message"
></p>
<template
x-for="pod in ($store.podcasts.selected ? [$store.podcasts.selected] : [])"
:key="pod.id"
>
<div>
<div class="release-header">
<div class="release-cover podcast-artwork">
{% include "player/podcast_artwork.html" %}
</div>
<div class="release-meta">
<h1 class="release-title" x-text="pod.metadata.title"></h1>
<div class="release-artists" x-text="pod.metadata.author"></div>
<div class="artist-stats" x-show="pod.episodes != null">
<span
x-text="(pod.episodes || 0) + ' ' + $store.podcasts.text('episodes')"
></span
><span
x-show="pod.subscribed && pod.new_episodes"
x-text="' · ' + pod.new_episodes + ' ' + $store.podcasts.text('unplayed')"
></span>
</div>
<div class="release-actions">
<template x-if="!pod.subscribed"
><button
class="release-action-btn primary"
@click="$store.podcasts.subscribe(pod)"
:disabled="$store.podcasts.busy"
x-text="$store.podcasts.text('subscribe')"
></button
></template>
<template x-if="pod.subscribed"
><div class="podcast-detail-actions">
<button
class="release-action-btn secondary"
@click="$store.podcasts.refresh(pod)"
:disabled="$store.podcasts.busy"
x-text="$store.podcasts.text('check')"
></button>
<button
class="release-action-btn secondary"
@click="$store.podcasts.share(pod)"
:disabled="$store.podcasts.busy"
x-text="$store.podcasts.text(pod.shared?'unpublish':'publish')"
></button>
<button
class="release-action-btn secondary"
@click="$store.podcasts.remove(pod)"
:disabled="$store.podcasts.busy"
x-text="$store.podcasts.text('remove')"
></button></div
></template>
</div>
</div>
</div>
<div class="podcast-description-section" x-show="pod.metadata.description">
<p
id="podcast-description"
class="podcast-description"
x-text="$store.podcasts.description(pod)"
></p>
<button
class="artist-top-tracks-toggle"
x-show="(pod.metadata.description || '').length>360"
@click="$store.podcasts.descriptionExpanded=!$store.podcasts.descriptionExpanded"
:aria-expanded="$store.podcasts.descriptionExpanded"
aria-controls="podcast-description"
x-text="$store.podcasts.text($store.podcasts.descriptionExpanded?'showLess':'showMore')"
></button>
</div>
<p class="podcast-notice" x-show="pod.error" x-text="pod.error"></p>
<template x-if="pod.subscribed"
><section>
<div class="loading-spinner" x-show="$store.podcasts.loading">
<div class="spinner"></div>
</div>
<div x-show="!$store.podcasts.loading">
{% include "player/podcast_episodes.html" %}
</div>
</section></template
>
<p
class="podcast-notice"
x-show="!pod.subscribed"
x-text="$store.podcasts.text('subscribeHint')"
></p>
</div>
</template>
</section>
</template>