Skip to content

Commit ebd7227

Browse files
committed
core review fix(linting, typo fixes, l10n, etc)
1 parent 43ad819 commit ebd7227

File tree

12 files changed

+66
-74
lines changed

12 files changed

+66
-74
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ export class AccountFooterComponent extends AppComponentBase {
2020
this.appSession.application.releaseDate.format('YYYYDDMM') +
2121
']';
2222
}
23-
}
23+
}

angular/src/app/layout/sidebar-menu.component.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,14 @@ export class SidebarMenuComponent extends AppComponentBase implements OnInit {
9292
'https://aspnetzero.com?ref=abptmpl',
9393
'far fa-circle'
9494
),
95-
new MenuItem(
96-
'Description',
97-
'https://aspnetzero.com/?ref=abptmpl#description',
98-
'far fa-circle'
99-
),
10095
new MenuItem(
10196
'Features',
102-
'https://aspnetzero.com/?ref=abptmpl#features',
97+
'https://aspnetzero.com/Features?ref=abptmpl',
10398
'far fa-circle'
10499
),
105100
new MenuItem(
106101
'Pricing',
107-
'https://aspnetzero.com/?ref=abptmpl#pricing',
102+
'https://aspnetzero.com/Pricing?ref=abptmpl#pricing',
108103
'far fa-circle'
109104
),
110105
new MenuItem(

angular/src/app/layout/sidebar.component.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
import { Component, ChangeDetectionStrategy, Renderer2 } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectionStrategy,
4+
Renderer2,
5+
OnInit
6+
} from '@angular/core';
27
import { LayoutStoreService } from '@shared/layout/layout-store.service';
38

