Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Always show setting labels when in developer UI mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Apr 24, 2023
1 parent 5076e66 commit d1dbc89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ <h3 [innerHTML]="setting?.Name | safe:'html'" class="mb-0 name"></h3>
</div>

<span class="flex flex-row items-center justify-start space-x-2"
*ngIf="setting?.ReleaseLevel !== releaseLevel.Stable || setting?.ExpertiseLevel !== expertise.user">
*ngIf="setting?.ReleaseLevel !== releaseLevel.Stable ||
setting?.ExpertiseLevel !== expertise.user ||
currentExpertiseLevel === expertiseNames.Developer">

<span class="inline-block px-1.5 py-0.5 bg-gray-400 rounded text-xxs text-secondary"
*appExpertiseLevel="'developer'">{{setting?.Key}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { TemplatePortal } from '@angular/cdk/portal';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, HostBinding, Input, OnDestroy, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
import { NgModel } from '@angular/forms';
import { applyQuickSetting, BaseSetting, ConfigService, ExpertiseLevelNumber, ExternalOptionHint, OptionType, PortapiService, QuickSetting, ReleaseLevel, SettingValueType, WellKnown } from '@safing/portmaster-api';
import { applyQuickSetting, BaseSetting, ConfigService, ExpertiseLevel, ExpertiseLevelNumber, ExternalOptionHint, OptionType, PortapiService, QuickSetting, ReleaseLevel, SettingValueType, WellKnown } from '@safing/portmaster-api';
import { SfngDialogRef, SfngDialogService } from '@safing/ui';
import { Button } from 'js-yaml-loader!../../../i18n/helptexts.yaml';
import { Subject, Subscription } from 'rxjs';
Expand Down Expand Up @@ -36,6 +36,7 @@ export class GenericSettingComponent<S extends BaseSetting<any, any>> implements
//

readonly optionHint = ExternalOptionHint;
readonly expertiseNames = ExpertiseLevel
readonly expertise = ExpertiseLevelNumber;
readonly optionType = OptionType;
readonly releaseLevel = ReleaseLevel;
Expand Down Expand Up @@ -414,6 +415,10 @@ export class GenericSettingComponent<S extends BaseSetting<any, any>> implements
return this.expertiseService.change;
}

get currentExpertiseLevel() {
return this.expertiseService.currentLevel;
}

constructor(
private expertiseService: ExpertiseService,
private configService: ConfigService,
Expand Down

0 comments on commit d1dbc89

Please sign in to comment.