1
0
Fork 0
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:
Cadence Ember 2021-01-09 14:09:59 +13:00
parent 27435cc3b5
commit ac28332ac0
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
7 changed files with 83 additions and 18 deletions

View file

@ -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