Mahmut Gundogdu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
14 additions and
6 deletions
-
npm/ng-packs/apps/dev-app/src/app/app.module.ts
-
npm/ng-packs/apps/dev-app/src/app/home/home.component.html
-
npm/ng-packs/apps/dev-app/src/app/home/home.component.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(), |
|
|
|
|
|
|
|
@ -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> |
|
|
|
|
|
|
|
@ -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(); |
|
|
|
} |
|
|
|
} |
|
|
|
|