2023-04-10 15:36:59 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
|
|
|
SPDX-License-Identifier: MPL-2.0
|
|
|
|
}}
|
|
|
|
|
2023-02-07 22:42:25 +00:00
|
|
|
<form class="metadata-editor">
|
|
|
|
<label>
|
|
|
|
<strong>Key</strong>
|
|
|
|
{{#if @constantKey}}
|
|
|
|
<span class="constant-key">{{@kv.key}}</span>
|
|
|
|
{{else}}
|
|
|
|
<Input
|
|
|
|
{{autofocus}}
|
|
|
|
id="new-meta-key"
|
|
|
|
@type="text"
|
|
|
|
@value={{@kv.key}}
|
|
|
|
class="input"
|
|
|
|
{{on "keyup" @onEdit}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<strong>Value</strong>
|
|
|
|
{{#if @autofocusValue}}
|
|
|
|
<Input
|
|
|
|
data-test-metadata-editor-value
|
|
|
|
@type="text"
|
|
|
|
@value={{@kv.value}}
|
|
|
|
class="input"
|
|
|
|
{{autofocus}}
|
|
|
|
{{on "keyup" @onEdit}}
|
|
|
|
/>
|
|
|
|
{{else}}
|
|
|
|
<Input
|
|
|
|
data-test-metadata-editor-value
|
|
|
|
@type="text"
|
|
|
|
@value={{@kv.value}}
|
|
|
|
class="input"
|
|
|
|
{{on "keyup" @onEdit}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
<footer>
|
|
|
|
{{yield}}
|
|
|
|
</footer>
|
|
|
|
</form>
|