2018-04-03 14:16:57 +00:00
|
|
|
<div class="level is-mobile">
|
|
|
|
<div class="level-left">
|
2019-05-03 03:20:28 +00:00
|
|
|
<label class="is-label" data-test-pgp-label>
|
2018-04-03 14:16:57 +00:00
|
|
|
{{#if label}}
|
|
|
|
{{label}}
|
|
|
|
{{else}}
|
|
|
|
PGP KEY {{if (not-eq index '') (inc index)}}
|
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="level-right">
|
|
|
|
<div class="control is-flex">
|
|
|
|
<input
|
2019-05-03 03:20:28 +00:00
|
|
|
data-test-text-toggle
|
2018-04-03 14:16:57 +00:00
|
|
|
id={{concat "useText-" elementId}}
|
|
|
|
type="checkbox"
|
|
|
|
name={{concat "useText-" elementId}}
|
|
|
|
class="switch is-rounded is-success is-small"
|
|
|
|
checked={{key.enterAsText}}
|
|
|
|
onchange={{action (toggle "enterAsText" key)}}
|
|
|
|
/>
|
|
|
|
<label for={{concat "useText-" elementId}}>
|
|
|
|
Enter as text
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
{{#if key.enterAsText}}
|
|
|
|
<div class="control">
|
|
|
|
<textarea
|
|
|
|
class="textarea"
|
|
|
|
oninput={{action "updateData"}}
|
|
|
|
data-test-pgp-file-textarea=true
|
|
|
|
>{{key.value}}</textarea>
|
|
|
|
</div>
|
|
|
|
<p class="help has-text-grey">
|
|
|
|
{{#if textareaHelpText}}
|
|
|
|
{{textareaHelpText}}
|
|
|
|
{{else}}
|
|
|
|
Enter a base64-encoded key
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
{{else}}
|
|
|
|
<div class="control is-expanded">
|
|
|
|
<div class="file">
|
|
|
|
<label class="file-label is-fullwidth">
|
|
|
|
<input class="file-input" type="file" onchange={{action "pickedFile"}} data-test-pgp-file-input=true>
|
|
|
|
<span class="file-cta is-fullwidth">
|
|
|
|
<span class="file-icon has-text-grey-dark">
|
2019-05-13 19:05:25 +00:00
|
|
|
<Icon @glyph="file-outline" />
|
2018-04-03 14:16:57 +00:00
|
|
|
</span>
|
|
|
|
<span class="file-label has-text-grey-dark" data-test-pgp-file-input-label=true>
|
|
|
|
{{#if key.fileName}}
|
|
|
|
{{key.fileName}}
|
|
|
|
{{else}}
|
|
|
|
Choose a file…
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
{{#if key.fileName}}
|
|
|
|
<button type="button" class="file-delete-button" {{action 'clearKey'}} data-test-pgp-clear=true>
|
2019-05-13 19:05:25 +00:00
|
|
|
<Icon
|
|
|
|
@glyph="cancel-plain"
|
|
|
|
@aria-label="Close"
|
|
|
|
/>
|
2018-04-03 14:16:57 +00:00
|
|
|
</button>
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="help has-text-grey">
|
|
|
|
{{#if fileHelpText}}
|
|
|
|
{{fileHelpText}}
|
|
|
|
{{else}}
|
|
|
|
Select a PGP key from your computer
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|