
Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com> Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Gregory.Open <gregory.open@proton.me> Co-authored-by: Mateusz <mateuszvx8.96@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: 無情天 <kofzhanganguo@126.com>
30 lines
986 B
TypeScript
30 lines
986 B
TypeScript
import {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';
|
|
import {Library} from "../../../_models/library/library";
|
|
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
|
|
import {TranslocoDirective} from "@jsverse/transloco";
|
|
import {FormControl, FormGroup, ReactiveFormsModule} from "@angular/forms";
|
|
|
|
@Component({
|
|
selector: 'app-copy-settings-from-library-modal',
|
|
standalone: true,
|
|
imports: [
|
|
TranslocoDirective,
|
|
ReactiveFormsModule,
|
|
],
|
|
templateUrl: './copy-settings-from-library-modal.component.html',
|
|
styleUrl: './copy-settings-from-library-modal.component.scss',
|
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
})
|
|
export class CopySettingsFromLibraryModalComponent {
|
|
protected readonly modal = inject(NgbActiveModal);
|
|
|
|
@Input() libraries: Array<Library> = [];
|
|
|
|
libForm = new FormGroup({
|
|
'library': new FormControl(null),
|
|
});
|
|
|
|
save() {
|
|
this.modal.close(parseInt(this.libForm.get('library')?.value + '', 10));
|
|
}
|
|
}
|