66 firstTruthyValueFrom ,
77 i18n ,
88 Identity ,
9+ log ,
910 OrganisationService ,
1011} from '@placeos/common' ;
1112import { PlaceSystem , querySystems } from '@placeos/ts-client' ;
@@ -196,15 +197,18 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
196197 'route.query' ,
197198 this . _route . queryParamMap . subscribe ( ( params ) => {
198199 if ( params . has ( 'clear' ) && params . get ( 'clear' ) === 'true' ) {
200+ log ( 'BOOTSTRAP' , 'Bootstrapped data clear' ) ;
199201 localStorage . removeItem ( STORE_DISPLAY_KEY ) ;
200202 localStorage . removeItem ( STORE_BUILDING_KEY ) ;
201203 }
202204 if ( params . has ( 'building' ) ) {
203205 this . setBuilding ( params . get ( 'building' ) ) ;
206+ log ( 'BOOTSTRAP' , 'Bootstrapped data for building set' ) ;
204207 }
205208 if ( params . has ( 'display' ) ) {
206209 this . active_display = params . get ( 'display' ) ;
207- this . bootstrapKiosk ( ) ;
210+ log ( 'BOOTSTRAP' , 'Bootstrapped data for display set' ) ;
211+ this . bootstrapPanel ( ) ;
208212 }
209213 } ) ,
210214 ) ;
@@ -220,7 +224,7 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
220224 /**
221225 * Store bootstrapped values and navigate to the main page
222226 */
223- public async bootstrapKiosk ( ) {
227+ public async bootstrapPanel ( ) {
224228 this . loading . set ( i18n ( 'APP.SIGNAGE.BOOTSTRAP_LOADING' ) ) ;
225229 const bld = await firstTruthyValueFrom ( this . active_building ) ;
226230 if ( ! bld ?. id || ! this . active_display || ! localStorage ) {
@@ -229,6 +233,10 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
229233 }
230234 localStorage . setItem ( STORE_BUILDING_KEY , bld . id ) ;
231235 localStorage . setItem ( STORE_DISPLAY_KEY , this . active_display ) ;
236+ log (
237+ 'BOOTSTRAP' ,
238+ `Bootstrapped panel to building "${ bld . id } " and display ${ this . active_display } ` ,
239+ ) ;
232240 this . _router . navigate ( [ '/signage' , this . active_display ] ) ;
233241 this . loading . set ( '' ) ;
234242 }
@@ -242,6 +250,10 @@ export class BootstrapComponent extends AsyncHandler implements OnInit {
242250 const display_id = localStorage ?. getItem ( STORE_DISPLAY_KEY ) ;
243251
244252 if ( bld_id && display_id ) {
253+ log (
254+ 'BOOTSTRAP' ,
255+ `Application already bootstrapped to building "${ bld_id } " and display ${ display_id } ` ,
256+ ) ;
245257 this . _router . navigate ( [ '/signage' , display_id ] ) ;
246258 }
247259 VirtualKeyboardComponent . enabled =
0 commit comments