Polish for Release (#2841)
This commit is contained in:
parent
a76de06087
commit
e6e228c3d9
15 changed files with 46 additions and 36 deletions
|
|
@ -47,7 +47,7 @@
|
|||
<input width="100%" #title ngbAutofocus type="text" class="form-control mb-2" id="add-rlist" formControlName="title">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button type="submit" class="btn btn-primary" (click)="create()">{{t('create')}}</button>
|
||||
<button type="submit" class="btn btn-primary" [disabled]="isCreating" (click)="create()">{{t('create')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
|
|||
*/
|
||||
lists: Array<UserCollection> = [];
|
||||
loading: boolean = false;
|
||||
isCreating: boolean = false;
|
||||
listForm: FormGroup = new FormGroup({});
|
||||
|
||||
ngOnInit(): void {
|
||||
|
|
@ -77,9 +78,13 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
create() {
|
||||
if (this.isCreating) return;
|
||||
const tagName = this.listForm.value.title;
|
||||
this.isCreating = true;
|
||||
this.cdRef.markForCheck();
|
||||
this.collectionService.addByMultiple(0, this.seriesIds, tagName).subscribe(() => {
|
||||
this.toastr.success(translate('toasts.series-added-to-collection', {collectionName: tagName}));
|
||||
this.isCreating = false;
|
||||
this.modal.close();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue