Skip to content

Commit 2310570

Browse files
authored
Merge pull request #56 from Chaphasilor/dev
Updates from dev
2 parents 90a65e1 + 0229fa8 commit 2310570

56 files changed

Lines changed: 727 additions & 746 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pre-commit

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
#
4+
# (optional) Copy this file to .git/hooks/
5+
#
6+
echo "Running Custom Commit Hook..."
7+
8+
echo "Formatting..."
9+
deno fmt --indent-width 2 . || exit 1
10+
11+
echo "Testing build..."
12+
deno task build || exit 1

src/lib/components/JellyfinRewindLogo.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
<script lang="ts">
2-
</script>
3-
41
<header>
5-
<!-- src={state.settings.darkMode
6-
? "/media/banner-dark.svg"
7-
: "/media/banner-light.svg"} -->
82
<img src="/jellyfin/banner-dark.svg" alt="Jellyfin Rewind Logo" />
93
</header>
104

src/lib/components/Loading.svelte

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
<script lang="ts">
2-
export let title: string;
3-
export let detail: string = "";
4-
export let max: number;
5-
export let cur: number;
2+
import type { Progress } from "$lib/utility/Progress";
3+
4+
export let progress: Progress;
5+
let { current, max, name } = progress;
66
</script>
77

88
<div>
99
<div>
10-
{#if max != 0 && cur == max}
11-
<h5 class="text-lg font-semibold opacity-75">{title}</h5>
10+
{#if $max != 0 && $current == $max}
11+
<h5 class="text-lg font-semibold opacity-75">{name}...</h5>
1212
{/if}
13-
{#if max != 0 && cur != max}
13+
{#if $max != 0 && $current != $max}
1414
<div class="progress">
15-
<h4 class="text-2xl font-bold">{title}</h4>
16-
<p class="mt-4 font-mono">{cur} / {max}</p>
15+
<h4 class="text-2xl font-bold">{name}...</h4>
16+
<p class="mt-4 font-mono">{$current} / {$max}</p>
1717
<!-- <p class="h-12">
1818
{#if detail != ""}
1919
{detail}
2020
{/if}
2121
</p> -->
2222
<div class="barbg">
2323
<div class="percent">
24-
{Math.round((cur / max) * 100)}%
24+
{Math.round(($current / $max) * 100)}%
2525
</div>
2626
<div
2727
class="barfg"
2828
style={`width: ${
29-
(cur / max) * 100
29+
($current / $max) * 100
3030
}%; transition: width 0.3s ease;`}
3131
>
3232
</div>

src/lib/components/Modal.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import type { Writable } from "svelte/store";
32
import { fade } from "svelte/transition";
43
54
export let open: boolean;

src/lib/components/Unavailable.svelte

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<script>
2-
import { writable } from "svelte/store";
32
import Modal from "./Modal.svelte";
4-
import { importRewindReport } from "$lib/utility/oldReportDelta";
5-
import { goto } from "$app/navigation";
6-
import { year } from "$lib/globals";
3+
import InfoIcon from "./icons/InfoIcon.svelte";
74
const { children } = $props();
85
96
let modalOpen = $state(false);
@@ -24,24 +21,7 @@
2421
}}
2522
class="w-32 rounded-md flex flex-row items-center justify-around px-2 py-1 bg-white text-gray-900"
2623
>
27-
<svg
28-
xmlns="http://www.w3.org/2000/svg"
29-
class="w-5 h-5 icon icon-tabler icon-tabler-info-square-rounded"
30-
width="24"
31-
height="24"
32-
viewBox="0 0 24 24"
33-
stroke-width="2"
34-
stroke="currentColor"
35-
fill="none"
36-
stroke-linecap="round"
37-
stroke-linejoin="round"
38-
>
39-
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
40-
<path d="M12 8h.01"></path>
41-
<path d="M11 12h1v4h1"></path>
42-
<path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z">
43-
</path>
44-
</svg>
24+
<InfoIcon />
4525
<span class="font-medium">Learn why</span>
4626
</button>
4727
</div>

src/lib/components/UnavailableReasonPlaybackReporting.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { goto } from "$app/navigation";
3-
import { year } from "$lib/globals";
42
import jellyfin from "$lib/jellyfin";
53
64
const { closeModal }: { closeModal: () => void } = $props();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<svg
2+
class="text-green-500 icon icon-tabler icons-tabler-outline icon-tabler-check"
3+
xmlns="http://www.w3.org/2000/svg"
4+
width="24"
5+
height="24"
6+
viewBox="0 0 24 24"
7+
fill="none"
8+
stroke="currentColor"
9+
stroke-width="2"
10+
stroke-linecap="round"
11+
stroke-linejoin="round"
12+
>
13+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
14+
<path d="M5 12l5 5l10 -10" />
15+
</svg>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<svg
2+
xmlns="http://www.w3.org/2000/svg"
3+
class="w-3 h-3 stroke-2 icon icon-tabler icon-tabler-point"
4+
viewBox="0 0 24 24"
5+
stroke="currentColor"
6+
fill="none"
7+
stroke-linecap="round"
8+
stroke-linejoin="round"
9+
>
10+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
11+
<circle cx="12" cy="12" r="4"></circle>
12+
</svg>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script lang="ts">
2+
export let red: boolean = false;
3+
</script>
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
class="icon icon-tabler icon-tabler-x"
7+
class:text-red-500={red}
8+
width="24"
9+
height="24"
10+
viewBox="0 0 24 24"
11+
stroke-width="2"
12+
stroke="currentColor"
13+
fill="none"
14+
stroke-linecap="round"
15+
stroke-linejoin="round"
16+
>
17+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
18+
<line x1="18" y1="6" x2="6" y2="18"></line>
19+
<line x1="6" y1="6" x2="18" y2="18"></line>
20+
</svg>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<svg
2+
xmlns="http://www.w3.org/2000/svg"
3+
class="w-7 h-7 stroke-[2.5] icon icon-tabler icon-tabler-download"
4+
width="24"
5+
height="24"
6+
viewBox="0 0 24 24"
7+
stroke="currentColor"
8+
fill="none"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
>
12+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
13+
<path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"></path>
14+
<polyline points="7 11 12 16 17 11"></polyline>
15+
<line x1="12" y1="4" x2="12" y2="16"></line>
16+
</svg>

0 commit comments

Comments
 (0)