1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-03-02 02:31:35 +00:00

Rework subscribing to deleted channels

This commit is contained in:
Cadence Ember 2022-01-10 14:18:45 +13:00
parent 15e3f06ad6
commit 109dcd22de
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
12 changed files with 167 additions and 22 deletions

27
pug/channel-error.pug Normal file
View file

@ -0,0 +1,27 @@
extends includes/layout
include includes/video-list-item
include includes/subscribe-button
block head
title= `${data.row ? data.row.name : "Deleted channel"} - CloudTube`
script(type="module" src=getStaticURL("html", "/static/js/channel.js"))
block content
main.channel-page
if data.row
.channel-data
.info
- const iconURL = data.row.icon_url
if iconURL
.logo
img(src=iconURL alt="").thumbnail-image
.about
h1.name= data.row.name
+subscribe_button(data.ucid, subscribed, `/channel/${data.ucid}`).subscribe-button.base-border-look
.channel-error
div= data.message
if data.missing && subscribed
.you-should-unsubscribe To remove this channel from your subscriptions list, click Unsubscribe.

View file

@ -11,12 +11,24 @@ block content
if hasSubscriptions
section
details.channels-details
summary #{channels.length} subscriptions
summary
| #{channels.length} subscriptions
if missingChannelCount === 1
= ` - ${missingChannelCount} channel is gone`
else if missingChannelCount > 1
= ` - ${missingChannelCount} channels are gone`
.channels-list
for channel in channels
a(href=`/channel/${channel.ucid}`).channel-item
img(src=channel.icon_url width=512 height=512 alt="").thumbnail
span.name= channel.name
div
div.name= channel.name
if channel.missing
div.missing-reason
if channel.missing_reason
= channel.missing_reason
else
| This channel appears to be deleted or terminated. Click to check it.
if refreshed
section