forked from p15670423/monkey
UI: bugfix the need to double click on the import when importing an encrypted configuration
When back-end sends the schema for ui to validate that no unsafe options are selected, UI didn't automatically send a response back in case there were no unsafe options selected
This commit is contained in:
parent
01f8488b07
commit
8e6a2d8e7d
|
@ -37,7 +37,7 @@ const ConfigImportModal = (props: Props) => {
|
|||
if (configContents !== null) {
|
||||
sendConfigToServer();
|
||||
}
|
||||
}, [configContents])
|
||||
}, [configContents, unsafeOptionsVerified])
|
||||
|
||||
|
||||
function sendConfigToServer() {
|
||||
|
@ -67,6 +67,7 @@ const ConfigImportModal = (props: Props) => {
|
|||
} else if (res['import_status'] === 'unsafe_options_verification_required') {
|
||||
setUploadStatus(UploadStatuses.success);
|
||||
setErrorMessage('');
|
||||
|
||||
if (isUnsafeOptionSelected(res['config_schema'], JSON.parse(res['config']))) {
|
||||
setShowUnsafeOptionsConfirmation(true);
|
||||
setCandidateConfig(res['config']);
|
||||
|
|
Loading…
Reference in New Issue