feat(api): allow disable of kobo store proxy (#337)

* chore(api): fix typing for kobo sync service

* feat(api): add more paths for grimmory/kobo API

* fix(api): disable kobo features if kobo is unavailable

* feat(api): add proxy flag to kobo setting

* feat(api): adhere to kobo proxy enabled flag

* feat(ui): add forward requests toggle

* fix(ui): load setting

* style: use assertNotNull

* fix: reduce advertised routes

this cuts down the advertised routes - in particular to reduce the
number of auth-related requests we will be taking on.  we may eventually
want to do this but I want to reduce the amount of change in this PR

* fix: undo disable of kobo features

This reverts commit 1b242fa6614084b05c58ff3b24e142adb1bcf729.
This commit is contained in:
James Ward
2026-04-22 17:27:05 -04:00
committed by Zach Yale
parent 34042be1c9
commit 91c19739dc
12 changed files with 249 additions and 144 deletions
@@ -309,6 +309,24 @@
</p>
</div>
</div>
<p-divider></p-divider>
<div class="setting-item">
<div class="setting-info">
<div class="setting-label-row">
<span class="setting-label">{{ t('kobo.forwardToKoboStore') }}</span>
<p-toggle-switch
id="forwardToKoboStore"
[(ngModel)]="koboSettings.forwardToKoboStore"
(ngModelChange)="onToggleChange()">
</p-toggle-switch>
</div>
<p class="setting-description">
{{ t('kobo.forwardToKoboStoreDesc') }}
</p>
</div>
</div>
</div>
</div>
}
@@ -52,7 +52,8 @@ export class KoboSyncSettingsComponent implements OnInit, OnDestroy {
convertCbxToEpub: false,
conversionImageCompressionPercentage: 85,
conversionLimitInMbForCbx: 100,
forceEnableHyphenation: false
forceEnableHyphenation: false,
forwardToKoboStore: false
};
koboSyncSettings: KoboSyncSettings = {
@@ -138,6 +139,7 @@ export class KoboSyncSettingsComponent implements OnInit, OnDestroy {
this.koboSettings.conversionLimitInMbForCbx = settings.koboSettings?.conversionLimitInMbForCbx ?? 100;
this.koboSettings.forceEnableHyphenation = settings.koboSettings?.forceEnableHyphenation ?? false;
this.koboSettings.conversionImageCompressionPercentage = settings.koboSettings?.conversionImageCompressionPercentage ?? 85;
this.koboSettings.forwardToKoboStore = settings.koboSettings?.forwardToKoboStore ?? false;
}
}