TVDB özelliği eklendi.

This commit is contained in:
2025-10-28 04:14:42 +03:00
parent a2adc9958a
commit 8e07fb4e05
7 changed files with 3154 additions and 6 deletions

View File

@@ -2,17 +2,24 @@
import { Link } from "svelte-routing";
import { createEventDispatcher, onDestroy } from "svelte";
import { movieCount } from "../stores/movieStore.js";
import { tvShowCount } from "../stores/tvStore.js";
export let menuOpen = false;
const dispatch = createEventDispatcher();
let hasMovies = false;
let hasShows = false;
const unsubscribe = movieCount.subscribe((count) => {
const unsubscribeMovie = movieCount.subscribe((count) => {
hasMovies = (count ?? 0) > 0;
});
const unsubscribeTv = tvShowCount.subscribe((count) => {
hasShows = (count ?? 0) > 0;
});
onDestroy(() => {
unsubscribe();
unsubscribeMovie();
unsubscribeTv();
});
// Menü öğesine tıklanınca sidebar'ı kapat
@@ -51,6 +58,20 @@
</Link>
{/if}
{#if hasShows}
<Link
to="/tv"
class="item"
getProps={({ isCurrent }) => ({
class: isCurrent ? "item active" : "item",
})}
on:click={handleLinkClick}
>
<i class="fa-solid fa-tv icon"></i>
Tv Shows
</Link>
{/if}
<Link
to="/transfers"
class="item"