> {
// Get the auth token from the service.
+ console.debug("INTERCEPT");
// Clone the request and replace the original headers with
// cloned headers, updated with the authorization.
const authReq = req.clone({
diff --git a/wowup-electron/src/app/pages/about/about.component.html b/wowup-electron/src/app/pages/about/about.component.html
index 9638c619..648648c9 100644
--- a/wowup-electron/src/app/pages/about/about.component.html
+++ b/wowup-electron/src/app/pages/about/about.component.html
@@ -12,8 +12,7 @@
{{ "PAGES.ABOUT.TITLE" | translate }}
v{{ versionNumber | async }}
diff --git a/wowup-electron/src/app/pages/about/about.component.ts b/wowup-electron/src/app/pages/about/about.component.ts
index 04ff3a15..9ab22fee 100644
--- a/wowup-electron/src/app/pages/about/about.component.ts
+++ b/wowup-electron/src/app/pages/about/about.component.ts
@@ -11,17 +11,15 @@ import { WowUpService } from "../../services/wowup/wowup.service";
styleUrls: ["./about.component.scss"],
changeDetection: ChangeDetectionStrategy.OnPush,
})
-export class AboutComponent implements OnInit {
- @Input("tabIndex") tabIndex: number;
+export class AboutComponent {
+ @Input("tabIndex") public tabIndex: number;
public changeLogs: ChangeLog[] = ChangeLogJson.ChangeLogs;
public versionNumber = from(this.electronService.getVersionNumber());
- constructor(public wowUpService: WowUpService, public electronService: ElectronService) {}
+ public constructor(public wowUpService: WowUpService, public electronService: ElectronService) {}
- ngOnInit(): void {}
-
- formatChanges(changeLog: ChangeLog): string {
+ public formatChanges(changeLog: ChangeLog): string {
return changeLog.changes.join("\n");
}
}
diff --git a/wowup-electron/src/app/pages/get-addons/get-addons.component.html b/wowup-electron/src/app/pages/get-addons/get-addons.component.html
index dcccd81f..eb5a1d0d 100644
--- a/wowup-electron/src/app/pages/get-addons/get-addons.component.html
+++ b/wowup-electron/src/app/pages/get-addons/get-addons.component.html
@@ -27,12 +27,10 @@
-
diff --git a/wowup-electron/src/app/pages/get-addons/get-addons.component.ts b/wowup-electron/src/app/pages/get-addons/get-addons.component.ts
index 3e817747..e5f053c6 100644
--- a/wowup-electron/src/app/pages/get-addons/get-addons.component.ts
+++ b/wowup-electron/src/app/pages/get-addons/get-addons.component.ts
@@ -66,7 +66,7 @@ class AddonListItemDataSource extends MatTableDataSource {
// Notify any listeners when the offset changes
public offsetChange$ = this._offsetChangeSrc.asObservable();
- constructor(private subject: BehaviorSubject, private viewport: CdkVirtualScrollViewport) {
+ public constructor(private subject: BehaviorSubject, private viewport: CdkVirtualScrollViewport) {
super();
subject.subscribe((data) => {
@@ -85,12 +85,12 @@ class AddonListItemDataSource extends MatTableDataSource {
});
}
- resume() {
+ public resume() {
this.viewport.getElementRef().nativeElement.scrollTop = this.lastTop;
this.viewport.getElementRef().nativeElement.dispatchEvent(new CustomEvent("scroll"));
}
- handleNewData(start: number) {
+ public handleNewData(start: number) {
const end = start + PAGESIZE;
const data = [...this.subject.value];
const slicedData = _.slice(data, start, end);
@@ -106,11 +106,11 @@ class AddonListItemDataSource extends MatTableDataSource {
* Virtual Scroll Strategy
*/
export class CustomVirtualScrollStrategy extends FixedSizeVirtualScrollStrategy {
- constructor() {
+ public constructor() {
super(ROW_HEIGHT, 1000, 2000);
}
- attach(viewport: CdkVirtualScrollViewport): void {
+ public attach(viewport: CdkVirtualScrollViewport): void {
this.onDataLengthChanged();
}
}
@@ -123,12 +123,12 @@ export class CustomVirtualScrollStrategy extends FixedSizeVirtualScrollStrategy
providers: [{ provide: VIRTUAL_SCROLL_STRATEGY, useClass: CustomVirtualScrollStrategy }],
})
export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, AfterViewChecked {
- @Input("tabIndex") tabIndex: number;
+ @Input("tabIndex") public tabIndex: number;
- @ViewChild(MatSort) sort: MatSort;
- @ViewChild("table", { read: ElementRef }) table: ElementRef;
- @ViewChild("columnContextMenuTrigger") columnContextMenu: MatMenuTrigger;
- @ViewChild("viewport") viewport: CdkVirtualScrollViewport;
+ @ViewChild(MatSort) public sort: MatSort;
+ @ViewChild("table", { read: ElementRef }) public table: ElementRef;
+ @ViewChild("columnContextMenuTrigger") public columnContextMenu: MatMenuTrigger;
+ @ViewChild("viewport") public viewport: CdkVirtualScrollViewport;
private _subscriptions: Subscription[] = [];
private _isSelectedTab = false;
@@ -143,7 +143,7 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
public activeSortDirection = "desc";
public placeholderHeight = 0;
- columns: ColumnState[] = [
+ public columns: ColumnState[] = [
{ name: "name", display: "PAGES.GET_ADDONS.TABLE.ADDON_COLUMN_HEADER", visible: true },
{
name: "downloadCount",
@@ -197,7 +197,7 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
})
);
- constructor(
+ public constructor(
private _dialog: MatDialog,
private _cdRef: ChangeDetectorRef,
private _addonService: AddonService,
@@ -225,7 +225,7 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
});
}
- ngAfterViewChecked(): void {
+ public ngAfterViewChecked(): void {
// Wait for the tab to have a height, then if we need to resume the table do so
if (this._resumeTable && this.viewport.elementRef.nativeElement.scrollHeight > 0) {
this._resumeTable = false;
@@ -233,7 +233,7 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
}
}
- ngOnInit(): void {
+ public ngOnInit(): void {
this._subscriptions.push(
this._addonService.searchError$.subscribe((error) => {
this.displayError(error);
@@ -253,23 +253,23 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
});
}
- ngOnDestroy(): void {
+ public ngOnDestroy(): void {
this._subscriptions.forEach((sub) => sub.unsubscribe());
this._subscriptions = [];
}
- ngAfterViewInit(): void {
+ public ngAfterViewInit(): void {
this.dataSource = new AddonListItemDataSource(this._dataSubject, this.viewport);
this.dataSource.offsetChange$.subscribe((offset) => {
this.placeholderHeight = offset;
});
}
- placeholderWhen(index: number, _: any): boolean {
+ public placeholderWhen(index: number, _: any): boolean {
return index == 0;
}
- onSortChange(sort: Sort): void {
+ public onSortChange(sort: Sort): void {
const sortedData = this.sortAddons(this._dataSubject.value.slice(), sort);
this._wowUpService.getAddonsSortOrder = {
name: this.sort.active,
@@ -279,7 +279,7 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
this._dataSubject.next(sortedData);
}
- onStatusColumnUpdated(): void {
+ public onStatusColumnUpdated(): void {
this._cdRef.detectChanges();
}
@@ -336,27 +336,27 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
this._subscriptions = [selectedInstallationSub, addonRemovedSubscription, channelTypeSubscription, dataSourceSub];
}
- onInstallFromUrl(): void {
+ public onInstallFromUrl(): void {
const dialogRef = this._dialog.open(InstallFromUrlDialogComponent);
dialogRef.afterClosed().subscribe(() => {
console.log("The dialog was closed");
});
}
- onClientChange(): void {
+ public onClientChange(): void {
this._sessionService.setSelectedWowInstallation(this.selectedInstallationId);
}
- onRefresh(): void {
+ public onRefresh(): void {
this.loadPopularAddons(this.selectedInstallation);
}
- onClearSearch(): void {
+ public onClearSearch(): void {
this.query = "";
this.onSearch();
}
- onSearch(): void {
+ public onSearch(): void {
this._isBusySubject.next(true);
if (!this.query) {
@@ -383,15 +383,15 @@ export class GetAddonsComponent implements OnInit, AfterViewInit, OnDestroy, Aft
.subscribe();
}
- onDoubleClickRow(listItem: GetAddonListItem): void {
+ public onDoubleClickRow(listItem: GetAddonListItem): void {
this.openDetailDialog(listItem.searchResult, this.defaultAddonChannel);
}
- onAddonColumnDetailDialog(event: PotentialAddonViewDetailsEvent): void {
+ public onAddonColumnDetailDialog(event: PotentialAddonViewDetailsEvent): void {
this.openDetailDialog(event.searchResult, event.channelType);
}
- openDetailDialog(searchResult: AddonSearchResult, channelType: AddonChannelType): void {
+ public openDetailDialog(searchResult: AddonSearchResult, channelType: AddonChannelType): void {
const data: AddonDetailModel = {
searchResult: searchResult,
channelType: channelType,
diff --git a/wowup-electron/src/app/pages/home/home.component.ts b/wowup-electron/src/app/pages/home/home.component.ts
index 9f29ee29..75548c0a 100644
--- a/wowup-electron/src/app/pages/home/home.component.ts
+++ b/wowup-electron/src/app/pages/home/home.component.ts
@@ -1,5 +1,5 @@
-import { from, interval, Subscription } from "rxjs";
-import { filter, first, switchMap, tap } from "rxjs/operators";
+import { interval, Subscription } from "rxjs";
+import { filter, first, tap } from "rxjs/operators";
import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, NgZone, OnDestroy } from "@angular/core";
import { MatSnackBar } from "@angular/material/snack-bar";
@@ -13,7 +13,6 @@ import { ElectronService } from "../../services";
import { AddonService, ScanUpdate, ScanUpdateType } from "../../services/addons/addon.service";
import { SessionService } from "../../services/session/session.service";
import { WarcraftInstallationService } from "../../services/warcraft/warcraft-installation.service";
-import { WarcraftService } from "../../services/warcraft/warcraft.service";
import { WowUpService } from "../../services/wowup/wowup.service";
@Component({
@@ -30,7 +29,7 @@ export class HomeComponent implements AfterViewInit, OnDestroy {
public appReady = false;
public preloadSpinnerKey = "COMMON.PROGRESS_SPINNER.LOADING";
- constructor(
+ public constructor(
public electronService: ElectronService,
private _sessionService: SessionService,
private _translateService: TranslateService,
@@ -52,7 +51,7 @@ export class HomeComponent implements AfterViewInit, OnDestroy {
.subscribe(this.onScanUpdate);
}
- ngAfterViewInit(): void {
+ public ngAfterViewInit(): void {
this.electronService.powerMonitor$.pipe(filter((evt) => !!evt)).subscribe((evt) => {
console.log("Stopping app update check...");
this.destroyAppUpdateCheck();
@@ -72,7 +71,7 @@ export class HomeComponent implements AfterViewInit, OnDestroy {
});
}
- ngOnDestroy(): void {
+ public ngOnDestroy(): void {
this._appUpdateInterval?.unsubscribe();
}
@@ -126,7 +125,7 @@ export class HomeComponent implements AfterViewInit, OnDestroy {
}
};
- onSelectedIndexChange(index: number): void {
+ public onSelectedIndexChange(index: number): void {
this._sessionService.selectedHomeTab = index;
}
diff --git a/wowup-electron/src/app/pages/options/options.component.ts b/wowup-electron/src/app/pages/options/options.component.ts
index b0f627cc..daea8ec1 100644
--- a/wowup-electron/src/app/pages/options/options.component.ts
+++ b/wowup-electron/src/app/pages/options/options.component.ts
@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, Component, Input, OnInit } from "@angular/core";
+import { ChangeDetectionStrategy, Component, Input } from "@angular/core";
import { ElectronService } from "../../services";
import { WowUpService } from "../../services/wowup/wowup.service";
@@ -8,13 +8,10 @@ import { WowUpService } from "../../services/wowup/wowup.service";
styleUrls: ["./options.component.scss"],
changeDetection: ChangeDetectionStrategy.OnPush,
})
-export class OptionsComponent implements OnInit {
- @Input("tabIndex") tabIndex: number;
+export class OptionsComponent {
+ @Input("tabIndex") public tabIndex: number;
public optionTabIndex = 0;
- constructor(public wowUpService: WowUpService, public electronService: ElectronService) {}
-
- ngOnInit(): void {}
-
+ public constructor(public wowUpService: WowUpService, public electronService: ElectronService) {}
}