97732 Fixed bug where ContextHelpWrapperComponent subscriptions would not properly be initialized if the application launches with help icons hidden by default

This commit is contained in:
Koen Pauwels
2023-01-05 12:06:14 +01:00
parent e16a3edf78
commit 920e36ecf2
12 changed files with 56 additions and 41 deletions

View File

@@ -2,7 +2,9 @@
<a href="javascript:void(0);"
role="button"
(click)="onClick()"
[attr.aria-label]="'nav.context-help-toggle' | translate"
[title]="'nav.context-help-toggle' | translate"
>
<i class="fas fa-question-circle ds-context-help-toggle"></i>
<i class="fas fa-lg fa-fw fa-question-circle ds-context-help-toggle"></i>
</a>
</div>

View File

@@ -1,8 +1,8 @@
.ds-context-help-toggle {
color: var(--ds-header-icon-color);
background-color: var(--ds-header-bg);
}
.ds-context-help-toggle:hover {
color: var(--ds-header-icon-color-hover);
&:hover, &focus {
color: var(--ds-header-icon-color-hover);
}
}

View File

@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ContextHelpService } from '../../shared/context-help.service';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'ds-context-help-toggle',
@@ -9,14 +10,14 @@ import { ContextHelpService } from '../../shared/context-help.service';
export class ContextHelpToggleComponent implements OnInit {
constructor(
private contextHelpService: ContextHelpService
private contextHelpService: ContextHelpService,
private translateService: TranslateService
) { }
ngOnInit(): void {
}
onClick() {
console.log('toggling icons');
this.contextHelpService.toggleIcons();
}
}