discourse/app/assets/javascripts/admin/addon/components/secret-value-list.hbs
Kris f6c5eca485
DEV: add btn-default classes to buttons using default styling (#31039)
All of these buttons use our default grey background styling, but aren't
carrying the `btn-default` class, which makes them easier to target in
themes. This PR adds the class.
2025-01-28 15:40:34 -05:00

43 lines
No EOL
1.1 KiB
Handlebars
Vendored

{{#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="btn-default 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>