Browse Source

Merge pull request #15344 from ozermzn/dev

Update login button
pull/15359/head
Mahmut Gundogdu 4 years ago
committed by GitHub
parent
commit
1de3433c0c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      npm/ng-packs/apps/dev-app/src/app/app.module.ts
  2. 12
      npm/ng-packs/apps/dev-app/src/app/home/home.component.html
  3. 4
      npm/ng-packs/apps/dev-app/src/app/home/home.component.ts

4
npm/ng-packs/apps/dev-app/src/app/app.module.ts

@ -14,7 +14,7 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { APP_ROUTE_PROVIDER } from './route.provider';
import { FeatureManagementModule } from '@abp/ng.feature-management';
// import { AbpOAuthModule } from '@abp/ng.oauth';
import { AbpOAuthModule } from '@abp/ng.oauth';
@NgModule({
imports: [
@ -27,7 +27,7 @@ import { FeatureManagementModule } from '@abp/ng.feature-management';
sendNullsAsQueryParam: false,
skipGetAppConfiguration: false,
}),
// AbpOAuthModule.forRoot(),
AbpOAuthModule.forRoot(),
ThemeSharedModule.forRoot(),
AccountConfigModule.forRoot(),
IdentityConfigModule.forRoot(),

12
npm/ng-packs/apps/dev-app/src/app/home/home.component.html

@ -10,9 +10,17 @@
<p class="lead px-lg-5 mx-lg-5">{{ '::LongWelcomeMessage' | abpLocalization }}</p>
<a *ngIf="!hasLoggedIn" (click)="login()" class="px-4 btn btn-primary ml-1" role="button"
><i class="fa fa-sign-in"></i> {{ 'AbpAccount::Login' | abpLocalization }}</a
<abp-button
*ngIf="!hasLoggedIn"
[loading]="loading"
(click)="login()"
[disabled]="loading"
class="px-4 ml-1"
role="button"
iconClass="fa fa-sign-in"
>
{{ 'AbpAccount::Login' | abpLocalization }}
</abp-button>
</div>
<div class="my-3 text-center">
<h3>Let's improve your application!</h3>

4
npm/ng-packs/apps/dev-app/src/app/home/home.component.ts

@ -1,19 +1,19 @@
import { AuthService } from '@abp/ng.core';
import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
loading: boolean = false;
get hasLoggedIn(): boolean {
return this.authService.isAuthenticated;
}
constructor(private authService: AuthService) {}
login() {
this.loading = true;
this.authService.navigateToLogin();
}
}

Loading…
Cancel
Save