Skip to content

Commit 11c0972

Browse files
author
Igor Goldobin
committed
feat: added busy spinner for directory loading
1 parent 51fa39c commit 11c0972

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

AddressOwnershipTool.Web/ClientApp/src/app/home/home.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<div class="container mt-4" *ngIf="claimGroups.length === 0">
2+
<div class="modal-backdrop show" *ngIf="busy"></div>
3+
<div class="modal show d-flex justify-content-center align-items-center" *ngIf="busy">
4+
<div class="spinner-border text-primary" role="status"></div>
5+
</div>
26
<form [formGroup]="directoryForm" (ngSubmit)="onSubmit()" *ngIf="authService.isLoggedIn$ | async; else notLoggedInTemplate">
37
<div class="mb-3">
48
<label for="directoryPath" class="form-label">Directory Path</label>

AddressOwnershipTool.Web/ClientApp/src/app/home/home.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ export class HomeComponent implements OnInit {
4747

4848
async onSubmit() {
4949
if (this.directoryForm.valid) {
50+
this.busy = true;
5051
const result = await this.distributionService.load(this.directoryForm.value.directoryPath);
5152
if (!!result.message) {
5253
alert(result.message);
5354
} else {
5455
this.claimGroups = result.result;
5556
}
57+
this.busy = false;
5658
}
5759
}
5860

0 commit comments

Comments
 (0)