53 lines
1.6 KiB
Handlebars
53 lines
1.6 KiB
Handlebars
{{#unless key.isFolder}}
|
|
{{#if showAdvancedMode}}
|
|
{{json-editor
|
|
value=codemirrorString
|
|
valueUpdated=(action "codemirrorUpdated")
|
|
onFocusOut=(action "formatJSON")
|
|
}}
|
|
{{else}}
|
|
{{#each secretData as |secret index|}}
|
|
<div class="info-table-row">
|
|
<div class="column is-one-quarter info-table-row-edit">
|
|
{{input
|
|
data-test-secret-key=true
|
|
value=secret.name
|
|
placeholder="key"
|
|
change="handleChange"
|
|
class="input"
|
|
}}
|
|
</div>
|
|
<div class="column info-table-row-edit">
|
|
{{textarea
|
|
data-test-secret-value=true
|
|
name=secret.name
|
|
key-down="handleKeyDown"
|
|
change="handleChange"
|
|
value=secret.value
|
|
wrap="off"
|
|
class="input"
|
|
placeholder="value"
|
|
rows=1
|
|
}}
|
|
</div>
|
|
<div class="column is-narrow info-table-row-edit">
|
|
{{#if (eq secretData.length (inc index))}}
|
|
<button type="button" {{action "addRow"}} class="button is-outlined is-primary" data-test-secret-add-row=true>
|
|
Add
|
|
</button>
|
|
{{else}}
|
|
<button
|
|
class="button has-text-grey is-expanded is-icon"
|
|
type="button"
|
|
{{action "deleteRow" secret.name}}
|
|
aria-label="Delete row"
|
|
>
|
|
{{i-con size=22 glyph='trash-a' excludeIconClass=true class="is-large has-text-grey-light"}}
|
|
</button>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{/unless}}
|