diff --git a/src/features/tracking/components/Tracking.svelte b/src/features/tracking/components/Tracking.svelte index 026fffd..38c1cb0 100644 --- a/src/features/tracking/components/Tracking.svelte +++ b/src/features/tracking/components/Tracking.svelte @@ -1,29 +1,19 @@
- -
-
-

Tracking

- -
- - {#if !trackingState.loadingAll && loggedIn.length > 0} -
- - {#each loggedIn as t} - - {/each} -
- -
-
- - -
- - -
- {/if} -
+ trackingState.loadAll()} + onTrackerChange={(id) => { activeTrackerId = id; statusFilter = "all"; }} + onStatusChange={(v) => statusFilter = v} + onSearchChange={(v) => searchQuery = v} + onSortChange={(v) => sortBy = v} + />
{#if trackingState.loadingAll} @@ -240,240 +81,28 @@ {:else}
{#each filtered as record (record.tracker.id + ":" + record.id)} - {@const isBusy = updatingId === record.id} - {@const isSyncing = syncingId === record.id} - {@const progress = calcProgress(record.lastChapterRead, record.totalChapters)} - {@const stars = scoreToStars(record.displayScore, record.tracker.scores)} - -
- -
-
openManga(record)} - onkeydown={(e) => e.key === "Enter" && openManga(record)} - > - {#if record.manga?.thumbnailUrl} - - {:else} -
- {/if} -
- -
- {#if record.private} - - {/if} - {#if isSyncing} - - {:else} - - {/if} - {#if record.remoteUrl} - - - - {/if} - -
- -
- -
-
- -
-
- {#each Array(5) as _, i} - - {/each} -
- -
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 editingChapter === record.id} - - {:else} -
openChapterEditor(record)} - onkeydown={(e) => e.key === "Enter" && openChapterEditor(record)} - > -
- - {#if progress !== null} - Ch. {record.lastChapterRead} / {record.totalChapters} - {:else if record.lastChapterRead > 0} - Ch. {record.lastChapterRead} read - {:else} - Set chapter… - {/if} - - {#if progress !== null} - {Math.round(progress)}% - {/if} -
-
-
-
-
- {/if} -
-
+ selectedRecord = r} + /> {/each}
{/if}
-{#if confirmUnbind} - {@const r = confirmUnbind} - +{#if selectedRecord} + selectedRecord = null} /> {/if} \ No newline at end of file diff --git a/src/features/tracking/components/TrackingCard.svelte b/src/features/tracking/components/TrackingCard.svelte new file mode 100644 index 0000000..8413e6c --- /dev/null +++ b/src/features/tracking/components/TrackingCard.svelte @@ -0,0 +1,79 @@ + + + + + \ No newline at end of file diff --git a/src/features/tracking/components/TrackingPreview.svelte b/src/features/tracking/components/TrackingPreview.svelte new file mode 100644 index 0000000..01e6e62 --- /dev/null +++ b/src/features/tracking/components/TrackingPreview.svelte @@ -0,0 +1,603 @@ + + + + +{#if confirmUnbind} + +{/if} + + \ No newline at end of file diff --git a/src/features/tracking/components/TrackingToolbar.svelte b/src/features/tracking/components/TrackingToolbar.svelte new file mode 100644 index 0000000..614a688 --- /dev/null +++ b/src/features/tracking/components/TrackingToolbar.svelte @@ -0,0 +1,172 @@ + + +
+
+ Tracking + +
+ + {#if !loading && loggedIn.length > 0} +
+ + {#each loggedIn as t} + + {/each} +
+ +
+
+ + onSearchChange((e.target as HTMLInputElement).value)} + /> +
+ + + + +
+ {/if} +
+ + \ No newline at end of file