Add the share toggle and privacy dialog to the podcast page

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 588ea4e99e
commit 74ad88d06e
6 files changed
+318 -2

No files matched your search

+24
View File
@@ -762,6 +762,7 @@
<div class="card-subtitle" x-text="podcast.author || ''"></div>
<div class="card-subtitle" x-text="$store.podcasts.podcastCounts(podcast)"></div>
<div class="card-subtitle podcast-unsubscribed-label" x-show="!podcast.subscribed" x-cloak>{{ t.player_podcast_unsubscribed }}</div>
<div class="card-subtitle podcast-shared-label" x-show="podcast.subscribed && podcast.shared" x-cloak>{{ t.player_podcast_shared_badge }}</div>
<div class="card-subtitle podcast-fetch-error"
x-show="podcast.fetch && podcast.fetch.last_error"
x-cloak
@@ -824,6 +825,17 @@
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 12a9 9 0 11-3-6.7L21 8"/><path d="M21 3v5h-5"/></svg>
<span x-text="$store.podcasts.refreshing ? '{{ t.player_podcast_refreshing }}' : '{{ t.player_podcast_refresh }}'"></span>
</button>
<button class="release-action-btn secondary podcast-share-toggle"
x-show="$store.podcasts.current.subscribed && $store.podcasts.share"
x-cloak
:class="{ active: $store.podcasts.share && $store.podcasts.share.shared }"
:aria-pressed="$store.podcasts.share && $store.podcasts.share.shared ? 'true' : 'false'"
:disabled="$store.podcasts.sharing || !$store.podcasts.share || (!$store.podcasts.share.shared && !$store.podcasts.share.can_share)"
:title="$store.podcasts.share && $store.podcasts.share.card_error ? '{{ t.player_podcast_share_unavailable }}' : ''"
@click="$store.podcasts.toggleShare()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.6" y1="13.5" x2="15.4" y2="17.5"/><line x1="15.4" y1="6.5" x2="8.6" y2="10.5"/></svg>
<span x-text="$store.podcasts.sharing ? '{{ t.player_podcast_sharing }}' : ($store.podcasts.share && $store.podcasts.share.shared ? '{{ t.player_podcast_unshare }}' : '{{ t.player_podcast_share }}')"></span>
</button>
<button class="release-action-btn secondary podcast-unsubscribe"
x-show="$store.podcasts.current.subscribed"
@click="$store.podcasts.unsubscribe()">
@@ -836,6 +848,18 @@
<span>{{ t.player_podcast_subscribe }}</span>
</button>
</div>
<div class="podcast-share-status"
x-show="$store.podcasts.current.subscribed && $store.podcasts.share"
x-cloak
:class="{ pending: $store.podcasts.share && $store.podcasts.share.pending_confirmation }">
<span x-text="$store.podcasts.shareStatus()"></span>
<button class="podcast-share-review"
type="button"
x-show="$store.podcasts.share && $store.podcasts.share.pending_confirmation"
:disabled="$store.podcasts.sharing"
@click="$store.podcasts.reviewShare()">{{ t.player_podcast_share_review }}</button>
</div>
<div class="podcast-message error" x-show="$store.podcasts.shareError" x-cloak x-text="$store.podcasts.shareError"></div>
<div class="podcast-message" x-show="$store.podcasts.refreshMessage" x-cloak x-text="$store.podcasts.refreshMessage"></div>
<div class="podcast-message error" x-show="$store.podcasts.actionError" x-cloak x-text="$store.podcasts.actionError"></div>
</div>