Skip to content

Commit deaf957

Browse files
committed
2 parents ddfd2e6 + fb61afe commit deaf957

File tree

80 files changed

+1027
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1027
-357
lines changed

angular/AbpCompanyName.AbpProjectName.AngularUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<ItemGroup>
1616
<Compile Remove="dist" />
17-
<None Include="App.config" />
17+
<None Include="app.config" />
1818
<None Update="wwwroot\**\*;web.config">
1919
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
2020
</None>

angular/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr",
1010
"test": "ng test",
1111
"pree2e": "webdriver-manager update --standalone false --gecko false",
12-
"e2e": "protractor"
12+
"e2e": "protractor",
13+
"lint": "tslint --force --project src/tsconfig.json src/**/*.ts -t verbose"
1314
},
1415
"private": true,
1516
"dependencies": {

angular/src/AppPreBootstrap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ export class AppPreBootstrap {
3333
}
3434

3535
private static getCurrentClockProvider(currentProviderName: string): abp.timing.IClockProvider {
36-
if (currentProviderName === "unspecifiedClockProvider") {
36+
if (currentProviderName === 'unspecifiedClockProvider') {
3737
return abp.timing.unspecifiedClockProvider;
3838
}
3939

40-
if (currentProviderName === "utcClockProvider") {
40+
if (currentProviderName === 'utcClockProvider') {
4141
return abp.timing.utcClockProvider;
4242
}
4343

@@ -50,7 +50,7 @@ export class AppPreBootstrap {
5050
method: 'GET',
5151
headers: {
5252
Authorization: 'Bearer ' + abp.auth.getToken(),
53-
'.AspNetCore.Culture': abp.utils.getCookieValue("Abp.Localization.CultureName"),
53+
'.AspNetCore.Culture': abp.utils.getCookieValue('Abp.Localization.CultureName'),
5454
'Abp.TenantId': abp.multiTenancy.getTenantIdCookie()
5555
}
5656
}).done(result => {

angular/src/account/account-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { NgModule } from '@angular/core';
22
import { RouterModule } from '@angular/router';
33
import { LoginComponent } from './login/login.component';
44
import { RegisterComponent } from './register/register.component';
@@ -21,4 +21,4 @@ import { AccountComponent } from './account.component';
2121
RouterModule
2222
]
2323
})
24-
export class AccountRoutingModule { }
24+
export class AccountRoutingModule { }

angular/src/account/account.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ViewContainerRef, OnInit, ViewEncapsulation, Injector } from '@angular/core';
1+
import { Component, ViewContainerRef, OnInit, ViewEncapsulation, Injector } from '@angular/core';
22
import { LoginService } from './login/login.service';
33
import { AppComponentBase } from '@shared/app-component-base';
44

@@ -11,11 +11,11 @@ import { AppComponentBase } from '@shared/app-component-base';
1111
})
1212
export class AccountComponent extends AppComponentBase implements OnInit {
1313

14-
private viewContainerRef: ViewContainerRef;
15-
1614
versionText: string;
1715
currentYear: number;
1816

17+
private viewContainerRef: ViewContainerRef;
18+
1919
public constructor(
2020
injector: Injector,
2121
private _loginService: LoginService
@@ -33,4 +33,4 @@ export class AccountComponent extends AppComponentBase implements OnInit {
3333
ngOnInit(): void {
3434
$('body').attr('class', 'login-page');
3535
}
36-
}
36+
}

angular/src/account/layout/account-languages.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit, Injector } from '@angular/core';
1+
import { Component, OnInit, Injector } from '@angular/core';
22
import { AppComponentBase } from '@shared/app-component-base';
33

44
import * as _ from 'lodash';
@@ -28,12 +28,12 @@ export class AccountLanguagesComponent extends AppComponentBase implements OnIni
2828

2929
changeLanguage(languageName: string): void {
3030
abp.utils.setCookieValue(
31-
"Abp.Localization.CultureName",
31+
'Abp.Localization.CultureName',
3232
languageName,
33-
new Date(new Date().getTime() + 5 * 365 * 86400000), //5 year
33+
new Date(new Date().getTime() + 5 * 365 * 86400000), // 5 year
3434
abp.appPath
3535
);
3636

3737
location.reload();
3838
}
39-
}
39+
}

