UI: glimmerize masked input (#20431)

* Glimmerize masked-input

* Update secret-create-or-update to change masked-input value

* Use maskedInput for ssh configure privateKey

* Add download button to masked input and v2 secrets. Resolves #6364

* Add changelog
This commit is contained in:
Chelsea Shaw
2023-05-01 11:43:05 -05:00
committed by GitHub
parent a7071ae14f
commit b5e82f5ad1
13 changed files with 158 additions and 176 deletions

View File

@@ -253,22 +253,16 @@ export default class SecretCreateOrUpdate extends Component {
this.codemirrorString = this.args.secretData.toJSONString(true);
}
@action
handleMaskedInputChange(secret, index, value) {
const row = { ...secret, value };
set(this.args.secretData, index, row);
this.handleChange();
}
@action
handleChange() {
this.codemirrorString = this.args.secretData.toJSONString(true);
set(this.args.modelForData, 'secretData', this.args.secretData.toJSON());
}
//submit on shift + enter
@action
handleKeyDown(e) {
e.stopPropagation();
if (!(e.keyCode === keys.ENTER && e.metaKey)) {
return;
}
const $form = this.element.querySelector('form');
if ($form.length) {
$form.submit();
}
}
@action
updateValidationErrorCount(errorCount) {
this.validationErrorCount = errorCount;