import { Component , AfterViewInit , DoCheck , ChangeDetectorRef } from '@angular/core' ; import { TranslateService } from '@ngx-translate/core' ; import { GameService } from '../../../core/game.service' ; import { GlobalStatusService } from '../../../global/globalStatus.service' ; import { PluginService } from '../../../core/plugin.service' ; import { AigisStatisticsService } from '../../../gameData/aigis/statistics.service' ; import { WebviewTag } from 'electron' ; @ Component ( { selector : 'app-uiframe-main' , templateUrl : './main.component.html' , styleUrls : [ './main.component.scss' ] } ) export class UIFrameMainComponent implements AfterViewInit { private zoom = 100 ; private leftWidth = 0 ; private rightWidth = 0 ; DataCollectNote = false ; constructor ( private gameService , private globalStatusService , private pluginService , private changeDetectorRef , private aigisStatisticsService ) { const state = this . globalStatusService . GlobalStatusStore . Get ( 'Zoom' ) ; this . zoom = state . Value ; state . Subscribe ( v => { this . zoom = v ; } ) ; this . DataCollectNote = ! this . aigisStatisticsService . DataCollectNoted ; } ngAfterViewInit ( ) { this . globalStatusService . GlobalStatusStore . Get ( 'LeftPluginWidth' ) . Subscribe ( v => { this . leftWidth = v | 0 ; this . changeDetectorRef . detectChanges ( ) ; } ) ; this . globalStatusService . GlobalStatusStore . Get ( 'RightPluginWidth' ) . Subscribe ( v => { this . rightWidth = v | 0 ; this . changeDetectorRef . detectChanges ( ) ; } ) ; } confirmDataPermit ( ) { this . DataCollectNote = false ; this . aigisStatisticsService . confirmDataPermit ( ) ; } }