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:
+18
@@ -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>
|
||||
}
|
||||
|
||||
+3
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ export interface KoboSettings {
|
||||
convertCbxToEpub: boolean;
|
||||
conversionLimitInMbForCbx: number;
|
||||
forceEnableHyphenation: boolean;
|
||||
forwardToKoboStore: boolean;
|
||||
}
|
||||
|
||||
export interface CoverCroppingSettings {
|
||||
|
||||
@@ -102,7 +102,9 @@
|
||||
"autoAddEnabled": "New books will be automatically added to Kobo shelf",
|
||||
"autoAddDisabled": "Auto-add to Kobo shelf disabled",
|
||||
"pros": "Pros:",
|
||||
"cons": "Cons:"
|
||||
"cons": "Cons:",
|
||||
"forwardToKoboStore": "Forward to Rakuten Kobo Store",
|
||||
"forwardToKoboStoreDesc": "Combines your Grimmory requests with requests from the Rakuten Kobo Store, so users can still access purchased books and get recommendations."
|
||||
},
|
||||
"hardcover": {
|
||||
"title": "Hardcover Integration",
|
||||
|
||||
Reference in New Issue
Block a user