Release Polish 2 (#2332)
This commit is contained in:
parent
1d784c6442
commit
d286d531ad
8 changed files with 134 additions and 23 deletions
|
|
@ -81,9 +81,6 @@ export class DraggableOrderedListComponent {
|
|||
return Math.min(this.items.length / 20, 20);
|
||||
}
|
||||
|
||||
log(a: any, b: any) {console.log('item: ', a, 'index', b)}
|
||||
|
||||
|
||||
constructor(private readonly cdRef: ChangeDetectorRef) {
|
||||
this.bulkSelectionService.selections$.pipe(
|
||||
takeUntilDestroyed(this.destroyRef)
|
||||
|
|
@ -108,12 +105,12 @@ export class DraggableOrderedListComponent {
|
|||
// get the new value of the input
|
||||
const inputElem = <HTMLInputElement>document.querySelector('#reorder-' + previousIndex);
|
||||
const newIndex = parseInt(inputElem.value, 10);
|
||||
if (previousIndex === newIndex) return;
|
||||
moveItemInArray(this.items, previousIndex, newIndex);
|
||||
if (item.order === newIndex) return;
|
||||
moveItemInArray(this.items, item.order, newIndex);
|
||||
this.orderUpdated.emit({
|
||||
fromPosition: previousIndex,
|
||||
fromPosition: item.order,
|
||||
toPosition: newIndex,
|
||||
item: this.items[newIndex],
|
||||
item: item,
|
||||
fromAccessibilityMode: true
|
||||
});
|
||||
this.cdRef.markForCheck();
|
||||
|
|
@ -121,7 +118,7 @@ export class DraggableOrderedListComponent {
|
|||
|
||||
removeItem(item: any, position: number) {
|
||||
this.itemRemove.emit({
|
||||
position,
|
||||
position: item!.order,
|
||||
item
|
||||
});
|
||||
this.cdRef.markForCheck();
|
||||
|
|
|
|||
|
|
@ -67,17 +67,13 @@ export class ReadingListDetailComponent implements OnInit {
|
|||
characters$!: Observable<Person[]>;
|
||||
|
||||
private translocoService = inject(TranslocoService);
|
||||
|
||||
get MangaFormat(): typeof MangaFormat {
|
||||
return MangaFormat;
|
||||
}
|
||||
protected readonly MangaFormat = MangaFormat;
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router, private readingListService: ReadingListService,
|
||||
private actionService: ActionService, private actionFactoryService: ActionFactoryService, public utilityService: UtilityService,
|
||||
public imageService: ImageService, private accountService: AccountService, private toastr: ToastrService,
|
||||
private confirmService: ConfirmService, private libraryService: LibraryService, private readerService: ReaderService,
|
||||
private readonly cdRef: ChangeDetectorRef, private filterUtilityService: FilterUtilitiesService, private titleService: Title) {
|
||||
this.titleService.setTitle('Kavita - ' + translate('side-nav.reading-lists'));
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
|
@ -87,6 +83,7 @@ export class ReadingListDetailComponent implements OnInit {
|
|||
this.router.navigateByUrl('/libraries');
|
||||
return;
|
||||
}
|
||||
this.titleService.setTitle('Kavita - ' + translate('side-nav.reading-lists'));
|
||||
this.listId = parseInt(listId, 10);
|
||||
this.characters$ = this.readingListService.getCharacters(this.listId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue