mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-02 02:31:35 +00:00
Add "mark watched" button to subscriptions page
This commit is contained in:
parent
27435cc3b5
commit
ac28332ac0
7 changed files with 83 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
|||
mixin video_list_item(className, video, instanceOrigin)
|
||||
mixin video_list_item(className, video, instanceOrigin, options = {})
|
||||
div(class={[className]: true, "video-list-item--watched": video.watched})
|
||||
- let link = `/watch?v=${video.videoId}`
|
||||
a(href=link tabindex="-1").thumbnail
|
||||
|
|
@ -16,5 +16,9 @@ mixin video_list_item(className, video, instanceOrigin)
|
|||
if video.publishedText
|
||||
= ` • `
|
||||
span.published= video.publishedText
|
||||
if options.showMarkWatched
|
||||
form(method="post" action=`/formapi/markwatched/${video.videoId}`).mark-watched
|
||||
= ` • `
|
||||
button.mark-watched__button Mark watched
|
||||
if video.descriptionHtml
|
||||
div.description!= video.descriptionHtml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue