Skip to content

Commit 1baa216

Browse files
committed
feat(firebaseui): added progress-bar's component to show the loading indicator
1 parent d0fdccc commit 1baa216

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

Diff for: src/auth/module/components/auth/auth.component.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<ngb-auth-firebaseui-progress-bar *ngIf="authProcess.isLoading" class="mb-2">
2+
</ngb-auth-firebaseui-progress-bar>
13
<ngb-tabset #tabs>
24
<!--Reset password tab-->
35
<ngb-tab *ngIf="passwordResetWished" title="Reset Password" id="reset_password">
@@ -46,11 +48,6 @@
4648
</ngb-alert>
4749
</div>
4850

49-
<div *ngIf="authProcess.isLoading" class="progress mt-2">
50-
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"
51-
aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
52-
</div>
53-
5451
</form>
5552
</ng-template>
5653
</ngb-tab>
@@ -159,7 +156,7 @@
159156
<ngb-tab>
160157
<ng-template ngbTabTitle>Register</ng-template>
161158
<ng-template ngbTabContent>
162-
<div *ngIf="!authProcess.emailConfirmationSent;then register else confirm"></div>
159+
<ng-container *ngIf="!authProcess.emailConfirmationSent;then register else confirm"></ng-container>
163160
<ng-template #register>
164161
<form #signUpPasswordForm="ngForm"
165162
class="mt-3"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="progress mt-2">
2+
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"
3+
aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
4+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:host {
2+
display: block;
3+
}
4+
5+
.progress-bar {
6+
width: 100%;
7+
}

Diff for: src/auth/module/ngb-auth-firebase-u-i.module.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import {HttpClientModule} from '@angular/common/http';
1212
import {AngularFireAuthModule} from 'angularfire2/auth';
1313
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
1414
import {EmailConfirmationComponent} from './components/email-confirmation/email-confirmation.component';
15+
import {ProgressBarComponent} from './components/progress-bar/progress-bar.component';
1516

1617
// Export module's public API
1718
// components
1819
export {AuthComponent} from './components/auth/auth.component';
1920
export {EmailConfirmationComponent} from './components/email-confirmation/email-confirmation.component';
21+
export {ProgressBarComponent} from './components/progress-bar/progress-bar.component';
2022

2123
// services
2224
export {AuthProcessService, AuthProvider} from './services/auth-process.service';
@@ -41,13 +43,15 @@ export const NgBootstrapAuthFirebaseUIConfigToken = new InjectionToken<NgBootstr
4143
[
4244
AuthComponent,
4345
EmailConfirmationComponent,
46+
ProgressBarComponent,
4447
AngularFireAuthModule,
4548
AngularFirestoreModule
4649
],
4750
declarations:
4851
[
4952
AuthComponent,
50-
EmailConfirmationComponent
53+
EmailConfirmationComponent,
54+
ProgressBarComponent
5155
]
5256
})
5357
export class NgbAuthFirebaseUIModule {

0 commit comments

Comments
 (0)