diff --git a/flake.nix b/flake.nix index 700b83b..7b22b01 100644 --- a/flake.nix +++ b/flake.nix @@ -264,6 +264,15 @@ EOF ''; }; + tunnelScript = pkgs.writeShellApplication { + name = "moku-tunnel"; + runtimeInputs = with pkgs; [ cloudflared ]; + text = '' + PORT="''${1:-4567}" + cloudflared tunnel --url "http://localhost:$PORT" + ''; + }; + in { apps = { @@ -272,6 +281,7 @@ EOF bump = { type = "app"; program = "${bumpScript}/bin/moku-bump"; }; flatpak = { type = "app"; program = "${flatpakScript}/bin/moku-flatpak"; }; pkgbuild-bump = { type = "app"; program = "${pkgbuildBumpScript}/bin/moku-pkgbuild-bump"; }; + tunnel = { type = "app"; program = "${tunnelScript}/bin/moku-tunnel"; }; }; packages = { @@ -288,6 +298,7 @@ EOF nodejs_22 pnpm suwayomi-server + cloudflared xdg-utils ]; shellHook = '' @@ -301,6 +312,7 @@ EOF echo " nix run .#bump -- bump versions only" echo " nix run .#flatpak -- full flatpak build" echo " nix run .#pkgbuild-bump -- patch PKGBUILD (after tag push)" + echo " nix run .#tunnel -- [port] cloudflare tunnel (default 4567)" ''; }; diff --git a/src/components/layout/RecentActivity.svelte b/src/components/layout/RecentActivity.svelte index 5ddec63..98ab4b7 100644 --- a/src/components/layout/RecentActivity.svelte +++ b/src/components/layout/RecentActivity.svelte @@ -1,6 +1,6 @@
-

Tracking

@@ -231,7 +226,6 @@
- {#if !loading && loggedInTrackers.length > 0}
{/each}
-
@@ -266,7 +259,6 @@ bind:value={searchQuery} />
-
-
{/if}
-
{#if loading}
- - Loading tracking data… + + Loading…
{:else if error} @@ -309,84 +299,94 @@ {:else if loggedInTrackers.length === 0}

No trackers connected.

-

Go to Settings → Tracking to log in to AniList, MAL, or others.

+

Go to Settings → Tracking to connect AniList, MAL, or others.

{:else if filtered.length === 0}
-

{searchQuery || statusFilter !== "all" ? "No results match your filters." : "Nothing tracked yet."}

+

{searchQuery || statusFilter !== "all" ? "No results." : "Nothing tracked yet."}

{#if searchQuery || statusFilter !== "all"} {/if}
{:else} -
+
{#each filtered as record (record.tracker.id + ":" + record.id)} - {@const tracker = record.tracker} - {@const isBusy = updatingId === record.id} + {@const tracker = record.tracker} + {@const isBusy = updatingId === record.id} {@const isSyncing = syncingId === record.id} - {@const progress = record.totalChapters > 0 + {@const progress = record.totalChapters > 0 ? Math.min(100, (record.lastChapterRead / record.totalChapters) * 100) : null} + {@const stars = scoreToStars(record.displayScore, tracker.scores)} + {@const statusName = (tracker.statuses ?? []).find(s => s.value === record.status)?.name ?? "—"}
- -
openManga(record)} - onkeydown={(e) => e.key === "Enter" && openManga(record)} - > - {#if record.manga?.thumbnailUrl} - {record.title} - {:else} -
- {/if} - - {tracker.name} -
- - -
-
-
openManga(record)} - onkeydown={(e) => e.key === "Enter" && openManga(record)} - > - {record.title} - {#if record.manga?.title && record.manga.title !== record.title} - {record.manga.title} - {/if} -
-
- {#if activeTrackerId === "all"} - - {record.tracker.name} - {record.tracker.name} - - {/if} - {#if isSyncing} - - {:else} - - {/if} - {#if record.remoteUrl} - - - - {/if} - -
+
+
openManga(record)} + onkeydown={(e) => e.key === "Enter" && openManga(record)} + title="Open in library" + > + {#if record.manga?.thumbnailUrl} + + {:else} +
+ {/if}
- -
+
+ {#if record.private} + + {/if} + {#if isSyncing} + + + + {:else} + + {/if} + {#if record.remoteUrl} + + + + {/if} + +
+ +
+ +
+
+ + {/each} @@ -485,151 +468,425 @@
- + + diff --git a/src/components/shared/TrackingPanel.svelte b/src/components/shared/TrackingPanel.svelte index 3eb58d6..2df27b0 100644 --- a/src/components/shared/TrackingPanel.svelte +++ b/src/components/shared/TrackingPanel.svelte @@ -1,6 +1,7 @@