Watch history (#232)

* [PoC] Watch history

* Render watch history on web app

* Changelog

* Log out user on insufficient access
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-12-20 09:39:42 -05:00
1 parent f581d568d9
commit a1aed7d253
10 files changed
+92 -13

No files matched your search

@@ -86,6 +86,7 @@
<div class="flex flex-col items-center">
<div class="w-64">
<VideoThumbnail
bind:videoId
bind:title
bind:videoThumbnails
bind:liveNow
@@ -94,7 +95,7 @@
bind:invidiousInstance
/>
</div>
<div class="m-4">{title}</div>
<div class="m-4">{title || ""}</div>
</div>
<div class="flex flex-col">
<VideoStartAt
@@ -142,6 +142,7 @@
<button class="w-80 p-2" on:click={videoModal.show()}>
<div class="card card-compact bg-base-100 shadow-xl border border-neutral">
<VideoThumbnail
bind:videoId
bind:title
bind:videoThumbnails
bind:liveNow
@@ -150,7 +151,7 @@
bind:invidiousInstance
/>
<div class="card-body">
<h3 class="card-title text-base line-clamp-2 min-h-12">{title}</h3>
<h3 class="card-title text-base line-clamp-2 min-h-12">{title || ""}</h3>
<button
class="font-semibold link"
on:click={(e) => {
@@ -158,7 +159,7 @@
channelModal.show();
}}
>
{author}
{author || ""}
</button>
<div>{getViewCountDateText()}</div>
</div>
@@ -1,4 +1,5 @@
<script lang="ts">
export let videoId: string | undefined = undefined;
export let title: string | undefined = undefined;
export let videoThumbnails: any[] | undefined = undefined;
export let liveNow: boolean = undefined;
@@ -19,6 +20,8 @@
url = invidiousInstance + url;
}
thumbnailUrl = url;
} else if (invidiousInstance) {
thumbnailUrl = `${invidiousInstance}/vi/${videoId || "--"}/mqdefault.jpg`;
}
}