* chore: 🤖 Update editor config settings * chore: 🤖 Add back ember-template-lint-plugin-prettier * style: 💄 Format admin * style: 💄 Format desktop * style: 💄 Format rose * style: 💄 Format core * style: 💄 Format api
89 lines
2.4 KiB
Handlebars
89 lines
2.4 KiB
Handlebars
{{#if @model.isOIDC}}
|
|
<Rose::Dropdown
|
|
@text={{t (concat 'states.' @model.attributes.state)}}
|
|
@icon={{if
|
|
@model.isInactive
|
|
'flight-icons/svg/x-circle-16'
|
|
(if
|
|
@model.isPrivate
|
|
'flight-icons/svg/lock-16'
|
|
'flight-icons/svg/check-circle-16'
|
|
)
|
|
}}
|
|
@dropdownRight={{true}}
|
|
as |dropdown|
|
|
>
|
|
<dropdown.section @title={{t 'actions.change-state'}}>
|
|
<Rose::Form as |form|>
|
|
<form.radioGroup
|
|
@name='theme'
|
|
@selectedValue={{@model.attributes.state}}
|
|
@changed={{route-action 'changeState'}}
|
|
as |radioGroup|
|
|
>
|
|
{{#each @model.options.oidc.state as |state|}}
|
|
<dropdown.item>
|
|
<radioGroup.radio
|
|
@label={{t (concat 'states.' state)}}
|
|
@value={{state}}
|
|
/>
|
|
</dropdown.item>
|
|
{{/each}}
|
|
</form.radioGroup>
|
|
</Rose::Form>
|
|
</dropdown.section>
|
|
</Rose::Dropdown>
|
|
{{/if}}
|
|
|
|
<Rose::Dropdown
|
|
@text={{t 'actions.manage'}}
|
|
@dropdownRight={{true}}
|
|
as |dropdown|
|
|
>
|
|
{{#if @model.isPrimary}}
|
|
<dropdown.button
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'removeAsPrimary' @model)}}
|
|
>
|
|
{{t 'resources.auth-method.actions.remove-as-primary'}}
|
|
</dropdown.button>
|
|
{{else}}
|
|
<dropdown.button
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'makePrimary' @model)}}
|
|
>
|
|
{{t 'resources.auth-method.actions.make-primary'}}
|
|
</dropdown.button>
|
|
{{/if}}
|
|
{{#if (can 'create model' @model collection='accounts')}}
|
|
|
|
<dropdown.link
|
|
@route='scopes.scope.auth-methods.auth-method.accounts.new'
|
|
@model={{@model}}
|
|
>
|
|
{{t 'resources.account.actions.create'}}
|
|
</dropdown.link>
|
|
{{/if}}
|
|
|
|
{{#if (can 'create model' @model collection='managed-groups')}}
|
|
{{#if @model.isOIDC}}
|
|
<dropdown.link
|
|
@route='scopes.scope.auth-methods.auth-method.managed-groups.new'
|
|
@model={{@model}}
|
|
>
|
|
{{t 'resources.managed-group.actions.create'}}
|
|
</dropdown.link>
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
{{#if (can 'delete model' @model)}}
|
|
<dropdown.separator />
|
|
<dropdown.button
|
|
@style='danger'
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (route-action 'delete' @model)}}
|
|
>
|
|
{{t 'resources.auth-method.actions.delete'}}
|
|
</dropdown.button>
|
|
{{/if}}
|
|
</Rose::Dropdown> |