Revert "Web app to Svelte5 (#540)"

This reverts commit c534c27ae3.
This commit is contained in:
Brahim Hadriche committed 2025-01-09 21:54:08 -05:00
1 parent f987558884
commit aab20f2364
35 files changed
+2336 -1729

No files matched your search

+7 -20
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { playletStateStore, translate } from "lib/Stores";
import { playletStateStore, tr } from "lib/Stores";
import VideoCastDialog from "./VideoCastDialog.svelte";
import VideoThumbnail from "./VideoThumbnail.svelte";
import ChannelCastDialog from "./ChannelCastDialog.svelte";
@@ -74,7 +74,7 @@
return "";
}
const trFn = get(translate);
const trFn = get(tr);
const currentTime = Math.floor(Date.now() / 1000);
let timeLeft = premiereTimestamp - currentTime;
@@ -126,7 +126,7 @@
if (isNaN(published)) {
return "";
}
const trFn = get(translate);
const trFn = get(tr);
const currentTime = Math.floor(Date.now() / 1000);
const span = currentTime - published;
if (span < 1) {
@@ -181,12 +181,7 @@
}
</script>
<button
class="w-80 p-2"
on:click={() => {
videoModal.show();
}}
>
<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
@@ -202,23 +197,15 @@
/>
<div class="card-body">
<h3 class="card-title text-base line-clamp-2 min-h-12">{title || ""}</h3>
<span
class="font-semibold link cursor-pointer"
role="button"
tabindex="0"
<button
class="font-semibold link"
on:click={(e) => {
e.stopPropagation();
channelModal.show();
}}
on:keydown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
channelModal.show();
}
}}
>
{author || ""}
</span>
</button>
<div>{getViewCountDateText()}</div>
</div>
</div>