class MainViewController extends ViewController { viewDidAppear() { if (!localStorage.getItem("code")) { UIKit.activeScene.show(UIKit.getViewControllerById("code-view-controller")); } if (localStorage.getItem("level") == 2) { this.manageLink.style.display = ""; } //Load the reservations in the main menu and hide the menu during that time. if (!ReservationManager.reservations) { this.view.style.display = "none"; ReservationManager.loadReservations(this.onReservationsLoaded.bind(this)); } } onReservationsLoaded() { this.view.style.display = ""; } } UIKit.registerViewControllerType(MainViewController);