import Controller from '@ember/controller'; import { inject as service } from '@ember/service'; export default Controller.extend({ isShowSearchPanel: false, session: service(), sessionAccount: service(), homeNotification: service(), cordovaEvents: service('ember-cordova/events'), currentUser: null, init() { this._super(...arguments); this.set('currentUser', this.sessionAccount.currentUser); this.get('cordovaEvents').on('deviceready', this, '_initStatusBar'); }, _initStatusBar: function() { if (window.cordova.platformId == 'ios') { if (window.StatusBar != undefined) { window.StatusBar.overlaysWebView(false); window.StatusBar.backgroundColorByHexString('#F01414'); } } }, actions: { logout() { // console.log("test"); this.get('session').invalidate(); }, toPage: function(page) { //this.transitionTo(page); $('#myModal').modal('hide'); this.transitionToRoute(page); } } });