feat: 🎸 Update scope dropdown in login to show current scope (#3308)
* feat: 🎸 Update scope dropdown in login to show current scope * test: 💍 Update e2e tests
This commit is contained in:
1 parent
b9517e0233
commit
576fef9f8a
7 files changed
+32
-25
No files matched your search
@@ -28,23 +28,25 @@
|
||||
|
||||
<Hds::Dropdown @listPosition='bottom-left' as |dd|>
|
||||
<dd.ToggleButton
|
||||
@text={{t 'actions.choose-different-org'}}
|
||||
@icon='org'
|
||||
@text={{@model.scope.displayName}}
|
||||
@icon={{if (eq @model.scope.id 'global') 'globe' 'org'}}
|
||||
@color='secondary'
|
||||
/>
|
||||
<dd.Interactive
|
||||
<dd.Checkmark
|
||||
@route='scopes.scope.authenticate'
|
||||
@model='global'
|
||||
@selected={{eq @model.scope.id 'global'}}
|
||||
>
|
||||
{{t 'titles.global'}}
|
||||
</dd.Interactive>
|
||||
</dd.Checkmark>
|
||||
{{#each this.sortedScopes as |scope|}}
|
||||
<dd.Interactive
|
||||
<dd.Checkmark
|
||||
@route='scopes.scope.authenticate'
|
||||
@model={{scope.id}}
|
||||
@selected={{eq @model.scope.id scope.id}}
|
||||
>
|
||||
{{scope.displayName}}
|
||||
</dd.Interactive>
|
||||
</dd.Checkmark>
|
||||
{{/each}}
|
||||
</Hds::Dropdown>
|
||||
<Hds::Separator />
|
||||
|
||||
@@ -18,17 +18,23 @@
|
||||
|
||||
<Hds::Dropdown @listPosition='bottom-left' as |dd|>
|
||||
<dd.ToggleButton
|
||||
@text={{t 'actions.choose-different-org'}}
|
||||
@icon='org'
|
||||
@text={{@model.scope.displayName}}
|
||||
@icon={{if (eq @model.scope.id 'global') 'globe' 'org'}}
|
||||
@color='secondary'
|
||||
/>
|
||||
<dd.Interactive {{on 'click' (fn this.selectScope 'global' dd.close)}}>
|
||||
<dd.Checkmark
|
||||
@selected={{eq @model.scope.id 'global'}}
|
||||
{{on 'click' (fn this.selectScope 'global' dd.close)}}
|
||||
>
|
||||
{{t 'titles.global'}}
|
||||
</dd.Interactive>
|
||||
</dd.Checkmark>
|
||||
{{#each this.sortedScopes as |scope|}}
|
||||
<dd.Interactive {{on 'click' (fn this.selectScope scope.id dd.close)}}>
|
||||
<dd.Checkmark
|
||||
@selected={{eq @model.scope.id scope.id}}
|
||||
{{on 'click' (fn this.selectScope scope.id dd.close)}}
|
||||
>
|
||||
{{scope.displayName}}
|
||||
</dd.Interactive>
|
||||
</dd.Checkmark>
|
||||
{{/each}}
|
||||
</Hds::Dropdown>
|
||||
|
||||
|
||||
Reference in new issue
Block a user