* feat: 🎸 Update scope dropdown in login to show current scope * test: 💍 Update e2e tests
95 lines
2.9 KiB
Handlebars
95 lines
2.9 KiB
Handlebars
{{!
|
|
Copyright IBM Corp. 2021, 2026
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
{{page-title (t 'actions.authenticate')}}
|
|
|
|
<Rose::Layout::Centered>
|
|
<Rose::Layout::Page as |page|>
|
|
|
|
<page.body>
|
|
|
|
{{#if this.isOIDCRoute}}
|
|
{{outlet}}
|
|
{{else}}
|
|
<Rose::Frame>
|
|
<:header>
|
|
<Hds::Icon @name='boundary-color' @size='24' @isInline={{true}} />
|
|
<Hds::Text::Display @tag='h2' @size='400' @weight='bold'>{{t
|
|
'actions.authenticate'
|
|
}}</Hds::Text::Display>
|
|
</:header>
|
|
<:body>
|
|
<Hds::Text::Body @tag='p'>{{t
|
|
'auth.descriptions.authenticating-with-org'
|
|
name=@model.scope.displayName
|
|
}}</Hds::Text::Body>
|
|
|
|
<Hds::Dropdown @listPosition='bottom-left' as |dd|>
|
|
<dd.ToggleButton
|
|
@text={{@model.scope.displayName}}
|
|
@icon={{if (eq @model.scope.id 'global') 'globe' 'org'}}
|
|
@color='secondary'
|
|
/>
|
|
<dd.Checkmark
|
|
@route='scopes.scope.authenticate'
|
|
@model='global'
|
|
@selected={{eq @model.scope.id 'global'}}
|
|
>
|
|
{{t 'titles.global'}}
|
|
</dd.Checkmark>
|
|
{{#each this.sortedScopes as |scope|}}
|
|
<dd.Checkmark
|
|
@route='scopes.scope.authenticate'
|
|
@model={{scope.id}}
|
|
@selected={{eq @model.scope.id scope.id}}
|
|
>
|
|
{{scope.displayName}}
|
|
</dd.Checkmark>
|
|
{{/each}}
|
|
</Hds::Dropdown>
|
|
<Hds::Separator />
|
|
|
|
<Rose::Nav::Tabs as |nav|>
|
|
{{#each @model.authMethods as |authMethod|}}
|
|
<nav.link
|
|
@route='scopes.scope.authenticate.method'
|
|
@model={{authMethod.id}}
|
|
>
|
|
{{#if authMethod.name}}
|
|
{{authMethod.name}}
|
|
{{else}}
|
|
{{t
|
|
(concat 'resources.auth-method.types.' authMethod.type)
|
|
}}
|
|
{{/if}}
|
|
</nav.link>
|
|
{{/each}}
|
|
|
|
</Rose::Nav::Tabs>
|
|
|
|
{{#if @model.authMethods}}
|
|
{{outlet}}
|
|
{{else}}
|
|
<Rose::Layout::Centered>
|
|
<Hds::ApplicationState as |A|>
|
|
<A.Header
|
|
@title={{t 'resources.auth-method.messages.none.title'}}
|
|
@icon='alert-circle'
|
|
/>
|
|
<A.Body
|
|
@text={{t
|
|
'resources.auth-method.messages.none.description'
|
|
}}
|
|
/>
|
|
</Hds::ApplicationState>
|
|
</Rose::Layout::Centered>
|
|
{{/if}}
|
|
</:body>
|
|
</Rose::Frame>
|
|
{{/if}}
|
|
</page.body>
|
|
|
|
</Rose::Layout::Page>
|
|
</Rose::Layout::Centered> |