* refactor: 💡 use hds app header and app side nav * style: 💄 fix dark-mode colors for side nav and app header * style: 💄 cleanup * style: 💄 simplify selector * refactor: 💡 move util (param finder) to core addon * refactor: 💡 move scope picker to core addon * refactor: 💡 use hds header and app side nav in ui/desktop * refactor: 💡 clean up ui/desktop files * refactor: 💡 remove uneeded header components * refactor: 💡 remove uneeded global layout * Add missing copyright headers * style: 💄 adjust foreground and background colors to fix contras * style: 💄 remove uneeded stylelint disables * style: 💄 fix dark mode styling in desktop ui * refactor: 💡 readd user-select style * test: 💍 fix tests + e2e tests for admin and desktop UIs * refactor: 💡 clean up uneeded main elements and fix color link * Add missing copyright headers * fix: 🐛 e2e test selectors for ui/desktop * style: 💄 revert link color change * refactor: 💡 remove hds override * fix: 🐛 scope dropdown for desktop * fix: 🐛 max-height to desktop scope dropdown * Add missing copyright headers * chore: 🤖 update lockfile due to webpack update
100 lines
2.5 KiB
Handlebars
100 lines
2.5 KiB
Handlebars
{{!
|
|
Copyright IBM Corp. 2021, 2026
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
<Hds::Dropdown
|
|
class='scope-picker'
|
|
@enableCollisionDetection={{true}}
|
|
@listPosition='bottom-left'
|
|
data-test-header-scope-dropdown
|
|
...attributes
|
|
as |D|
|
|
>
|
|
{{#let this.currentScope as |scope|}}
|
|
<D.ToggleButton
|
|
@text={{scope.name}}
|
|
@icon={{scope.icon}}
|
|
class='dropdown-toggle-color-override'
|
|
/>
|
|
{{/let}}
|
|
|
|
<D.Checkmark
|
|
@icon='globe'
|
|
@route='scopes.scope'
|
|
@model='global'
|
|
@selected={{this.scope.org.isGlobal}}
|
|
>
|
|
{{t 'titles.global'}}
|
|
</D.Checkmark>
|
|
|
|
{{#if this.scope.orgsList}}
|
|
<D.Separator />
|
|
|
|
<D.Title @text={{t 'resources.org.title_plural'}} />
|
|
{{/if}}
|
|
|
|
{{#each this.truncatedOrgsList as |org|}}
|
|
<D.Checkmark
|
|
@icon='org'
|
|
@route='scopes.scope'
|
|
@model={{org.id}}
|
|
@selected={{and (eq this.scope.org.id org.id) (not this.scope.project)}}
|
|
data-test-scope-picker-org-item
|
|
>
|
|
{{org.displayName}}
|
|
</D.Checkmark>
|
|
{{/each}}
|
|
|
|
{{#if (gt this.scope.orgsList.length 5)}}
|
|
<D.Description
|
|
@text={{t 'descriptions.and-more'}}
|
|
data-test-scope-picker-org-and-more-text
|
|
/>
|
|
|
|
<D.Interactive
|
|
@route='scopes.scope.scopes'
|
|
@model='global'
|
|
data-test-scope-picker-org-count
|
|
>{{t
|
|
'descriptions.view-all-orgs'
|
|
total=this.scope.orgsList.length
|
|
}}</D.Interactive>
|
|
{{/if}}
|
|
|
|
{{! All project scopes in org are only loaded when current scope is of project type. }}
|
|
{{#if this.scope.project}}
|
|
<D.Title @text={{t 'resources.project.title_plural'}} class='indentation' />
|
|
|
|
{{#each this.truncatedProjectsList as |project|}}
|
|
<D.Checkmark
|
|
@icon='grid'
|
|
@route='scopes.scope'
|
|
@model={{project.id}}
|
|
@selected={{eq this.scope.project.id project.id}}
|
|
class='indentation'
|
|
data-test-scope-picker-project-item
|
|
>
|
|
{{project.displayName}}
|
|
</D.Checkmark>
|
|
{{/each}}
|
|
|
|
{{#if (gt this.scope.projectsList.length 5)}}
|
|
<D.Description
|
|
@text={{t 'descriptions.and-more'}}
|
|
class='indentation'
|
|
data-test-scope-picker-project-and-more-text
|
|
/>
|
|
|
|
<D.Interactive
|
|
@route='scopes.scope.scopes'
|
|
@model={{this.scope.org.id}}
|
|
class='indentation'
|
|
data-test-scope-picker-project-count
|
|
>{{t
|
|
'descriptions.view-all-projects'
|
|
total=this.scope.projectsList.length
|
|
}}</D.Interactive>
|
|
{{/if}}
|
|
{{/if}}
|
|
</Hds::Dropdown> |