Files
threshold-ui/ui/admin/app/components/form/field/json-secret/index.hbs
T
hashicorp-copywrite[bot]andCameron Perera 3d610427d0 [COMPLIANCE] Add Copyright and License Headers (#1617)
* [COMPLIANCE] Add Copyright and License Headers

* chore: 🤖 update Copyright headers to satisfy our lint rules

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2023-03-01 09:39:41 -06:00

36 lines
1012 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
<div class='secret-editor'>
{{#if this.isDisabled}}
<Form::Field::JsonSecret::Skeleton>
<Rose::Icon @name='flight-icons/svg/eye-off-16' @size='medium' />
{{t 'form.secret-editor.details'}}
</Form::Field::JsonSecret::Skeleton>
{{else if this.isActionable}}
<Form::Field::JsonSecret::Skeleton>
<Rose::Button
@iconLeft='flight-icons/svg/pencil-tool-16'
@style='secret-editor-skeleton-button'
{{on 'click' this.enableEditing}}
>
{{t 'form.secret-editor.edit'}}
</Rose::Button>
</Form::Field::JsonSecret::Skeleton>
{{else}}
<Rose::CodeEditor as |c|>
<c.fieldEditor
class='secret-editor-json'
@onInput={{@onInput}}
@value={{@value}}
@options={{hash
mode='application/json'
gutters=(array 'CodeMirror-lint-markers')
lint='true'
}}
/>
</Rose::CodeEditor>
{{/if}}
</div>