Fix: Cap ReaderSettings Zoom Value to 100

This commit is contained in:
Youwes09
2026-04-30 23:11:39 -05:00
parent 5dab7761bc
commit 0cd799f450
2 changed files with 5 additions and 9 deletions
-4
View File
@@ -29,9 +29,6 @@ In-Progress:
- Fix Tracking Login - Fix Tracking Login
- Pasting OAuth URL is not User-Friendly, Look for Alternatives - Pasting OAuth URL is not User-Friendly, Look for Alternatives
- Tracking
- Fix SeriesDetail Tracking Window (Maybe Link to TrackingPanel)
- Apply Syer's Fix for Library on Backup Load (Manga Metadata) - Apply Syer's Fix for Library on Backup Load (Manga Metadata)
- Note User's have to always install extensions manually - Note User's have to always install extensions manually
- Create "Missing Source" for Manga - Create "Missing Source" for Manga
@@ -39,7 +36,6 @@ In-Progress:
- Wire Series-Detail Refresh to Fix Manga-Metadata (MAJOR) - Wire Series-Detail Refresh to Fix Manga-Metadata (MAJOR)
- Add Disable Auto-Completed Feature to Library - Add Disable Auto-Completed Feature to Library
- Implement Unwired Fixes (DOCUMENT)
- Cap ReaderSettings Zoom (100) - Cap ReaderSettings Zoom (100)
- Fix SeriesDetail Chapter Amount (Link to Scanlator Filtering) - Fix SeriesDetail Chapter Amount (Link to Scanlator Filtering)
@@ -88,20 +88,20 @@
</div> </div>
</div> </div>
<div class="s-slider-row"> <div class="s-slider-row">
<input type="range" min={10} max={400} step={5} <input type="range" min={10} max={100} step={5}
value={Math.round((store.settings.readerZoom ?? 0.5) * 100)} value={Math.round((store.settings.readerZoom ?? 0.5) * 100)}
oninput={(e) => updateSettings({ readerZoom: Number(e.currentTarget.value) / 100 })} oninput={(e) => updateSettings({ readerZoom: Number(e.currentTarget.value) / 100 })}
class="s-slider" /> class="s-slider" />
<input type="number" min={10} max={400} step={5} class="s-slider-val" <input type="number" min={10} max={100} step={5} class="s-slider-val"
value={Math.round((store.settings.readerZoom ?? 0.5) * 100)} value={Math.round((store.settings.readerZoom ?? 0.5) * 100)}
oninput={(e) => { const n = parseInt(e.currentTarget.value, 10); if (!isNaN(n) && n >= 10 && n <= 400) updateSettings({ readerZoom: n / 100 }); }} oninput={(e) => { const n = parseInt(e.currentTarget.value, 10); if (!isNaN(n) && n >= 10 && n <= 100) updateSettings({ readerZoom: n / 100 }); }}
onblur={(e) => { const n = parseInt(e.currentTarget.value, 10); if (isNaN(n) || n < 10) { updateSettings({ readerZoom: 0.1 }); e.currentTarget.value = "10"; } else if (n > 400) { updateSettings({ readerZoom: 4.0 }); e.currentTarget.value = "400"; } }} onblur={(e) => { const n = parseInt(e.currentTarget.value, 10); if (isNaN(n) || n < 10) { updateSettings({ readerZoom: 0.1 }); e.currentTarget.value = "10"; } else if (n > 100) { updateSettings({ readerZoom: 1.0 }); e.currentTarget.value = "100"; } }}
/> />
<span class="s-slider-unit">%</span> <span class="s-slider-unit">%</span>
<button class="s-btn-icon" onclick={() => updateSettings({ readerZoom: 0.5 })} disabled={(store.settings.readerZoom ?? 0.5) === 0.5} title="Reset to 100%"></button> <button class="s-btn-icon" onclick={() => updateSettings({ readerZoom: 0.5 })} disabled={(store.settings.readerZoom ?? 0.5) === 0.5} title="Reset to 100%"></button>
</div> </div>
<div class="s-presets"> <div class="s-presets">
{#each [50, 75, 100, 125, 150, 200] as v} {#each [0, 10, 30, 50, 70, 90, 100] as v}
<button class="s-preset" class:active={Math.round((store.settings.readerZoom ?? 0.5) * 100) === v} onclick={() => updateSettings({ readerZoom: v / 100 })}>{v}%</button> <button class="s-preset" class:active={Math.round((store.settings.readerZoom ?? 0.5) * 100) === v} onclick={() => updateSettings({ readerZoom: v / 100 })}>{v}%</button>
{/each} {/each}
</div> </div>