diff --git a/src/packages/@workspaces/common/components/codemirror-input/CodeMirrorInput.svelte b/src/packages/@workspaces/common/components/codemirror-input/CodeMirrorInput.svelte index 117560186..8967c34f4 100644 --- a/src/packages/@workspaces/common/components/codemirror-input/CodeMirrorInput.svelte +++ b/src/packages/@workspaces/common/components/codemirror-input/CodeMirrorInput.svelte @@ -26,6 +26,8 @@ * unique id used to focus codemirror input */ export let codeId = ""; + let componentClass = ""; + export { componentClass as class }; const environmentHelper = new EnvironmentHeper(); let trackParanthesis: unknown[] = []; @@ -108,6 +110,7 @@ {placeholder} {disabled} {id} + {componentClass} /> {#if trackParanthesis.length === 2 && filterData.length > 0} diff --git a/src/packages/@workspaces/common/components/codemirror-input/sub-input/code-mirror-handler/CodeMirrorHandler.svelte b/src/packages/@workspaces/common/components/codemirror-input/sub-input/code-mirror-handler/CodeMirrorHandler.svelte index 8f14d2e0b..185707de6 100644 --- a/src/packages/@workspaces/common/components/codemirror-input/sub-input/code-mirror-handler/CodeMirrorHandler.svelte +++ b/src/packages/@workspaces/common/components/codemirror-input/sub-input/code-mirror-handler/CodeMirrorHandler.svelte @@ -58,6 +58,7 @@ * environment dialog box unique id */ export let id; + export let componentClass; let inputWrapper: HTMLElement; let localEnvKey = ""; @@ -349,7 +350,7 @@
-
+
diff --git a/src/packages/@workspaces/features/rest-explorer/components/http-url-section/HttpUrlSection.svelte b/src/packages/@workspaces/features/rest-explorer/components/http-url-section/HttpUrlSection.svelte index 9655083b8..344b9ff29 100644 --- a/src/packages/@workspaces/features/rest-explorer/components/http-url-section/HttpUrlSection.svelte +++ b/src/packages/@workspaces/features/rest-explorer/components/http-url-section/HttpUrlSection.svelte @@ -130,6 +130,7 @@ {onUpdateEnvironment} {environmentVariables} codeId={"url"} + class={"input-url"} /> @@ -139,7 +140,16 @@ type="default" disable={isSendRequestInProgress ? true : false} onClick={() => { - onSendButtonClicked(environmentVariables); + if (requestUrl === "") { + const codeMirrorElement = document.querySelector( + ".input-url .cm-editor", + ); + if (codeMirrorElement) { + codeMirrorElement.classList.add("url-red-border"); + } + } else { + onSendButtonClicked(environmentVariables); + } }} /> @@ -185,4 +195,7 @@ padding: 7px; background-color: var(--bg-secondary-400); } + :global(.url-red-border) { + border: 1px solid var(--border-danger-200) !important; + }