mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
UI: add warning before downloading secret data (#23260)
* add confirm modal for downloading masked data * close modal if user clicks download * add changelog; * pass onSuccess function instead * only render modal on DOM if download is allowed
This commit is contained in:
@@ -27,12 +27,14 @@ import autosize from 'autosize';
|
||||
* @param name {String} - The key correlated to the value. Used for the download file name.
|
||||
* @param [onChange=Callback] {Function|action} - Callback triggered on change, sends new value. Must set the value of @value
|
||||
* @param [allowCopy=false] {bool} - Whether or not the input should render with a copy button.
|
||||
* @param [allowDownload=false] {bool} - Renders a download button that prompts a confirmation modal to download the secret value
|
||||
* @param [displayOnly=false] {bool} - Whether or not to display the value as a display only `pre` element or as an input.
|
||||
*
|
||||
*/
|
||||
export default class MaskedInputComponent extends Component {
|
||||
textareaId = 'textarea-' + guidFor(this);
|
||||
@tracked showValue = false;
|
||||
@tracked modalOpen = false;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
|
||||
Reference in New Issue
Block a user