41 lines
1.1 KiB
Handlebars
41 lines
1.1 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
<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}}
|
|
<dd.Interactive @route='scopes.scope' @model='global'>
|
|
{{t 'titles.global'}}
|
|
</dd.Interactive>
|
|
{{/if}}
|
|
{{#each this.scope.orgsList as |org|}}
|
|
<dd.Interactive @route='scopes.scope' @model={{org.id}}>
|
|
{{org.displayName}}
|
|
</dd.Interactive>
|
|
{{/each}}
|
|
</Hds::Dropdown>
|
|
|
|
{{#if this.scope.project}}
|
|
<Hds::Dropdown as |dd|>
|
|
<dd.ToggleButton
|
|
@icon='grid'
|
|
@text={{this.scope.project.displayName}}
|
|
@color='secondary'
|
|
/>
|
|
{{#each this.scope.projectsList as |project|}}
|
|
<dd.Interactive @route='scopes.scope' @model={{project.id}}>
|
|
{{project.displayName}}
|
|
</dd.Interactive>
|
|
{{/each}}
|
|
</Hds::Dropdown>
|
|
{{/if}} |