Files
threshold-ui/ui/admin/app/components/form/field/json-secret/index.hbs
T
d469f305de Replace Rose::CodeEditor with Hds::CodeEditor (#2679)
* chore: 🤖 replace Rose::CodeEditor with Hds::CodeEditor

- Remove CodeEditor 5 dependency

* chore: 🤖 Replace CodeMirror5 dep

remove CodeMirror5 and replace existing editors with HDS::CodeEditor

* chore: 🤖 deleting old codeeditor styles

* feat: 🎸 changing code editor

changing code editor

✅ Closes: 0

* removed unused export

* pr cleanup

* updating tests for new code editor

* responding to PR feedback

* added whitespace

* fixing linting violations

* chore: 🤖 self-review PR

self-review PR in the course of switching to new HDS code editor

* fix: 🐛 fix linting bug

* fix: 🐛 unneeded dependency

remove jslint dependency as this is handled in the new code editor from
HDS

* fix: 🐛 Fixing import bug

Fix import bug caused by importing scss modules that no longer exist

* Fix and refactor code editor acceptance test

* Fix and refactor code editor acceptance test

* chore: 🤖 remove codemirror dependency

* refactor: 💡 fix merge conflict issues

* test: 💍 update e2e test selectors

* test: 💍 fix target spec click event

* refactor: 💡 clean up test selectors for code editor

* refactor: 💡 clean up storage bucket test selectors

* chore: 🤖 remove code mirror modifiers

---------

Co-authored-by: calcaide <ccorvo@hashicorp.com>
Co-authored-by: cameronperera <cameron.perera@hashicorp.com>
2026-05-14 15:21:27 -04:00

33 lines
912 B
Handlebars

{{!
Copyright IBM Corp. 2021, 2026
SPDX-License-Identifier: BUSL-1.1
}}
<div class='secret-editor'>
{{#if this.isDisabled}}
<Form::Field::JsonSecret::Skeleton>
<Hds::Icon @name='eye-off' @isInline={{true}} />
{{t 'form.secret-editor.details'}}
</Form::Field::JsonSecret::Skeleton>
{{else if this.isActionable}}
<Form::Field::JsonSecret::Skeleton>
<Hds::Button
class='secret-editor-skeleton-button'
@icon='pencil-tool'
@color='secondary'
@text={{t 'form.secret-editor.edit'}}
{{on 'click' this.enableEditing}}
/>
</Form::Field::JsonSecret::Skeleton>
{{else}}
<Hds::CodeEditor
class='secret-editor-json'
@ariaLabel={{t 'form.secret-editor.label'}}
@value={{@value}}
@isLintingEnabled={{true}}
@language='json'
@onInput={{@onInput}}
data-test-code-editor
/>
{{/if}}
</div>