Add option to force hyphenation in KEPUB (#1656)
* Add option to force hyphenation in KEPUB Fixes #1465 * Default force hyphenation to false * Remove commented out code
This commit is contained in:
+18
@@ -207,6 +207,24 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-info">
|
||||
<div class="setting-label-row">
|
||||
<label class="setting-label">Force Enable Hyphenation</label>
|
||||
<p-toggle-switch
|
||||
id="forceEnableHyphenation"
|
||||
[(ngModel)]="koboSettings.forceEnableHyphenation"
|
||||
(ngModelChange)="onToggleChange()">
|
||||
</p-toggle-switch>
|
||||
</div>
|
||||
<p class="setting-description">
|
||||
Force enable hyphenation. Otherwise, hyphenation is only enabled when text alignment on the Kobo
|
||||
device is explicitly set to <i>justified</i>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
+3
-1
@@ -45,7 +45,8 @@ export class KoboSyncSettingsComponent implements OnInit, OnDestroy {
|
||||
|
||||
koboSettings: KoboSettings = {
|
||||
convertToKepub: false,
|
||||
conversionLimitInMb: 100
|
||||
conversionLimitInMb: 100,
|
||||
forceEnableHyphenation: false
|
||||
};
|
||||
|
||||
koboSyncSettings: KoboSyncSettings = {
|
||||
@@ -122,6 +123,7 @@ export class KoboSyncSettingsComponent implements OnInit, OnDestroy {
|
||||
.subscribe(settings => {
|
||||
this.koboSettings.convertToKepub = settings?.koboSettings?.convertToKepub ?? true;
|
||||
this.koboSettings.conversionLimitInMb = settings?.koboSettings?.conversionLimitInMb ?? 100;
|
||||
this.koboSettings.forceEnableHyphenation = settings?.koboSettings?.forceEnableHyphenation ?? false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ export interface PublicReviewSettings {
|
||||
export interface KoboSettings {
|
||||
convertToKepub: boolean;
|
||||
conversionLimitInMb: number;
|
||||
forceEnableHyphenation: boolean;
|
||||
}
|
||||
|
||||
export interface AppSettings {
|
||||
|
||||
Reference in New Issue
Block a user