Feature/999 add high resolution cover support upload storage and search (#1006)
* Add high-resolution cover support: upload, storage, and search * Disable tests until fixed
This commit is contained in:
@@ -11,25 +11,9 @@
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-[auto,1fr] pl-6 gap-y-4 gap-x-4 items-center">
|
||||
<p class=" py-1">Resolution:
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
pTooltip="Sets the resolution for generated cover images. Higher resolutions produce sharper covers but increase file size. Applies only to future books unless covers are regenerated."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
</p>
|
||||
<div class="flex gap-4 justify-start">
|
||||
<p-select
|
||||
[options]="resolutionOptions"
|
||||
[(ngModel)]="selectedResolution"
|
||||
(ngModelChange)="onResolutionChange()"
|
||||
placeholder="Select Resolution">
|
||||
</p-select>
|
||||
</div>
|
||||
|
||||
<p class=" py-1">Regenerate Covers?
|
||||
<i class="pi pi-info-circle text-sky-600"
|
||||
pTooltip="Regenerates cover images for all EPUB and PDF books (excluding locked ones) using the selected resolution."
|
||||
pTooltip="Regenerates cover images for all EPUB and PDF books (excluding locked ones) from the embedded covers in the file."
|
||||
tooltipPosition="right"
|
||||
style="cursor: pointer;">
|
||||
</i>
|
||||
|
||||
@@ -3,7 +3,6 @@ import {FormsModule} from '@angular/forms';
|
||||
import {Observable} from 'rxjs';
|
||||
|
||||
import {Divider} from 'primeng/divider';
|
||||
import {Select} from 'primeng/select';
|
||||
import {Button} from 'primeng/button';
|
||||
import {Tooltip} from 'primeng/tooltip';
|
||||
import {ToggleSwitch} from 'primeng/toggleswitch';
|
||||
@@ -20,7 +19,6 @@ import {InputText} from 'primeng/inputtext';
|
||||
standalone: true,
|
||||
imports: [
|
||||
Divider,
|
||||
Select,
|
||||
Button,
|
||||
Tooltip,
|
||||
ToggleSwitch,
|
||||
@@ -31,14 +29,6 @@ import {InputText} from 'primeng/inputtext';
|
||||
styleUrl: './global-preferences.component.scss'
|
||||
})
|
||||
export class GlobalPreferencesComponent implements OnInit {
|
||||
readonly resolutionOptions = [
|
||||
{label: '250x350', value: '250x350'},
|
||||
{label: '375x525', value: '375x525'},
|
||||
{label: '500x700', value: '500x700'},
|
||||
{label: '625x875', value: '625x875'}
|
||||
];
|
||||
|
||||
selectedResolution = '250x350';
|
||||
|
||||
toggles = {
|
||||
autoBookSearch: false,
|
||||
@@ -58,9 +48,6 @@ export class GlobalPreferencesComponent implements OnInit {
|
||||
filter(settings => !!settings),
|
||||
take(1)
|
||||
).subscribe(settings => {
|
||||
if (settings?.coverResolution) {
|
||||
this.selectedResolution = settings.coverResolution;
|
||||
}
|
||||
if (settings?.cbxCacheSizeInMb) {
|
||||
this.cbxCacheValue = settings.cbxCacheSizeInMb;
|
||||
}
|
||||
@@ -72,10 +59,6 @@ export class GlobalPreferencesComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
onResolutionChange(): void {
|
||||
this.saveSetting(AppSettingKey.COVER_IMAGE_RESOLUTION, this.selectedResolution);
|
||||
}
|
||||
|
||||
onToggleChange(settingKey: keyof typeof this.toggles, checked: boolean): void {
|
||||
this.toggles[settingKey] = checked;
|
||||
const toggleKeyMap: Record<string, AppSettingKey> = {
|
||||
|
||||
Reference in New Issue
Block a user