File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
ui/src/app/components/login Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 51
51
< mat-icon matSuffix > 123</ mat-icon >
52
52
</ mat-form-field >
53
53
54
- < fle-button class ="button " mode ="primary " appearance ="flat " label ="Speichern " leftIconName ="heroLockClosed "
55
- type ="button " (handleClick) ="save() "> </ fle-button >
54
+ < div class ="login-buttons " [hidden] ="loading ">
55
+ < fle-button class ="button " mode ="primary " appearance ="flat " label ="Speichern "
56
+ leftIconName ="heroLockClosed " type ="button " (handleClick) ="save() "> </ fle-button >
57
+ </ div >
58
+
59
+ < div class ="login-loader " *ngIf ="loading ">
60
+ < mat-spinner color ="accent " diameter ="48 "> </ mat-spinner >
61
+ </ div >
56
62
</ div >
57
63
</ div >
58
64
</ div >
Original file line number Diff line number Diff line change 39
39
40
40
mat-form-field {
41
41
width : 100% ;
42
+ }
43
+
44
+ .login-loader {
45
+ display : flex ;
46
+ justify-content : center ;
47
+ align-items : center ;
48
+ }
49
+
50
+ .login-buttons ,
51
+ .login-loader {
52
+ height : 48 ;
42
53
}
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export class LoginComponent implements OnInit {
14
14
15
15
credentials ! : Credentials ;
16
16
17
+ loading : boolean = false ;
18
+
17
19
constructor (
18
20
private snackbar : MatSnackBar ,
19
21
private router : Router ,
@@ -26,6 +28,8 @@ export class LoginComponent implements OnInit {
26
28
}
27
29
28
30
save ( ) {
31
+ this . loading = true ;
32
+
29
33
this . atossService
30
34
. getBalance ( {
31
35
personal_number : this . credentials . personal_number ,
@@ -44,6 +48,8 @@ export class LoginComponent implements OnInit {
44
48
) ;
45
49
46
50
this . router . navigate ( [ '/' ] ) ;
51
+
52
+ this . loading = false ;
47
53
} ,
48
54
error : ( ) => {
49
55
this . snackbar . open (
@@ -53,6 +59,8 @@ export class LoginComponent implements OnInit {
53
59
duration : 4000 ,
54
60
}
55
61
) ;
62
+
63
+ this . loading = false ;
56
64
}
57
65
} ) ;
58
66
}
You can’t perform that action at this time.
0 commit comments