11import { Component , OnInit , ChangeDetectorRef } from '@angular/core' ;
22import { AdminUpdateConfigService , ConfigFile } from './admin-update-config.service' ;
3- import { Observable } from 'rxjs' ;
43import { NotificationsService } from '../../shared/notifications/notifications.service' ;
54import { TranslateService } from '@ngx-translate/core' ;
65
@@ -24,12 +23,12 @@ export class AdminUpdateConfigComponent implements OnInit {
2423 /**
2524 * Current file content
2625 */
27- fileContent : string = '' ;
26+ fileContent = '' ;
2827
2928 /**
3029 * Original file content for reset functionality
3130 */
32- originalContent : string = '' ;
31+ originalContent = '' ;
3332
3433 /**
3534 * Whether we're currently loading data
@@ -141,12 +140,12 @@ export class AdminUpdateConfigComponent implements OnInit {
141140 next : ( result ) => {
142141 this . saving = false ;
143142 this . originalContent = this . fileContent ;
144-
143+
145144 this . notificationsService . success (
146- this . translateService . instant ( 'admin.update-config.success.save.title' ) ,
145+ this . translateService . instant ( 'admin.update-config.success.save.title' ) ,
147146 this . translateService . instant ( 'admin.update-config.success.save.message' , { fileName : this . selectedFile ?. fileName } )
148147 ) ;
149-
148+
150149 this . loadConfigFiles ( ) ;
151150 this . cdr . detectChanges ( ) ; // Force change detection after save
152151 } ,
@@ -178,15 +177,15 @@ export class AdminUpdateConfigComponent implements OnInit {
178177
179178 this . loading = true ;
180179 this . cdr . detectChanges ( ) ; // Force change detection to show loading state
181-
180+
182181 this . configService . reloadOriginalContent ( this . selectedFile . fileName ) . subscribe ( {
183182 next : ( originalContent ) => {
184183 this . fileContent = originalContent ;
185184 this . originalContent = originalContent ;
186185 this . loading = false ;
187-
186+
188187 this . notificationsService . success (
189- this . translateService . instant ( 'admin.update-config.success.reload.title' ) ,
188+ this . translateService . instant ( 'admin.update-config.success.reload.title' ) ,
190189 this . translateService . instant ( 'admin.update-config.success.reload.message' , { fileName : this . selectedFile ?. fileName } )
191190 ) ;
192191 this . cdr . detectChanges ( ) ; // Force change detection after reload
@@ -218,4 +217,4 @@ export class AdminUpdateConfigComponent implements OnInit {
218217 }
219218 return this . translateService . instant ( 'admin.update-config.select.choose-file' ) ;
220219 }
221- }
220+ }
0 commit comments