43 lines
1.1 KiB
Handlebars
43 lines
1.1 KiB
Handlebars
{{#if this.collection}}
|
|
<div class="values">
|
|
{{#each this.collection as |value index|}}
|
|
<div class="value" data-index={{index}}>
|
|
<DButton
|
|
@action={{fn this.removeValue value}}
|
|
@icon="xmark"
|
|
class="remove-value-btn btn-small"
|
|
/>
|
|
<Input
|
|
@value={{value.key}}
|
|
class="value-input"
|
|
{{on "focusout" (fn this.changeKey index)}}
|
|
/>
|
|
<Input
|
|
@value={{value.secret}}
|
|
class="value-input"
|
|
@type={{if this.isSecret "password" "text"}}
|
|
{{on "focusout" (fn this.changeSecret index)}}
|
|
/>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="value">
|
|
<TextField
|
|
@value={{this.newKey}}
|
|
@placeholder={{this.setting.placeholder.key}}
|
|
class="new-value-input key"
|
|
/>
|
|
<Input
|
|
@type="password"
|
|
@value={{this.newSecret}}
|
|
class="new-value-input secret"
|
|
placeholder={{this.setting.placeholder.value}}
|
|
/>
|
|
<DButton
|
|
@action={{this.addValue}}
|
|
@icon="plus"
|
|
class="add-value-btn btn-small"
|
|
/>
|
|
</div> |