();
// var pendingMigrations = await context.Database.GetPendingMigrationsAsync();
diff --git a/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html b/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html
index 867be0a4a..a972328c3 100644
--- a/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html
+++ b/UI/Web/src/app/admin/_modals/library-editor-modal/library-editor-modal.component.html
@@ -16,8 +16,10 @@
-
-
diff --git a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts
index 4c94bfb51..282f383af 100644
--- a/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts
+++ b/UI/Web/src/app/cards/card-detail-layout/card-detail-layout.component.ts
@@ -157,8 +157,6 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
if (this.filterSettings === undefined) {
this.filterSettings = new FilterSettings();
}
-
- this.setupGenreTypeahead();
this.libraryService.getLibrariesForMember().subscribe(libs => {
this.libraries = libs.map(lib => {
@@ -168,15 +166,10 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
selected: true,
}
});
- this.setupLibraryTypeahead();
+ this.setupTypeaheads();
});
- this.setupCollectionTagTypeahead();
- this.setupPersonTypeahead();
- this.setupAgeRatingSettings();
- this.setupPublicationStatusSettings();
- this.setupTagSettings();
- this.setupLanguageSettings();
+
}
ngOnDestroy() {
@@ -184,6 +177,17 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
this.onDestory.complete();
}
+ setupTypeaheads() {
+ this.setupLibraryTypeahead();
+ this.setupCollectionTagTypeahead();
+ this.setupPersonTypeahead();
+ this.setupAgeRatingSettings();
+ this.setupPublicationStatusSettings();
+ this.setupTagSettings();
+ this.setupLanguageSettings();
+ this.setupGenreTypeahead();
+ }
+
setupFormatTypeahead() {
this.formatSettings.minCharacters = 0;
@@ -355,6 +359,7 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
const f = filter.toLowerCase();
return options.filter(m => m.title.toLowerCase() === f);
}
+
if (this.filterSettings.presetCollectionId > 0) {
this.collectionSettings.fetchFn('').subscribe(tags => {
this.collectionSettings.savedData = tags.filter(item => item.value.id === this.filterSettings.presetCollectionId);
@@ -364,6 +369,17 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
}
}
+ applyPresets() {
+
+ // if (this.filterSettings.presetCollectionId > 0) {
+ // this.collectionSettings.fetchFn('').subscribe(tags => {
+ // this.collectionSettings.savedData = tags.filter(item => item.value.id === this.filterSettings.presetCollectionId);
+ // this.filter.collectionTags = this.collectionSettings.savedData.map(item => item.value.id);
+ // this.resetTypeaheads.next(true);
+ // });
+ // }
+ }
+
setupPersonTypeahead() {
this.peopleSettings = {};
@@ -579,6 +595,8 @@ export class CardDetailLayoutComponent implements OnInit, OnDestroy {
this.readProgressGroup.get('inProgress')?.setValue(true);
this.sortGroup.get('sortField')?.setValue(SortField.SortName);
this.isAscendingSort = true;
+ // Apply any presets
+ this.setupTypeaheads();
this.resetTypeaheads.next(true);
this.applyFilter.emit(this.filter);
diff --git a/UI/Web/src/app/manga-reader/manga-reader.component.ts b/UI/Web/src/app/manga-reader/manga-reader.component.ts
index 00f09c6fa..c43ce14ee 100644
--- a/UI/Web/src/app/manga-reader/manga-reader.component.ts
+++ b/UI/Web/src/app/manga-reader/manga-reader.component.ts
@@ -865,35 +865,35 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
}
// Fit Split on a page that needs splitting
- if (this.shouldRenderAsFitSplit()) {
- const windowWidth = window.innerWidth
- || document.documentElement.clientWidth
- || document.body.clientWidth;
- const windowHeight = window.innerHeight
- || document.documentElement.clientHeight
- || document.body.clientHeight;
- // If the user's screen is wider than the image, just pretend this is no split, as it will render nicer
- this.canvas.nativeElement.width = windowWidth;
- this.canvas.nativeElement.height = windowHeight;
- const ratio = this.canvasImage.width / this.canvasImage.height;
- let newWidth = windowWidth;
- let newHeight = newWidth / ratio;
- if (newHeight > windowHeight) {
- newHeight = windowHeight;
- newWidth = newHeight * ratio;
- }
-
- // Optimization: When the screen is larger than newWidth, allow no split rendering to occur for a better fit
- if (windowWidth > newWidth) {
- this.setCanvasSize();
- this.ctx.drawImage(this.canvasImage, 0, 0);
- } else {
- this.ctx.fillRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);
- this.ctx.drawImage(this.canvasImage, 0, 0, newWidth, newHeight);
- }
- } else {
+ if (!this.shouldRenderAsFitSplit()) {
this.ctx.drawImage(this.canvasImage, 0, 0);
}
+
+ const windowWidth = window.innerWidth
+ || document.documentElement.clientWidth
+ || document.body.clientWidth;
+ const windowHeight = window.innerHeight
+ || document.documentElement.clientHeight
+ || document.body.clientHeight;
+ // If the user's screen is wider than the image, just pretend this is no split, as it will render nicer
+ this.canvas.nativeElement.width = windowWidth;
+ this.canvas.nativeElement.height = windowHeight;
+ const ratio = this.canvasImage.width / this.canvasImage.height;
+ let newWidth = windowWidth;
+ let newHeight = newWidth / ratio;
+ if (newHeight > windowHeight) {
+ newHeight = windowHeight;
+ newWidth = newHeight * ratio;
+ }
+
+ // Optimization: When the screen is larger than newWidth, allow no split rendering to occur for a better fit
+ if (windowWidth > newWidth) {
+ this.setCanvasSize();
+ this.ctx.drawImage(this.canvasImage, 0, 0);
+ } else {
+ this.ctx.fillRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);
+ this.ctx.drawImage(this.canvasImage, 0, 0, newWidth, newHeight);
+ }
}
// Reset scroll on non HEIGHT Fits
@@ -936,7 +936,9 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
shouldRenderAsFitSplit() {
- if (!this.isCoverImage() || parseInt(this.generalSettingsForm?.get('pageSplitOption')?.value, 10) !== PageSplitOption.FitSplit) return false;
+ // Some pages aren't cover images but might need fit split renderings
+ if (parseInt(this.generalSettingsForm?.get('pageSplitOption')?.value, 10) !== PageSplitOption.FitSplit) return false;
+ //if (!this.isCoverImage() || parseInt(this.generalSettingsForm?.get('pageSplitOption')?.value, 10) !== PageSplitOption.FitSplit) return false;
return true;
}