angular/src/account/login/login.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Injector } from '@angular/core';
1+
import { Component, Injector } from '@angular/core';
22
import { AbpSessionService } from '@abp/session/abp-session.service';
33
import { AppComponentBase } from '@shared/app-component-base';
44
import { accountModuleAnimation } from '@shared/animations/routerTransition';
@@ -10,7 +10,7 @@ import { LoginService } from './login.service';
1010
animations: [accountModuleAnimation()]
1111
})
1212
export class LoginComponent extends AppComponentBase {
13-
submitting: boolean = false;
13+
submitting = false;
1414

1515
constructor(
1616
injector: Injector,

angular/src/account/login/login.service.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
import { TokenService } from '@abp/auth/token.service';
2+
import { LogService } from '@abp/log/log.service';
3+
import { MessageService } from '@abp/message/message.service';
4+
import { UtilsService } from '@abp/utils/utils.service';
15
import { Injectable } from '@angular/core';
26
import { Router } from '@angular/router';
3-
import { TokenAuthServiceProxy, AuthenticateModel, AuthenticateResultModel, ExternalLoginProviderInfoModel, ExternalAuthenticateModel, ExternalAuthenticateResultModel } from '@shared/service-proxies/service-proxies';
4-
import { UrlHelper } from '@shared/helpers/UrlHelper';
57
import { AppConsts } from '@shared/AppConsts';
6-
7-
import { MessageService } from '@abp/message/message.service';
8-
import { LogService } from '@abp/log/log.service';
9-
import { TokenService } from '@abp/auth/token.service';
10-
import { UtilsService } from '@abp/utils/utils.service';
8+
import { UrlHelper } from '@shared/helpers/UrlHelper';
9+
import { AuthenticateModel, AuthenticateResultModel, TokenAuthServiceProxy } from '@shared/service-proxies/service-proxies';
1110
import { finalize } from 'rxjs/operators';
1211

12+
1313
@Injectable()
1414
export class LoginService {
1515

@@ -36,7 +36,7 @@ export class LoginService {
3636

3737
this._tokenAuthService
3838
.authenticate(this.authenticateModel)
39-
.pipe(finalize(() => { finallyCallback() }))
39+
.pipe(finalize(() => { finallyCallback(); }))
4040
.subscribe((result: AuthenticateResultModel) => {
4141
this.processAuthenticateResult(result);
4242
});
@@ -46,11 +46,15 @@ export class LoginService {
4646
this.authenticateResult = authenticateResult;
4747

4848
if (authenticateResult.accessToken) {
49-
//Successfully logged in
50-
this.login(authenticateResult.accessToken, authenticateResult.encryptedAccessToken, authenticateResult.expireInSeconds, this.rememberMe);
49+
// Successfully logged in
50+
this.login(
51+
authenticateResult.accessToken,
52+
authenticateResult.encryptedAccessToken,
53+
authenticateResult.expireInSeconds,
54+
this.rememberMe);
5155

5256
} else {
53-
//Unexpected result!
57+
// Unexpected result!
5458

5559
this._logService.warn('Unexpected authenticateResult!');
5660
this._router.navigate(['account/login']);
@@ -59,7 +63,7 @@ export class LoginService {
5963

6064
private login(accessToken: string, encryptedAccessToken: string, expireInSeconds: number, rememberMe?: boolean): void {
6165

62-
var tokenExpireDate = rememberMe ? (new Date(new Date().getTime() + 1000 * expireInSeconds)) : undefined;
66+
const tokenExpireDate = rememberMe ? (new Date(new Date().getTime() + 1000 * expireInSeconds)) : undefined;
6367

6468
this._tokenService.setToken(
6569
accessToken,
@@ -73,7 +77,7 @@ export class LoginService {
7377
abp.appPath
7478
);
7579

76-
var initialUrl = UrlHelper.initialUrl;
80+
let initialUrl = UrlHelper.initialUrl;
7781
if (initialUrl.indexOf('/login') > 0) {
7882
initialUrl = AppConsts.appBaseUrl;
7983
}

angular/src/account/register/register.component.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { Component, Injector } from "@angular/core";
2-
import { Router } from "@angular/router";
3-
import { finalize } from "rxjs/operators";
4-
import { AppComponentBase } from "@shared/app-component-base";
5-
import { accountModuleAnimation } from "@shared/animations/routerTransition";
1+
import { Component, Injector } from '@angular/core';
2+
import { Router } from '@angular/router';
3+
import { finalize } from 'rxjs/operators';
4+
import { AppComponentBase } from '@shared/app-component-base';
5+
import { accountModuleAnimation } from '@shared/animations/routerTransition';
66
import {
77
AccountServiceProxy,
88
RegisterInput,
99
RegisterOutput
10-
} from "@shared/service-proxies/service-proxies";
11-
import { LoginService } from "../login/login.service";
10+
} from '@shared/service-proxies/service-proxies';
11+
import { LoginService } from '../login/login.service';
1212

1313
@Component({
14-
templateUrl: "./register.component.html",
15-
animations: [accountModuleAnimation()],
14+
templateUrl: './register.component.html',
15+
animations: [accountModuleAnimation()],
1616
styles: [
1717
`
1818
mat-form-field {
@@ -26,7 +26,7 @@ import { LoginService } from "../login/login.service";
2626
})
2727
export class RegisterComponent extends AppComponentBase {
2828
model: RegisterInput = new RegisterInput();
29-
saving: boolean = false;
29+
saving = false;
3030

3131
constructor(
3232
injector: Injector,
@@ -38,7 +38,7 @@ export class RegisterComponent extends AppComponentBase {
3838
}
3939

4040
back(): void {
41-
this._router.navigate(["/login"]);
41+
this._router.navigate(['/login']);
4242
}
4343

4444
save(): void {
@@ -52,12 +52,12 @@ export class RegisterComponent extends AppComponentBase {
5252
)
5353
.subscribe((result: RegisterOutput) => {
5454
if (!result.canLogin) {
55-
this.notify.success(this.l("SuccessfullyRegistered"));
56-
this._router.navigate(["/login"]);
55+
this.notify.success(this.l('SuccessfullyRegistered'));
56+
this._router.navigate(['/login']);
5757
return;
5858
}
5959

60-
//Autheticate
60+
// Autheticate
6161
this.saving = true;
6262
this._loginService.authenticateModel.userNameOrEmailAddress = this.model.userName;
6363
this._loginService.authenticateModel.password = this.model.password;

angular/src/app/about/about.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Injector, AfterViewInit } from '@angular/core';
1+
import { Component, Injector, AfterViewInit } from '@angular/core';
22
import { AppComponentBase } from '@shared/app-component-base';
33
import { appModuleAnimation } from '@shared/animations/routerTransition';
44

@@ -13,4 +13,4 @@ export class AboutComponent extends AppComponentBase {
1313
) {
1414
super(injector);
1515
}
16-
}
16+
}

0 commit comments

Comments
 (0)