Kavita+ Enhancements (#2616)

This commit is contained in:
Joe Milazzo 2024-01-17 17:45:39 -06:00 committed by GitHub
parent 625c56b265
commit dd44f55747
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 1056 additions and 468 deletions

View file

@ -135,6 +135,26 @@ export class ActionService implements OnDestroy {
});
}
async deleteLibrary(library: Partial<Library>, callback?: LibraryActionCallback) {
if (!library.hasOwnProperty('id') || library.id === undefined) {
return;
}
if (!await this.confirmService.alert(translate('toasts.confirm-library-delete'))) {
if (callback) {
callback(library);
}
return;
}
this.libraryService.delete(library?.id).pipe(take(1)).subscribe((res: any) => {
this.toastr.info(translate('toasts.library-deleted', {name: library.name}));
if (callback) {
callback(library);
}
});
}
/**
* Mark a series as read; updates the series pagesRead
* @param series Series, must have id and name populated