@@ -2,10 +2,14 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject } from "@
22import { MatButtonModule } from "@angular/material/button" ;
33import { MAT_SNACK_BAR_DATA , MatSnackBarModule , MatSnackBarRef } from "@angular/material/snack-bar" ;
44import { CommonModule } from "@angular/common" ;
5+ import { Store } from "@ngxs/store" ;
6+ import { Observable } from "rxjs" ;
7+ import { AppState } from "../../state" ;
58import { log } from "../../util/logger" ;
9+ import { LangUtils } from "../../util/lang-utils" ;
610import { BaseComponent } from "../../core/base-component" ;
711import { AppProfile } from "../../models/app-profile" ;
8- import { LangUtils } from "../../util/lang-utils " ;
12+ import { AppStateBehaviorManager } from "../../services/app-state-behavior-manager " ;
913
1014@Component ( {
1115 templateUrl : "./profile-verification-results.modal.html" ,
@@ -58,15 +62,20 @@ export class AppProfileVerificationResultsModal extends BaseComponent {
5862
5963 private static readonly BLACKLISTED_ERROR_KEYS : Array < string > = [ ] ;
6064
65+ public readonly isLogPanelEnabled$ : Observable < boolean > ;
66+
6167 protected readonly errors : string [ ] ;
6268
6369 constructor (
6470 cdRef : ChangeDetectorRef ,
71+ store : Store ,
6572 protected readonly snackBarRef : MatSnackBarRef < AppProfileVerificationResultsModal > ,
73+ protected readonly appManager : AppStateBehaviorManager ,
6674 @Inject ( MAT_SNACK_BAR_DATA ) verificationResults : AppProfile . VerificationResultRecord < string >
6775 ) {
6876 super ( { cdRef } ) ;
6977
78+ this . isLogPanelEnabled$ = store . select ( AppState . isLogPanelEnabled ) ;
7079 this . errors = this . collectErrors ( verificationResults ) ;
7180 }
7281
@@ -76,7 +85,7 @@ export class AppProfileVerificationResultsModal extends BaseComponent {
7685 const errorText = this . mapVerificationResultToError ( propertyKey , verificationResult ) ;
7786
7887 if ( errorText && ! errors . includes ( errorText ) ) {
79- log . error ( `Profile verification error:` , propertyKey , errorText , verificationResult ) ;
88+ log . error ( `Profile verification error:` , `" ${ propertyKey } "` , errorText ) ;
8089
8190 if ( ! logOnly ) {
8291 errors . push ( errorText ) ;
0 commit comments