Clean up (#3018)
This commit is contained in:
parent
448cea0b69
commit
e1371a8d2b
@ -91,7 +91,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit {
|
||||
private snackBar: MatSnackBar
|
||||
) {}
|
||||
|
||||
public ngOnInit(): void {
|
||||
public ngOnInit() {
|
||||
const { benchmarks, currencies } = this.dataService.fetchInfo();
|
||||
|
||||
this.benchmarks = benchmarks;
|
||||
@ -167,7 +167,7 @@ export class AssetProfileDialog implements OnDestroy, OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
public onClose(): void {
|
||||
public onClose() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ export class HeaderComponent implements OnChanges {
|
||||
this.signOut.next();
|
||||
}
|
||||
|
||||
public openLoginDialog(): void {
|
||||
public openLoginDialog() {
|
||||
const dialogRef = this.dialog.open(LoginWithAccessTokenDialog, {
|
||||
autoFocus: false,
|
||||
data: {
|
||||
|
@ -84,7 +84,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
|
||||
private userService: UserService
|
||||
) {}
|
||||
|
||||
public ngOnInit(): void {
|
||||
public ngOnInit() {
|
||||
this.dataService
|
||||
.fetchPositionDetail({
|
||||
dataSource: this.data.dataSource,
|
||||
@ -267,7 +267,7 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
public onClose(): void {
|
||||
public onClose() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ export class UserAccountAccessComponent implements OnDestroy, OnInit {
|
||||
this.unsubscribeSubject.complete();
|
||||
}
|
||||
|
||||
private openCreateAccessDialog(): void {
|
||||
private openCreateAccessDialog() {
|
||||
const dialogRef = this.dialog.open(CreateOrUpdateAccessDialog, {
|
||||
data: {
|
||||
access: {
|
||||
|
@ -169,7 +169,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit {
|
||||
isExcluded,
|
||||
name,
|
||||
platformId
|
||||
}: AccountModel): void {
|
||||
}: AccountModel) {
|
||||
const dialogRef = this.dialog.open(CreateOrUpdateAccountDialog, {
|
||||
data: {
|
||||
account: {
|
||||
@ -237,7 +237,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
private openCreateAccountDialog(): void {
|
||||
private openCreateAccountDialog() {
|
||||
const dialogRef = this.dialog.open(CreateOrUpdateAccountDialog, {
|
||||
data: {
|
||||
account: {
|
||||
@ -279,7 +279,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
private openTransferBalanceDialog(): void {
|
||||
private openTransferBalanceDialog() {
|
||||
const dialogRef = this.dialog.open(TransferBalanceDialog, {
|
||||
data: {
|
||||
accounts: this.accounts
|
||||
|
@ -274,7 +274,7 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
public openUpdateActivityDialog(activity: Activity): void {
|
||||
public openUpdateActivityDialog(activity: Activity) {
|
||||
const dialogRef = this.dialog.open(CreateOrUpdateActivityDialog, {
|
||||
data: {
|
||||
activity,
|
||||
@ -311,7 +311,7 @@ export class ActivitiesPageComponent implements OnDestroy, OnInit {
|
||||
this.unsubscribeSubject.complete();
|
||||
}
|
||||
|
||||
private openCreateActivityDialog(aActivity?: Activity): void {
|
||||
private openCreateActivityDialog(aActivity?: Activity) {
|
||||
this.userService
|
||||
.get()
|
||||
.pipe(takeUntil(this.unsubscribeSubject))
|
||||
|
@ -150,7 +150,7 @@ export class ImportActivitiesDialog implements OnDestroy {
|
||||
}: {
|
||||
files: FileList;
|
||||
stepper: MatStepper;
|
||||
}): void {
|
||||
}) {
|
||||
if (files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ export class RegisterPageComponent implements OnDestroy, OnInit {
|
||||
accessToken: string,
|
||||
authToken: string,
|
||||
role: Role
|
||||
): void {
|
||||
) {
|
||||
const dialogRef = this.dialog.open(ShowAccessTokenDialog, {
|
||||
data: {
|
||||
accessToken,
|
||||
|
@ -18,7 +18,7 @@ export class SettingsStorageService {
|
||||
window.localStorage.setItem(aKey, aValue);
|
||||
}
|
||||
|
||||
public removeSetting(aKey: string): void {
|
||||
public removeSetting(aKey: string) {
|
||||
return window.localStorage.removeItem(aKey);
|
||||
}
|
||||
}
|
||||
|
@ -21,14 +21,14 @@ export class TokenStorageService {
|
||||
);
|
||||
}
|
||||
|
||||
public saveToken(token: string, staySignedIn = false): void {
|
||||
public saveToken(token: string, staySignedIn = false) {
|
||||
if (staySignedIn) {
|
||||
window.localStorage.setItem(KEY_TOKEN, token);
|
||||
}
|
||||
window.sessionStorage.setItem(KEY_TOKEN, token);
|
||||
}
|
||||
|
||||
public signOut(): void {
|
||||
public signOut() {
|
||||
const utmSource = window.localStorage.getItem('utm_source');
|
||||
|
||||
if (this.webAuthnService.isEnabled()) {
|
||||
|
@ -72,7 +72,7 @@ export class ActivitiesFilterComponent implements OnChanges, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
public onAddFilter({ input, value }: MatChipInputEvent): void {
|
||||
public onAddFilter({ input, value }: MatChipInputEvent) {
|
||||
if (value?.trim()) {
|
||||
this.updateFilters();
|
||||
}
|
||||
@ -85,7 +85,7 @@ export class ActivitiesFilterComponent implements OnChanges, OnDestroy {
|
||||
this.searchControl.setValue(undefined);
|
||||
}
|
||||
|
||||
public onRemoveFilter(aFilter: Filter): void {
|
||||
public onRemoveFilter(aFilter: Filter) {
|
||||
this.selectedFilters = this.selectedFilters.filter((filter) => {
|
||||
return filter.id !== aFilter.id;
|
||||
});
|
||||
@ -93,7 +93,7 @@ export class ActivitiesFilterComponent implements OnChanges, OnDestroy {
|
||||
this.updateFilters();
|
||||
}
|
||||
|
||||
public onSelectFilter(event: MatAutocompleteSelectedEvent): void {
|
||||
public onSelectFilter(event: MatAutocompleteSelectedEvent) {
|
||||
this.selectedFilters.push(
|
||||
this.allFilters.find((filter) => {
|
||||
return filter.id === event.option.value;
|
||||
|
@ -216,7 +216,7 @@ export class ActivitiesTableComponent
|
||||
alert(aComment);
|
||||
}
|
||||
|
||||
public onOpenPositionDialog({ dataSource, symbol }: UniqueAsset): void {
|
||||
public onOpenPositionDialog({ dataSource, symbol }: UniqueAsset) {
|
||||
this.router.navigate([], {
|
||||
queryParams: { dataSource, symbol, positionDetailDialog: true }
|
||||
});
|
||||
|
@ -10,7 +10,7 @@ export class CarouselItem implements FocusableOption {
|
||||
|
||||
public constructor(readonly element: ElementRef<HTMLElement>) {}
|
||||
|
||||
public focus(): void {
|
||||
public focus() {
|
||||
this.element.nativeElement.focus({ preventScroll: true });
|
||||
}
|
||||
}
|
||||
|
@ -134,31 +134,31 @@ export abstract class AbstractMatFormField<T>
|
||||
return this.focused || !this.empty;
|
||||
}
|
||||
|
||||
public ngDoCheck(): void {
|
||||
public ngDoCheck() {
|
||||
if (this.ngControl) {
|
||||
this.errorState = this.ngControl.invalid && this.ngControl.touched;
|
||||
this.stateChanges.next();
|
||||
}
|
||||
}
|
||||
|
||||
public ngOnDestroy(): void {
|
||||
public ngOnDestroy() {
|
||||
this.stateChanges.complete();
|
||||
this._focusMonitor.stopMonitoring(this._elementRef.nativeElement);
|
||||
}
|
||||
|
||||
public registerOnChange(fn: (_: T) => void): void {
|
||||
public registerOnChange(fn: (_: T) => void) {
|
||||
this.onChange = fn;
|
||||
}
|
||||
|
||||
public registerOnTouched(fn: () => void): void {
|
||||
public registerOnTouched(fn: () => void) {
|
||||
this.onTouched = fn;
|
||||
}
|
||||
|
||||
public setDescribedByIds(ids: string[]): void {
|
||||
public setDescribedByIds(ids: string[]) {
|
||||
this.describedBy = ids.join(' ');
|
||||
}
|
||||
|
||||
public writeValue(value: T): void {
|
||||
public writeValue(value: T) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ export abstract class AbstractMatFormField<T>
|
||||
this.stateChanges.next();
|
||||
}
|
||||
|
||||
public onContainerClick(): void {
|
||||
public onContainerClick() {
|
||||
if (!this.focused) {
|
||||
this.focus();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user