Files
threshold-ui/ui/admin/app/components/header-nav/index.hbs
T

41 lines
1.1 KiB
Handlebars
Raw Normal View History

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
2025-05-15 11:05:05 -07:00
<Hds::Dropdown @enableCollisionDetection={{true}} as |dd|>
<dd.ToggleButton
@text={{if
this.scope.org.isGlobal
(t 'titles.global')
this.scope.org.displayName
}}
@icon={{if this.scope.org.isGlobal 'globe' 'org'}}
@color='secondary'
/>
{{#if this.session.data.authenticated.isGlobal}}
2025-05-15 11:05:05 -07:00
<dd.Interactive @route='scopes.scope' @model='global'>
{{t 'titles.global'}}
2025-05-15 11:05:05 -07:00
</dd.Interactive>
{{/if}}
{{#each this.scope.orgsList as |org|}}
2025-05-15 11:05:05 -07:00
<dd.Interactive @route='scopes.scope' @model={{org.id}}>
{{org.displayName}}
2025-05-15 11:05:05 -07:00
</dd.Interactive>
2020-10-27 14:30:11 -04:00
{{/each}}
2025-05-15 11:05:05 -07:00
</Hds::Dropdown>
{{#if this.scope.project}}
2025-05-15 11:05:05 -07:00
<Hds::Dropdown as |dd|>
<dd.ToggleButton
@icon='grid'
@text={{this.scope.project.displayName}}
@color='secondary'
/>
{{#each this.scope.projectsList as |project|}}
2025-05-15 11:05:05 -07:00
<dd.Interactive @route='scopes.scope' @model={{project.id}}>
{{project.displayName}}
2025-05-15 11:05:05 -07:00
</dd.Interactive>
{{/each}}
2025-05-15 11:05:05 -07:00
</Hds::Dropdown>
2022-10-06 11:41:12 -04:00
{{/if}}