open-vault/ui/app/templates/components/transit-key-actions.hbs
Joshua Ogle 7eff7b51aa
UI: Confirm Action as a popover
* Refactors ConfirmAction implementation as a popover
* Improves copy surrounding consequences of destructive actions
* Moves 'Delete' buttons to Toolbar
2019-05-17 11:29:21 -06:00

23 lines
712 B
Handlebars

{{#if (eq selectedAction 'rotate')}}
{{#if key.canRotate}}
<ConfirmAction
@buttonClasses="toolbar-link"
@confirmTitle="Rotate this key?"
@confirmMessage="After rotation, all key actions will default to using the newest version of the key."
@confirmButtonText="Rotate"
@onConfirmAction={{action "doSubmit"}}
data-test-transit-key-rotate="true"
>
Rotate encryption key
<Chevron @isButton={{true}} />
</ConfirmAction>
{{/if}}
{{else}}
{{message-error errors=errors}}
{{#if selectedAction}}
<div data-test-transit-action={{selectedAction}}>
{{partial (concat 'components/transit-key-action/' selectedAction)}}
</div>
{{/if}}
{{/if}}