49
@Component({
10+
// tslint:disable-next-line:component-selector
511
selector: 'sidebar',
612
templateUrl: './sidebar.component.html',
713
changeDetection: ChangeDetectionStrategy.OnPush
814
})
9-
export class SidebarComponent {
15+
export class SidebarComponent implements OnInit {
1016
sidebarExpanded: boolean;
1117

1218
constructor(

angular/src/app/users/change-password/change-password.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>{{ "UpdatePassword" | localize }}</h1>
2525
</label>
2626
<div class="col-md-9">
2727
<input
28-
type="text"
28+
type="password"
2929
class="form-control"
3030
name="currentPassword"
3131
id="currentPassword"
@@ -48,7 +48,7 @@ <h1>{{ "UpdatePassword" | localize }}</h1>
4848
</label>
4949
<div class="col-md-9">
5050
<input
51-
type="text"
51+
type="password"
5252
class="form-control"
5353
name="newPassword"
5454
id="newPassword"
@@ -75,7 +75,7 @@ <h1>{{ "UpdatePassword" | localize }}</h1>
7575
</label>
7676
<div class="col-md-9">
7777
<input
78-
type="text"
78+
type="password"
7979
class="form-control"
8080
name="confirmNewPassword"
8181
id="confirmNewPassword"

angular/src/app/users/reset-password/reset-password.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="row">
1313
<div class="col-md-9 offset-md-3">
1414
<p class="text-info mb-1">
15-
1. Enter your administrator password
15+
{{ "ResetPasswordStepOneInfo" | localize }}
1616
</p>
1717
</div>
1818
</div>
@@ -40,7 +40,7 @@
4040
<div class="row">
4141
<div class="col-md-9 offset-md-3">
4242
<p class="text-info mb-1">
43-
2. Copy this random password so you can send it to the user
43+
{{ "ResetPasswordStepTwoInfo" | localize }}
4444
</p>
4545
</div>
4646
</div>

angular/src/app/users/users.component.html

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -169,45 +169,30 @@ <h1>{{ "Users" | localize }}</h1>
169169
</div>
170170
</td>
171171
<td>
172-
<div class="btn-group" dropdown container="body">
173-
<button
174-
type="button"
175-
class="btn btn-default"
176-
(click)="editUser(user)"
177-
>
178-
<i class="fas fa-pencil-alt"></i>
179-
{{ "Edit" | localize }}
180-
</button>
181-
<button
182-
type="button"
183-
class="btn btn-default"
184-
dropdownToggle
185-
>
186-
<i class="fas fa-ellipsis-h"></i>
187-
</button>
188-
<ul *dropdownMenu class="dropdown-menu">
189-
<li role="menuitem">
190-
<a
191-
class="dropdown-item"
192-
href="javascript:;"
193-
(click)="delete(user)"
194-
>
195-
<i class="fas fa-trash"></i>
196-
{{ "Delete" | localize }}
197-
</a>
198-
</li>
199-
<li role="menuitem">
200-
<a
201-
class="dropdown-item"
202-
href="javascript:;"
203-
(click)="resetPassword(user)"
204-
>
205-
<i class="fas fa-lock"></i>
206-
{{ "ResetPassword" | localize }}
207-
</a>
208-
</li>
209-
</ul>
210-
</div>
172+
<button
173+
type="button"
174+
class="btn btn-sm bg-secondary"
175+
(click)="editUser(user)"
176+
>
177+
<i class="fas fa-pencil-alt"></i>
178+
{{ "Edit" | localize }}
179+
</button>
180+
<button
181+
type="button"
182+
class="btn btn-sm bg-danger mx-2"
183+
(click)="delete(user)"
184+
>
185+
<i class="fas fa-trash"></i>
186+
{{ "Delete" | localize }}
187+
</button>
188+
<button
189+
type="button"
190+
class="btn btn-sm bg-secondary"
191+
(click)="resetPassword(user)"
192+
>
193+
<i class="fas fa-lock"></i>
194+
{{ "ResetPassword" | localize }}
195+
</button>
211196
</td>
212197
</tr>
213198
</tbody>

angular/src/app/users/users.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ export class UsersComponent extends PagedListingComponentBase<UserDto> {
5050
this.showResetPasswordUserDialog(user.id);
5151
}
5252

53+
clearFilters(): void {
54+
this.keyword = '';
55+
this.isActive = undefined;
56+
this.getDataPage(1);
57+
}
58+
5359
protected list(
5460
request: PagedUsersRequestDto,
5561
pageNumber: number,
@@ -125,10 +131,4 @@ export class UsersComponent extends PagedListingComponentBase<UserDto> {
125131
this.refresh();
126132
});
127133
}
128-
129-
clearFilters(): void {
130-
this.keyword = '';
131-
this.isActive = undefined;
132-
this.getDataPage(1);
133-
}
134134
}

angular/src/shared/auth/app-auth.service.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ import { AppConsts } from '@shared/AppConsts';
33

44
@Injectable()
55
export class AppAuthService {
6-
7-
logout(reload?: boolean): void {
8-
abp.auth.clearToken();
9-
abp.utils.setCookieValue(AppConsts.authorization.encryptedAuthTokenName, undefined, undefined, abp.appPath);
10-
if (reload !== false) {
11-
location.href = AppConsts.appBaseUrl;
12-
}
6+
logout(reload?: boolean): void {
7+
abp.auth.clearToken();
8+
abp.utils.setCookieValue(
9+
AppConsts.authorization.encryptedAuthTokenName,
10+
undefined,
11+
undefined,
12+
abp.appPath
13+
);
14+
if (reload !== false) {
15+
location.href = AppConsts.appBaseUrl;
1316
}
17+
}
1418
}

angular/src/shared/components/validation/abp-validation.summary.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import { AbpValidationError } from './abp-validation.api';
1414
selector: 'abp-validation-summary',
1515
templateUrl: './abp-validation.summary.component.html'
1616
})
17-
export class ApbValidationSummaryComponent extends AppComponentBase
17+
export class AbpValidationSummaryComponent extends AppComponentBase
1818
implements OnInit {
1919
@Input() control: AbstractControl;
2020
@Input() controlEl: ElementRef;
2121
@Input() set customValidationErrors(val: AbpValidationError[]) {
2222
if (val && val.length > 0) {
23-
let defaults = this.defaultValidationErrors.filter(
23+
const defaults = this.defaultValidationErrors.filter(
2424
(defaultValidationError) =>
2525
!val.find(
2626
(customValidationError) =>
@@ -81,7 +81,7 @@ export class ApbValidationSummaryComponent extends AppComponentBase
8181
this._renderer.addClass(this.controlEl, 'is-invalid');
8282
}
8383

84-
let propertyValue = this.control.errors[error.name][error.propertyKey];
84+
const propertyValue = this.control.errors[error.name][error.propertyKey];
8585
return !!propertyValue
8686
? this.l(error.localizationKey, propertyValue)
8787
: this.l(error.localizationKey);

angular/src/shared/layout/layout-store.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import { LayoutConfig } from './layout-config';
55

66
@Injectable()
77
export class LayoutStoreService {
8-
private configSource: BehaviorSubject<LayoutConfig>;
98
public readonly config$: Observable<LayoutConfig>;
109
private readonly initialLayoutConfig: LayoutConfig = {
1110
sidebarExpanded: false
1211
};
12+
private configSource: BehaviorSubject<LayoutConfig>;
1313

1414
constructor() {
1515
this.configSource = new BehaviorSubject(this.initialLayoutConfig);

0 commit comments

Comments
 (0)