diff --git a/src/features/series/panels/TrackingPanel.svelte b/src/features/series/panels/TrackingPanel.svelte index abfe602..2575cb5 100644 --- a/src/features/series/panels/TrackingPanel.svelte +++ b/src/features/series/panels/TrackingPanel.svelte @@ -1,5 +1,5 @@ - e.key === "Escape" && onClose()} /> + { if (e.key === "Escape") { if (confirmUnbindId !== null) { confirmUnbindId = null; } else if (editingId !== null) { editingId = null; } else { onClose(); } } }} /> {#if loading}
- - Loading… +
{:else if loggedInTrackers.length === 0} @@ -284,119 +288,140 @@
{#if records.length === 0}
-

Not tracking this manga yet.

-

Click a tracker tab above to search and add it.

+

Not tracking yet.

+

Click a tracker tab above to search and link it.

{:else} {#each records as record (record.id)} {@const tracker = trackerFor(record.trackerId)} {@const isBusy = updatingRecord === record.id} + {@const isEdit = editingId === record.id} + {@const pct = record.totalChapters > 0 ? Math.min(100, (record.lastChapterRead / record.totalChapters) * 100) : null} + {@const canUnlink = !tracker || tracker.supportsTrackDeletion !== false} +
- {#if tracker}{/if} + {#if tracker}{/if} {tracker?.name ?? "Tracker"} + {#if record.remoteUrl} + + + + {/if}
-
+
{#if tracker?.supportsPrivateTracking} {/if} - {#if store.settings.trackerSyncBack} - {/if} - + {/if} +
+
+ +
+
+ + {#if (tracker?.scores ?? []).length > 0} + + {/if} +
+ + {#if isEdit} +
+
+ Chapter read +
+ 0 ? record.totalChapters : undefined} + step="0.5" bind:value={chapterDraft} + onkeydown={(e) => { if (e.key === "Enter") submitChapter(record); if (e.key === "Escape") cancelEditor(); }} + use:autoFocus + /> + {#if record.totalChapters > 0} + / {record.totalChapters} + {/if} +
+
+ {#if record.totalChapters > 0} + + {/if} + {#if tracker?.supportsReadingDates} +
+
+ + Started + +
+
+ + Finished + +
+
+ {/if} +
+ + +
+
+ {:else} + -
-
- - {#if record.remoteUrl} - - {record.title} - - {:else} - {record.title} - {/if} - -
- - -
- - {#if editingChapter === record.id} -
-
- Chapter read -
- 0 ? record.totalChapters : undefined} - step="0.5" bind:value={chapterDraft} - onkeydown={(e) => { if (e.key === "Enter") submitChapter(record); if (e.key === "Escape") cancelChapterEditor(); }} - use:autoFocus - /> - {#if record.totalChapters > 0} - / {record.totalChapters} - {/if} -
-
- {#if record.totalChapters > 0} - - {/if} -
- - -
-
- {:else} -
openChapterEditor(record)} - onkeydown={(e) => e.key === "Enter" && openChapterEditor(record)} - title="Click to edit" - > -
- - {#if record.totalChapters > 0} - Ch. {record.lastChapterRead} / {record.totalChapters} - {:else if record.lastChapterRead > 0} - Ch. {record.lastChapterRead} read - {:else} - Set chapter… - {/if} - - Edit -
- {#if record.totalChapters > 0} -
-
+ {#if pct !== null} +
+
{/if} -
- {/if} + {/if} +
{/each} @@ -416,7 +441,7 @@ onkeydown={(e) => e.key === "Enter" && doSearch(activeTab as number, searchQuery)} use:autoFocus /> - {#if searching}{/if} + {#if searching}{/if}
@@ -453,7 +478,7 @@ {/if}
- {isBound ? "✓ Tracking" : "Track"} + {isBound ? "✓ Linked" : "Link"} {/each} @@ -465,41 +490,59 @@ +{#if confirmUnbindId !== null} + {@const rec = records.find(r => r.id === confirmUnbindId)} + {@const trk = rec ? trackerFor(rec.trackerId) : null} + +{/if} + \ No newline at end of file