From 9c4af32fd81b688529e820de7a08dce221d17544 Mon Sep 17 00:00:00 2001 From: Ronni Skansing Date: Sun, 31 Aug 2025 15:43:42 +0200 Subject: [PATCH] added simple code editor for API sender body Signed-off-by: Ronni Skansing --- .../components/editor/SimpleCodeEditor.svelte | 117 ++++++++++++++++++ frontend/src/routes/api-sender/+page.svelte | 32 +++-- 2 files changed, 137 insertions(+), 12 deletions(-) create mode 100644 frontend/src/lib/components/editor/SimpleCodeEditor.svelte diff --git a/frontend/src/lib/components/editor/SimpleCodeEditor.svelte b/frontend/src/lib/components/editor/SimpleCodeEditor.svelte new file mode 100644 index 0000000..38cf908 --- /dev/null +++ b/frontend/src/lib/components/editor/SimpleCodeEditor.svelte @@ -0,0 +1,117 @@ + + +
+
+ {#if placeholder} +
+ + {#if showExample} +
+
+ Example: + +
+
{placeholder}
+
+ {/if} +
+ {/if} +
diff --git a/frontend/src/routes/api-sender/+page.svelte b/frontend/src/routes/api-sender/+page.svelte index 1093325..927746f 100644 --- a/frontend/src/routes/api-sender/+page.svelte +++ b/frontend/src/routes/api-sender/+page.svelte @@ -30,6 +30,7 @@ import { showIsLoading, hideIsLoading } from '$lib/store/loading.js'; import TableDropDownEllipsis from '$lib/components/table/TableDropDownEllipsis.svelte'; import DeleteAlert from '$lib/components/modal/DeleteAlert.svelte'; + import SimpleCodeEditor from '$lib/components/editor/SimpleCodeEditor.svelte'; // services const appStateService = AppStateService.instance; @@ -402,7 +403,7 @@ -
+

Request Details

Request Headers - +
+

Request Body

+
+

optional

+
+
+ Request Body
+ "body": "{{.Content}}" +}`} + /> +