mirror of
https://github.com/WowUp/WowUp.git
synced 2026-04-23 23:37:11 -04:00
@@ -18,15 +18,8 @@
|
||||
}}
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<button
|
||||
mat-flat-button
|
||||
color="primary"
|
||||
class="select-button"
|
||||
(click)="onSelectClientPath()"
|
||||
appUserActionTracker
|
||||
category="Options"
|
||||
[action]="clientTypeName + 'SelectPath'"
|
||||
>
|
||||
<button mat-flat-button color="primary" class="select-button" (click)="onSelectClientPath()" appUserActionTracker
|
||||
category="Options" [action]="clientTypeName + 'SelectPath'">
|
||||
{{ "PAGES.OPTIONS.WOW.OPEN_WOW_DIRECTORY_SELECT_BUTTON" | translate }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -38,19 +31,10 @@
|
||||
<mat-label>{{
|
||||
"PAGES.OPTIONS.WOW.DEFAULT_ADDON_CHANNEL_SELECT_LABEL" | translate
|
||||
}}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="selectedAddonChannelType"
|
||||
(selectionChange)="onDefaultAddonChannelChange($event)"
|
||||
appUserActionTracker
|
||||
category="Options"
|
||||
[action]="clientTypeName + 'DefaultChannel'"
|
||||
[label]="selectedAddonChannelType"
|
||||
>
|
||||
<mat-option
|
||||
*ngFor="let channel of addonChannelInfos"
|
||||
[value]="channel.type"
|
||||
>{{ channel.name }}</mat-option
|
||||
>
|
||||
<mat-select [(value)]="selectedAddonChannelType" (selectionChange)="onDefaultAddonChannelChange($event)"
|
||||
appUserActionTracker category="Options" [action]="clientTypeName + 'DefaultChannel'"
|
||||
[label]="selectedAddonChannelType">
|
||||
<mat-option *ngFor="let channel of addonChannelInfos" [value]="channel.type">{{ channel.name | translate }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@@ -61,13 +45,7 @@
|
||||
"PAGES.OPTIONS.WOW.AUTO_UPDATE_DESCRIPTION" | translate
|
||||
}}</small>
|
||||
</div>
|
||||
<mat-slide-toggle
|
||||
[(checked)]="clientAutoUpdate"
|
||||
(change)="onDefaultAutoUpdateChange($event)"
|
||||
appUserActionTracker
|
||||
category="Options"
|
||||
[action]="clientTypeName + 'DefaultAutoUpdate'"
|
||||
[label]="clientAutoUpdate"
|
||||
>
|
||||
<mat-slide-toggle [(checked)]="clientAutoUpdate" (change)="onDefaultAutoUpdateChange($event)" appUserActionTracker
|
||||
category="Options" [action]="clientTypeName + 'DefaultAutoUpdate'" [label]="clientAutoUpdate">
|
||||
</mat-slide-toggle>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,17 +29,16 @@ export class WowClientOptionsComponent implements OnInit, OnDestroy {
|
||||
|
||||
private subscriptions: Subscription[] = [];
|
||||
|
||||
public readonly addonChannelInfos: {
|
||||
type: AddonChannelType;
|
||||
name: string;
|
||||
}[];
|
||||
|
||||
public clientTypeName: string;
|
||||
public clientFolderName: string;
|
||||
public clientLocation: string;
|
||||
public selectedAddonChannelType: AddonChannelType;
|
||||
public addonChannelInfos: {
|
||||
type: AddonChannelType;
|
||||
name: string;
|
||||
}[] = getEnumList(AddonChannelType).map((type: AddonChannelType) => ({
|
||||
type: type,
|
||||
name: getEnumName(AddonChannelType, type),
|
||||
}));
|
||||
|
||||
public clientAutoUpdate: boolean;
|
||||
|
||||
constructor(
|
||||
@@ -49,6 +48,8 @@ export class WowClientOptionsComponent implements OnInit, OnDestroy {
|
||||
private _wowupService: WowUpService,
|
||||
private _cdRef: ChangeDetectorRef
|
||||
) {
|
||||
this.addonChannelInfos = this.getAddonChannelInfos();
|
||||
|
||||
const warcraftProductSubscription = this._warcraftService.products$.subscribe(
|
||||
(products) => {
|
||||
const product = products.find((p) => p.clientType === this.clientType);
|
||||
@@ -97,6 +98,16 @@ export class WowClientOptionsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
private getAddonChannelInfos() {
|
||||
return getEnumList(AddonChannelType).map((type: AddonChannelType) => {
|
||||
const channelName = getEnumName(AddonChannelType, type).toUpperCase();
|
||||
return {
|
||||
type: type,
|
||||
name: `COMMON.ENUM.ADDON_CHANNEL_TYPE.${channelName}`,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private async selectWowClientPath(
|
||||
clientType: WowClientType
|
||||
): Promise<string> {
|
||||
|
||||
@@ -39,8 +39,15 @@
|
||||
"MILLION": "{count} Millionen",
|
||||
"THOUSAND": "{count} Tausend"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
"LOADING": "Laden..."
|
||||
}
|
||||
},
|
||||
"DIALOGS": {
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} million",
|
||||
"THOUSAND": "{count} thousand"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} million",
|
||||
"THOUSAND": "{count} thousand"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} million",
|
||||
"THOUSAND": "{count} thousand"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} {count, plural, one{milione} other{milioni}}",
|
||||
"THOUSAND": "{count, plural, one{mille} other{{count} mila}}"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Caricamento in corso..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} million",
|
||||
"THOUSAND": "{count} thousand"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} millioner",
|
||||
"THOUSAND": "{count} tusen"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Laster..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} million",
|
||||
"THOUSAND": "{count} thousand"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} {count, plural, one{миллион} few{миллиона} other{миллионов}}",
|
||||
"THOUSAND": "{count} {count, plural, one{тысяча} few{тысячи} other{тысяч}}"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Загрузка..."
|
||||
}
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
"MILLION": "{count} million",
|
||||
"THOUSAND": "{count} thousand"
|
||||
},
|
||||
"ENUM": {
|
||||
"ADDON_CHANNEL_TYPE": {
|
||||
"ALPHA": "Alpha",
|
||||
"BETA": "Beta",
|
||||
"STABLE": "Stable"
|
||||
}
|
||||
},
|
||||
"PROGRESS_SPINNER": {
|
||||
"LOADING": "Loading..."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user