open-vault/ui/app/templates/components/transit-key-actions.hbs
Arnav Palnitkar 15b3697a9f
Updated transit key action to components (#11807)
* Updated transit key action to components

* Fix indentation

* Leverage parent action directly from components

* Added tracked attribute
2021-06-11 14:44:57 -07:00

50 lines
1.5 KiB
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
</ConfirmAction>
{{/if}}
{{else}}
<MessageError @errors={{errors}} />
{{#if selectedAction}}
<div data-test-transit-action={{selectedAction}}>
{{ component (concat 'transit-key-action/' selectedAction)
key=key
keys=keys
keyIsRSA=keyIsRSA
verification=verification
hmac=hmac
param=param
key_version=key_version
isModalActive=isModalActive
ciphertext=ciphertext
plaintext=plaintext
context=context
nonce=nonce
input=input
bits=bits
algorithm=algorithm
signature=signature
signature_algorithm=signature_algorithm
hash_algorithm=hash_algorithm
prehashed=prehashed
wrappedToken=wrappedToken
exportKeyType=exportKeyType
exportKeyVersion=exportKeyVersion
encodedBase64=encodedBase64
doSubmit=(action "doSubmit")
toggleModal=(action "toggleModal")
clearParams=(action "clearParams")
}}
</div>
{{/if}}
{{/if}}