Merge pull request #235 from hashicorp/show-org-name-in-header

feat: Display organization name in header
This commit is contained in:
Randall Morey authored and GitHub committed 2020-09-28 10:06:12 -04:00
commit f9052ed352
3 files changed
+15 -1

No files matched your search

@@ -1,4 +1,4 @@
<nav class="rose-header-nav">
<nav class="rose-header-nav" aria-label="header-nav">
{{yield (hash
link=(component 'link-to' class="rose-header-nav-link")
dropdown=(component 'rose/dropdown')
+8
View File
@@ -33,4 +33,12 @@ export default class ScopesScopeRoute extends Route {
);
});
}
/**
* Set scope in application controller
*/
afterModel() {
const scope = this.modelFor('scopes.scope');
this.controllerFor('application').set('scope', scope);
}
}
+6
View File
@@ -7,6 +7,12 @@
<Rose::Header class="{{if (is-loading) " loading"}}" as |header|>
<header.brand @logo="logo-boundary" @text={{app-name}} />
{{#if this.session.isAuthenticated}}
<header.nav as |nav|>
{{#if this.scope.isOrg}}
<nav.link @route="scopes.scope" @model={{this.scope}}>{{this.scope.displayName}}</nav.link>
{{/if}}
</header.nav>
<header.utilities as |utilities|>
<utilities.dropdown
@text="user@example.net"