mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-08-11 09:13:42 -04:00
A few bugs from last nightly (#3985)
This commit is contained in:
parent
42ef9c5520
commit
f2ae1a8040
@ -34,12 +34,13 @@ import {
|
||||
ImportSettings
|
||||
} from "../../_models/import-field-mappings";
|
||||
import {firstValueFrom, switchMap} from "rxjs";
|
||||
import {tap} from "rxjs/operators";
|
||||
import {map, tap} from "rxjs/operators";
|
||||
import {AgeRatingPipe} from "../../_pipes/age-rating.pipe";
|
||||
import {NgTemplateOutlet} from "@angular/common";
|
||||
import {Router} from "@angular/router";
|
||||
import {LicenseService} from "../../_services/license.service";
|
||||
import {SettingsTabId} from "../../sidenav/preference-nav/preference-nav.component";
|
||||
import {toObservable, toSignal} from "@angular/core/rxjs-interop";
|
||||
|
||||
enum Step {
|
||||
Import = 0,
|
||||
@ -112,6 +113,9 @@ export class ImportMappingsComponent implements OnInit {
|
||||
importedMappings = signal<MetadataMappingsExport | undefined>(undefined);
|
||||
importResult = signal<FieldMappingsImportResult | undefined>(undefined);
|
||||
|
||||
isFileSelected = toSignal(this.uploadForm.get('files')!.valueChanges
|
||||
.pipe(map((files) => !!files && files.length == 1)), {initialValue: false});
|
||||
|
||||
nextButtonLabel = computed(() => {
|
||||
switch(this.currentStepIndex()) {
|
||||
case Step.Configure:
|
||||
@ -247,7 +251,7 @@ export class ImportMappingsComponent implements OnInit {
|
||||
}
|
||||
|
||||
this.importedMappings.set(newImport);
|
||||
this.currentStepIndex.update(x=>x + 1);
|
||||
this.currentStepIndex.update(x => x + 1);
|
||||
}
|
||||
|
||||
private setupSettingConflicts(res: FieldMappingsImportResult) {
|
||||
@ -294,11 +298,6 @@ export class ImportMappingsComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
isFileSelected() {
|
||||
const files = this.uploadForm.get('files')?.value;
|
||||
return files && files.length === 1;
|
||||
}
|
||||
|
||||
protected readonly Step = Step;
|
||||
protected readonly WikiLink = WikiLink;
|
||||
protected readonly ImportModes = ImportModes;
|
||||
|
@ -1571,8 +1571,6 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
setPageNum(pageNum: number) {
|
||||
if (pageNum === this.pageNum) return;
|
||||
|
||||
this.pageNum = Math.max(Math.min(pageNum, this.maxPages - 1), 0);
|
||||
this.pageNumSubject.next({pageNum: this.pageNum, maxPages: this.maxPages});
|
||||
this.cdRef.markForCheck();
|
||||
|
@ -42,7 +42,7 @@ import {SettingSwitchComponent} from "../../settings/_components/setting-switch/
|
||||
import {WritingStylePipe} from "../../_pipes/writing-style.pipe";
|
||||
import {ColorPickerDirective} from "ngx-color-picker";
|
||||
import {NgbNav, NgbNavContent, NgbNavItem, NgbNavLinkBase, NgbNavOutlet, NgbTooltip} from "@ng-bootstrap/ng-bootstrap";
|
||||
import {catchError, filter, finalize, of, switchMap} from "rxjs";
|
||||
import {catchError, filter, of, switchMap} from "rxjs";
|
||||
import {takeUntilDestroyed} from "@angular/core/rxjs-interop";
|
||||
import {LoadingComponent} from "../../shared/loading/loading.component";
|
||||
import {ToastrService} from "ngx-toastr";
|
||||
@ -226,7 +226,7 @@ export class ManageReadingProfilesComponent implements OnInit {
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
tap(_ => this.savingProfile.set(true)),
|
||||
switchMap(_ => this.autoSave()),
|
||||
finalize(() => this.savingProfile.set(false))
|
||||
tap(() => this.savingProfile.set(false))
|
||||
).subscribe();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user