c1df15e790
* adds ember-flight-icons dependecy * adds inline-json-import babel plugin * adds flight icon styling * updates Icon component to support flight icons * updates Icon component usages to new api and updates name values to flight icon set when available * fixes tests * updates icon story with flight mappings and fixes issue with flight icons not rendering in storybook * adds changelog * fixes typo in sign action glyph name in transit-key model * adds comments to icon-map * updates Icon component to use only supported flight icon sizes * adds icon transform codemod * updates icon transform formatting to handle edge case * runs icon transform on templates * updates Icon usage in toolbar-filter md and story * updates tests
81 lines
3.1 KiB
Handlebars
81 lines
3.1 KiB
Handlebars
<form onsubmit={{action @doSubmit (hash ciphertext=@ciphertext context=@context nonce=@nonce key_version=@key_version)}}>
|
|
<div class="box is-sideless is-fullwidth is-marginless">
|
|
<NamespaceReminder @mode="perform" @noun="rewrap" />
|
|
<div class="content">
|
|
<p>You can rewrap the provided ciphertext using the latest version of <code>{{@key.name}}</code> as the encryption key.</p>
|
|
</div>
|
|
<KeyVersionSelect @key={{@key}} @onVersionChange={{action (mut @key_version)}} @key_version={{@key_version}} />
|
|
<div class="field">
|
|
<div class="control is-expanded">
|
|
<JsonEditor
|
|
@title="Ciphertext"
|
|
@valueUpdated={{action (mut @ciphertext)}}
|
|
@options={{hash
|
|
mode='ruby'
|
|
}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
{{#if @key.derived}}
|
|
<div class="field">
|
|
<label for="context" class="is-label">
|
|
Context
|
|
</label>
|
|
<div class="field has-addons">
|
|
<div class="control">
|
|
<Input @type="text" @id="context" @value={{@context}} class="input" data-test-transit-input="context" />
|
|
</div>
|
|
<div class="control">
|
|
<B64Toggle @value={{@context}} @data-test-transit-b64-toggle="context" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{#if (eq @key.convergentEncryptionVersion 1)}}
|
|
<div class="field">
|
|
<label for="nonce" class="is-label">Nonce</label>
|
|
<div class="field has-addons">
|
|
<div class="control">
|
|
<Input @type="text" @id="nonce" @value={{@nonce}} class="input" data-test-transit-input="nonce" />
|
|
</div>
|
|
<div class="control">
|
|
<B64Toggle @value={{@nonce}} @data-test-transit-b64-toggle="nonce" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
<div class="field box is-fullwidth is-bottomless">
|
|
<div class="content">
|
|
<p class="help">
|
|
Submitting this form will update the <code>ciphertext</code> in-place.
|
|
</p>
|
|
</div>
|
|
<div class="control">
|
|
<button type="submit" class="button is-primary">
|
|
Rewrap
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<Modal @title="Copy your token" @onClose={{action (mut @isModalActive)}} @isActive={{@isModalActive}}>
|
|
<section class="modal-card-body">
|
|
<div class="box is-shadowless is-fullwidth is-sideless">
|
|
<h2 class="title is-6">Ciphertext</h2>
|
|
<div class="copy-text level">
|
|
<code class="level-left" data-test-encrypted-value="ciphertext">{{@ciphertext}}</code>
|
|
<CopyButton class="button is-compact is-transparent level-right" data-test-button="modal-copy"
|
|
@clipboardText={{@ciphertext}} @buttonType="button" @success={{action (set-flash-message 'Ciphertext copied!')}}>
|
|
<Icon @name="clipboard-copy" aria-label="Copy" />
|
|
</CopyButton>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<footer class="modal-card-foot">
|
|
<CopyButton class="button is-primary copy-close" data-test-button="modal-copy-close" @clipboardText={{@ciphertext}}
|
|
@buttonType="button" @success={{action @toggleModal "Ciphertext copied!"}}>
|
|
Copy & Close
|
|
</CopyButton>
|
|
</footer>
|
|
</Modal>
|