v0.8.4.1 - Hotfix (#3419)
Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Adam Beneš <toohka@protonmail.com> Co-authored-by: Dark77 <Dark77@pobox.sk> Co-authored-by: Frozehunter <frozehunter@me.com> Co-authored-by: Havokdan <havokdan@yahoo.com.br> Co-authored-by: Yoan Jacquemin <yoanjacquemin@gmail.com> Co-authored-by: aleixcox <18121624@qq.com> Co-authored-by: mag37 <robin.ivehult@gmail.com>
This commit is contained in:
parent
d4028a8d68
commit
ac47cbd75f
24 changed files with 300 additions and 128 deletions
|
@ -125,6 +125,13 @@ export class LibraryService {
|
|||
return this.httpClient.delete(this.baseUrl + 'library/delete?libraryId=' + libraryId, {});
|
||||
}
|
||||
|
||||
deleteMultiple(libraryIds: Array<number>) {
|
||||
if (libraryIds.length === 0) {
|
||||
return of();
|
||||
}
|
||||
return this.httpClient.delete(this.baseUrl + 'library/delete-multiple?libraryIds=' + libraryIds.join(','), {});
|
||||
}
|
||||
|
||||
update(model: {name: string, folders: string[], id: number}) {
|
||||
return this.httpClient.post(this.baseUrl + 'library/update', model);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ import {takeUntilDestroyed} from "@angular/core/rxjs-interop";
|
|||
selector: 'app-actionable-modal',
|
||||
standalone: true,
|
||||
imports: [
|
||||
NgClass,
|
||||
TranslocoDirective
|
||||
],
|
||||
templateUrl: './actionable-modal.component.html',
|
||||
|
@ -66,7 +65,8 @@ export class ActionableModalComponent implements OnInit {
|
|||
...item,
|
||||
children: [], // Required as dynamic list is only one deep
|
||||
title: di.title,
|
||||
_extra: di
|
||||
_extra: di,
|
||||
action: item.children[0].action // override action to be correct from child
|
||||
}));
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -26,16 +26,13 @@ import {LibraryTypePipe} from '../../_pipes/library-type.pipe';
|
|||
import {RouterLink} from '@angular/router';
|
||||
import {translate, TranslocoModule} from "@jsverse/transloco";
|
||||
import {DefaultDatePipe} from "../../_pipes/default-date.pipe";
|
||||
import {AsyncPipe, NgTemplateOutlet, TitleCasePipe} from "@angular/common";
|
||||
import {DefaultValuePipe} from "../../_pipes/default-value.pipe";
|
||||
import {AsyncPipe, NgTemplateOutlet} from "@angular/common";
|
||||
import {LoadingComponent} from "../../shared/loading/loading.component";
|
||||
import {TagBadgeComponent} from "../../shared/tag-badge/tag-badge.component";
|
||||
import {UtcToLocalTimePipe} from "../../_pipes/utc-to-local-time.pipe";
|
||||
import {Breakpoint, UtilityService} from "../../shared/_services/utility.service";
|
||||
import {Action, ActionFactoryService, ActionItem} from "../../_services/action-factory.service";
|
||||
import {ActionService} from "../../_services/action.service";
|
||||
import {CardActionablesComponent} from "../../_single-module/card-actionables/card-actionables.component";
|
||||
import {BehaviorSubject, Observable} from "rxjs";
|
||||
import {BehaviorSubject, catchError, Observable} from "rxjs";
|
||||
import {Select2Module} from "ng-select2-component";
|
||||
import {SelectionModel} from "../../typeahead/_models/selection-model";
|
||||
import {
|
||||
|
@ -50,8 +47,7 @@ import {FormControl, FormGroup} from "@angular/forms";
|
|||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [RouterLink, NgbTooltip, LibraryTypePipe, TimeAgoPipe, SentenceCasePipe, TranslocoModule, DefaultDatePipe,
|
||||
AsyncPipe, DefaultValuePipe, LoadingComponent, TagBadgeComponent, TitleCasePipe, UtcToLocalTimePipe,
|
||||
CardActionablesComponent, Select2Module, NgTemplateOutlet]
|
||||
AsyncPipe, LoadingComponent, CardActionablesComponent, Select2Module, NgTemplateOutlet]
|
||||
})
|
||||
export class ManageLibraryComponent implements OnInit {
|
||||
|
||||
|
@ -243,6 +239,21 @@ export class ManageLibraryComponent implements OnInit {
|
|||
this.resetBulkMode();
|
||||
});
|
||||
break;
|
||||
case Action.Delete:
|
||||
this.bulkMode = true;
|
||||
this.cdRef.markForCheck();
|
||||
const libIds = selected.map(l => l.id);
|
||||
if (!await this.confirmService.confirm(translate('toasts.bulk-delete-libraries', {count: libIds.length}))) return;
|
||||
this.libraryService.deleteMultiple(libIds)
|
||||
.pipe(catchError((_, obs) => {
|
||||
this.resetBulkMode();
|
||||
return obs;
|
||||
}))
|
||||
.subscribe(() => {
|
||||
this.getLibraries();
|
||||
this.resetBulkMode();
|
||||
})
|
||||
break;
|
||||
case Action.CopySettings:
|
||||
// Remove the source library from the list
|
||||
if (selected.length === 1 && selected[0].id === this.sourceCopyToLibrary!.id) {
|
||||
|
|
|
@ -233,7 +233,7 @@ export class DashboardComponent implements OnInit {
|
|||
|
||||
const filter = this.filterUtilityService.createSeriesV2Filter();
|
||||
filter.statements.push({field: FilterField.ReadProgress, comparison: FilterComparison.GreaterThan, value: '0'});
|
||||
filter.statements.push({field: FilterField.ReadProgress, comparison: FilterComparison.LessThan, value: '100'});
|
||||
filter.statements.push({field: FilterField.ReadProgress, comparison: FilterComparison.NotEqual, value: '100'});
|
||||
if (filter.sortOptions) {
|
||||
filter.sortOptions.sortField = SortField.LastChapterAdded;
|
||||
filter.sortOptions.isAscending = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue