2018-09-25 16:28:26 +00:00
|
|
|
import Component from '@ember/component';
|
2021-10-13 20:04:39 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { computed } from '@ember/object';
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Component.extend({
|
2021-10-13 20:04:39 +00:00
|
|
|
router: service(),
|
2018-06-26 21:35:47 +00:00
|
|
|
'data-test-navheader': true,
|
2018-12-07 20:00:52 +00:00
|
|
|
classNameBindings: 'consoleFullscreen:panel-fullscreen',
|
2018-06-26 21:35:47 +00:00
|
|
|
tagName: 'header',
|
2018-10-21 19:19:34 +00:00
|
|
|
navDrawerOpen: false,
|
2018-12-07 20:00:52 +00:00
|
|
|
consoleFullscreen: false,
|
2021-10-13 20:04:39 +00:00
|
|
|
hideLinks: computed('router.currentRouteName', function() {
|
|
|
|
let currentRoute = this.router.currentRouteName;
|
|
|
|
if ('vault.cluster.identity.oidc-provider' === currentRoute) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}),
|
2018-10-21 19:19:34 +00:00
|
|
|
actions: {
|
|
|
|
toggleNavDrawer(isOpen) {
|
|
|
|
if (isOpen !== undefined) {
|
|
|
|
return this.set('navDrawerOpen', isOpen);
|
|
|
|
}
|
|
|
|
this.toggleProperty('navDrawerOpen');
|
|
|
|
},
|
|
|
|
},
|
2018-06-26 21:35:47 +00:00
|
|
|
});
|