Show public podcasts in the federated search and subscribe from a card

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sanapachandClaude Opus 5.5 committed 2026-11-20 15:12:51 +02:00
1 parent 20bf30eae8
commit 59d94203db
6 files changed
+625 -5

No files matched your search

+79
View File
@@ -71,6 +71,85 @@
</div>
</template>
<!-- Podcast found in the federation: card, preview from its feed, subscribe -->
<template x-if="$store.podcasts.found">
<div class="modal-overlay" @click.self="$store.podcasts.closeFound()" @keydown.escape.window="$store.podcasts.closeFound()">
<div class="modal-box podcast-found-dialog" role="dialog" aria-modal="true" aria-labelledby="podcast-found-title">
<div class="podcast-found-head">
<div class="podcast-found-cover">
<template x-if="$store.podcasts.found.hit.image_url || $store.podcasts.found.preview?.image_url">
<img :src="$store.podcasts.found.hit.image_url || $store.podcasts.found.preview?.image_url" alt="" aria-hidden="true" referrerpolicy="no-referrer">
</template>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<rect x="9" y="2" width="6" height="12" rx="3"/><path d="M5 10a7 7 0 0014 0M12 17v5M8 22h8"/>
</svg>
</div>
<div class="podcast-found-heading">
<div class="podcast-found-badges">
<span class="podcast-type-badge">{{ t.player_podcast_type }}</span>
<span class="podcast-subscribed-badge" x-show="$store.podcasts.found.subscribed">{{ t.player_podcast_found_subscribed }}</span>
</div>
<h3 id="podcast-found-title" x-text="$store.podcasts.found.hit.title"></h3>
<div class="podcast-found-author" x-show="$store.podcasts.found.hit.author" x-text="$store.podcasts.found.hit.author"></div>
<div class="podcast-found-meta" x-text="$store.podcasts.foundMeta($store.podcasts.found.hit)"></div>
<a class="podcast-found-link" x-show="$store.podcasts.found.hit.link"
:href="$store.podcasts.found.hit.link" target="_blank" rel="noopener noreferrer nofollow"
x-text="$store.podcasts.found.hit.link"></a>
</div>
</div>
<p class="podcast-found-description" x-show="$store.podcasts.found.hit.description" x-text="$store.podcasts.found.hit.description"></p>
<div class="podcast-found-label">{{ t.player_podcast_found_feed }}</div>
<div class="podcast-share-url" x-text="$store.podcasts.found.hit.feed_url"></div>
<p class="podcast-share-hint">{{ t.player_podcast_found_note }}</p>
<div class="podcast-found-preview">
<template x-if="$store.podcasts.found.previewLoading">
<div class="podcast-found-status">{{ t.player_podcast_found_loading }}</div>
</template>
<template x-if="$store.podcasts.found.previewError">
<div class="podcast-found-status error">
<span x-text="$store.podcasts.found.previewError"></span>
<button class="modal-btn modal-btn-ghost" @click="$store.podcasts.loadFoundPreview()">{{ t.player_podcast_found_retry }}</button>
</div>
</template>
<template x-if="$store.podcasts.found.preview">
<div>
<div class="podcast-found-status" x-show="$store.podcasts.found.preview.moved">{{ t.player_podcast_found_moved }}</div>
<div class="podcast-chips podcast-found-seasons">
<template x-for="season in $store.podcasts.found.preview.seasons" :key="$store.podcasts.seasonValue(season)">
<span class="podcast-chip" x-text="`${$store.podcasts.seasonLabel(season)} · ${season.episode_count}`"></span>
</template>
</div>
<ul class="podcast-found-episodes">
<template x-for="(episode, index) in $store.podcasts.found.preview.episodes" :key="index">
<li>
<div class="podcast-found-episode-title" x-text="episode.title"></div>
<div class="podcast-found-episode-meta" x-text="$store.podcasts.episodeMeta(episode)"></div>
</li>
</template>
</ul>
<div class="podcast-found-status" x-show="$store.podcasts.foundMore($store.podcasts.found.preview)" x-text="$store.podcasts.foundMore($store.podcasts.found.preview)"></div>
</div>
</template>
</div>
<div class="podcast-found-status error" x-show="$store.podcasts.found.error" x-text="$store.podcasts.found.error"></div>
<div class="podcast-found-status" x-show="$store.podcasts.found.message" x-text="$store.podcasts.found.message"></div>
<div class="modal-footer">
<button class="modal-btn modal-btn-ghost" @click="$store.podcasts.closeFound()">{{ t.player_close }}</button>
<template x-if="$store.podcasts.found.subscribed">
<button class="modal-btn modal-btn-primary" @click="$store.podcasts.openFoundPodcast()">{{ t.player_podcast_found_open }}</button>
</template>
<template x-if="!$store.podcasts.found.subscribed">
<button class="modal-btn modal-btn-primary" :disabled="$store.podcasts.found.subscribing"
@click="$store.podcasts.subscribeFound()"
x-text="$store.podcasts.foundButtonLabel()"></button>
</template>
</div>
</div>
</div>
</template>
<!-- Create / Rename Playlist Modal -->
<template x-if="$store.playlists.modal">
<div class="modal-overlay" @click.self="$store.playlists.modal = null">