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>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.label}}
|
|
|
|
{{this.label}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{else}}
|
2021-12-17 03:44:29 +00:00
|
|
|
PGP KEY
|
|
|
|
{{if (not-eq this.index "") (inc this.index)}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/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
|
2021-12-17 03:44:29 +00:00
|
|
|
id={{concat "useText-" this.elementId}}
|
2018-04-03 14:16:57 +00:00
|
|
|
type="checkbox"
|
2021-12-17 03:44:29 +00:00
|
|
|
name={{concat "useText-" this.elementId}}
|
2018-04-03 14:16:57 +00:00
|
|
|
class="switch is-rounded is-success is-small"
|
2021-12-17 03:44:29 +00:00
|
|
|
checked={{this.key.enterAsText}}
|
|
|
|
onchange={{action (toggle "enterAsText" this.key)}}
|
2018-04-03 14:16:57 +00:00
|
|
|
/>
|
2021-12-17 03:44:29 +00:00
|
|
|
<label for={{concat "useText-" this.elementId}}>
|
2018-04-03 14:16:57 +00:00
|
|
|
Enter as text
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.key.enterAsText}}
|
2018-04-03 14:16:57 +00:00
|
|
|
<div class="control">
|
|
|
|
<textarea
|
|
|
|
class="textarea"
|
|
|
|
oninput={{action "updateData"}}
|
2021-12-17 03:44:29 +00:00
|
|
|
data-test-pgp-file-textarea={{true}}
|
|
|
|
>{{this.key.value}}</textarea>
|
2018-04-03 14:16:57 +00:00
|
|
|
</div>
|
|
|
|
<p class="help has-text-grey">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.textareaHelpText}}
|
|
|
|
{{this.textareaHelpText}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{else}}
|
|
|
|
Enter a base64-encoded key
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
{{else}}
|
|
|
|
<div class="control is-expanded">
|
|
|
|
<div class="file">
|
|
|
|
<label class="file-label is-fullwidth">
|
2021-12-17 03:44:29 +00:00
|
|
|
<input class="file-input" type="file" onchange={{action "pickedFile"}} data-test-pgp-file-input={{true}} />
|
2018-04-03 14:16:57 +00:00
|
|
|
<span class="file-cta is-fullwidth">
|
|
|
|
<span class="file-icon has-text-grey-dark">
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="file" />
|
2018-04-03 14:16:57 +00:00
|
|
|
</span>
|
2021-12-17 03:44:29 +00:00
|
|
|
<span class="file-label has-text-grey-dark" data-test-pgp-file-input-label={{true}}>
|
|
|
|
{{#if this.key.fileName}}
|
|
|
|
{{this.key.fileName}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{else}}
|
|
|
|
Choose a file…
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.key.fileName}}
|
|
|
|
{{! template-lint-configure no-nested-interactive "warn" }}
|
|
|
|
<button type="button" class="file-delete-button" {{action "clearKey"}} data-test-pgp-clear={{true}}>
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="x" aria-label="Close" />
|
2018-04-03 14:16:57 +00:00
|
|
|
</button>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! template-lint-configure no-nested-interactive "on" }}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="help has-text-grey">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.fileHelpText}}
|
|
|
|
{{this.fileHelpText}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{else}}
|
|
|
|
Select a PGP key from your computer
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2021-12-17 03:44:29 +00:00
|
|
|
</div>
|