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:
parent
15e3f06ad6
commit
109dcd22de
12 changed files with 167 additions and 22 deletions
27
pug/channel-error.pug
Normal file
27
pug/channel-error.pug
Normal 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.
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue