fix(kobo): send Kobo covers at the device's screen size

A Kobo asks for each cover at its screen size but always got the
400x600 grid thumbnail, so sleep screens and full-screen covers were
blurry. Scale the full cover to fit the requested box instead, behind a
new Full-size covers setting that is on by default. Drop the stale
UserStorage entries from the authorization matrix gap baseline.

Fixes #924
This commit is contained in:
neon
2026-10-17 03:34:18 +00:00
parent 51b53d4581
commit 2dca4bc85c
16 changed files with 24352 additions and 21 deletions
@@ -26,6 +26,7 @@ function makeSettings(overrides: Partial<KoboSyncSettings> = {}): KoboSyncSettin
twoWayProgressSync: false,
syncBookOrbitAnnotationsToKobo: false,
storeSync: false,
fullSizeCovers: true,
...overrides,
}
}
@@ -45,6 +46,12 @@ describe('useKoboSettings', () => {
expect(settings.value.storeSync).toBe(false)
})
it('defaults full-size covers to on before any fetch resolves', async () => {
const { settings } = await freshComposable()
expect(settings.value.fullSizeCovers).toBe(true)
})
it('adopts the store sync flag the server reports', async () => {
apiMock.mockResolvedValue(makeResponse(makeSettings({ storeSync: true })))
const { settings, fetchSettings } = await freshComposable()
@@ -11,6 +11,7 @@ const settings = ref<KoboSyncSettings>({
twoWayProgressSync: false,
syncBookOrbitAnnotationsToKobo: false,
storeSync: false,
fullSizeCovers: true,
})
let fetchPromise: Promise<void> | null = null
@@ -57,6 +57,7 @@ const kepubConversionLimitMb = ref(100)
const twoWayProgressSync = ref(false)
const syncBookOrbitAnnotationsToKobo = ref(false)
const storeSync = ref(false)
const fullSizeCovers = ref(true)
const savingSettings = ref(false)
const settingsError = ref<string | null>(null)
const refreshingHistory = ref(false)
@@ -154,6 +155,7 @@ function applySettingsToLocal() {
twoWayProgressSync.value = settings.value.twoWayProgressSync
syncBookOrbitAnnotationsToKobo.value = settings.value.syncBookOrbitAnnotationsToKobo
storeSync.value = settings.value.storeSync
fullSizeCovers.value = settings.value.fullSizeCovers
readAloudDelivery.value = settings.value.readAloudDelivery ?? null
}
@@ -692,6 +694,7 @@ async function saveSettings() {
twoWayProgressSync: twoWayProgressSync.value,
syncBookOrbitAnnotationsToKobo: syncBookOrbitAnnotationsToKobo.value,
storeSync: storeSync.value,
fullSizeCovers: fullSizeCovers.value,
...(deliverySupported.value ? { readAloudDelivery: readAloudDelivery.value } : {}),
})
applySettingsToLocal()
@@ -1130,6 +1133,18 @@ function beginCreate() {
<ToggleSwitch v-model="forceEnableHyphenation" />
</div>
<div class="flex items-center justify-between px-5 py-4 bg-card">
<div class="pr-8">
<p class="settings-label">
{{ t('settings.reader.kobo.fullSizeCovers') }}
</p>
<p class="settings-hint">
{{ t('settings.reader.kobo.fullSizeCoversHint') }}
</p>
</div>
<ToggleSwitch v-model="fullSizeCovers" />
</div>
<div class="px-5 py-5 bg-card space-y-5">
<div>
<p class="settings-label mb-1">
+2
View File
@@ -3131,6 +3131,8 @@
"syncHighlightsHint": "Send highlights made in BookOrbit or KOReader to your Kobo. Kobo highlights are imported into BookOrbit even when this is off. Linked annotations sync edits and deletes both ways. Requires KEPUB delivery; the book on Kobo must be the KEPUB downloaded from BookOrbit.",
"storeSync": "Include Kobo store titles",
"storeSyncHint": "Also deliver books from your Kobo account, including Kobo Plus and purchases, alongside your BookOrbit library. Without this, only BookOrbit books reach the device. Store titles are downloaded from Kobo directly and are not added to your BookOrbit library.",
"fullSizeCovers": "Full-size covers",
"fullSizeCoversHint": "Send each cover at your Kobo's screen resolution, so sleep screens and full-screen covers stay sharp. Turn this off to send smaller covers that sync faster. A cover already on a Kobo changes only when the book's cover changes.",
"convertKepub": "Convert to KEPUB",
"convertKepubHint": "Send eligible EPUBs as KEPUB. This stays on when progress sync or BookOrbit-to-Kobo highlights are enabled. On the next Kobo sync, affected books are offered again as KEPUB downloads; remove any old EPUB copy if Kobo keeps opening it.",
"forceHyphenation": "Force hyphenation",