From 9f961c21df55afe713eddff69c12d7c85d19a6ac Mon Sep 17 00:00:00 2001 From: Radu Date: Mon, 7 Aug 2023 16:53:06 +0300 Subject: [PATCH] Add UI Validation for whitespaces - changed error messages to match warning messages style - removed the functionality of closing error messages - added validations for whitespace on idf path and tools path based on selected version of esp-idf - disabled install button if any error appear --- src/views/setup/Install.vue | 56 +++++++-------- src/views/setup/components/folderOpen.vue | 2 +- src/views/setup/components/selectEspIdf.vue | 47 ++++++++---- src/views/setup/store/index.ts | 80 +++++++++++++++++---- 4 files changed, 126 insertions(+), 59 deletions(-) diff --git a/src/views/setup/Install.vue b/src/views/setup/Install.vue index d88fefdd7..dc7cf0675 100644 --- a/src/views/setup/Install.vue +++ b/src/views/setup/Install.vue @@ -9,14 +9,8 @@ -
-

{{ espIdfErrorStatus }}

-
- -
+
+ {{ espIdfErrorStatus }}
-
-

{{ pyExecErrorStatus }}

-
- -
+
+ {{ pyExecErrorStatus }} +
@@ -44,6 +33,7 @@ @click="installEspIdf" class="button" data-config-id="start-install-btn" + :disabled="isThereAnError" > Install @@ -54,8 +44,9 @@ @@ -106,15 +111,8 @@ export default class Install extends Vue { margin: 1% 5%; } -.error-message { - padding: 0.5em; - margin: 0.5em; - display: flex; - justify-content: space-between; - align-items: center; -} - -.error-message .icon:hover { - color: var(--vscode-button-foreground); +.error-text { + color: var(--vscode-editorError-foreground); + font-size: small; } diff --git a/src/views/setup/components/folderOpen.vue b/src/views/setup/components/folderOpen.vue index 31db715a1..ce2451322 100644 --- a/src/views/setup/components/folderOpen.vue +++ b/src/views/setup/components/folderOpen.vue @@ -1,5 +1,5 @@