Files
threshold-ui/ui/admin/app/components/header-nav/index.hbs
T
2024-05-31 11:29:24 -07:00

44 lines
1.0 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<Rose::Dropdown
@text={{if
this.scope.org.isGlobal
(t 'titles.global')
this.scope.org.displayName
}}
@icon={{if
this.scope.org.isGlobal
'flight-icons/svg/globe-16'
'flight-icons/svg/org-16'
}}
as |dropdown|
>
{{#if this.session.data.authenticated.isGlobal}}
<dropdown.link @route='scopes.scope' @model='global'>
{{t 'titles.global'}}
</dropdown.link>
<dropdown.separator />
{{/if}}
{{#each this.scope.orgsList as |org|}}
<dropdown.link @route='scopes.scope' @model={{org.id}}>
{{org.displayName}}
</dropdown.link>
{{/each}}
</Rose::Dropdown>
{{#if this.scope.project}}
<Rose::Dropdown
@text={{this.scope.project.displayName}}
@icon='flight-icons/svg/grid-16'
as |dropdown|
>
{{#each this.scope.projectsList as |project|}}
<dropdown.link @route='scopes.scope' @model={{project.id}}>
{{project.displayName}}
</dropdown.link>
{{/each}}
</Rose::Dropdown>
{{/if}}