|
@@ -24,6 +24,8 @@
|
|
|
import CodeMirror from "./CodeMirror.svelte";
|
|
import CodeMirror from "./CodeMirror.svelte";
|
|
|
import * as Resizable from "$lib/components/ui/resizable/index";
|
|
import * as Resizable from "$lib/components/ui/resizable/index";
|
|
|
|
|
|
|
|
|
|
+ let requestPane: Resizable.Pane;
|
|
|
|
|
+ let responsePane: Resizable.Pane;
|
|
|
let isSending = $state(false);
|
|
let isSending = $state(false);
|
|
|
let response: any = $state();
|
|
let response: any = $state();
|
|
|
|
|
|
|
@@ -206,10 +208,11 @@
|
|
|
<!-- ================= REQUEST PANEL ================= -->
|
|
<!-- ================= REQUEST PANEL ================= -->
|
|
|
|
|
|
|
|
<Resizable.PaneGroup direction="vertical" class="flex-1 w-full rounded-lg">
|
|
<Resizable.PaneGroup direction="vertical" class="flex-1 w-full rounded-lg">
|
|
|
- <Resizable.Pane defaultSize={100}>
|
|
|
|
|
|
|
+ <Resizable.Pane defaultSize={100} bind:this={requestPane}>
|
|
|
<Accordion.Root
|
|
<Accordion.Root
|
|
|
type="multiple"
|
|
type="multiple"
|
|
|
value={["auth", "params", "headers", "body"]}
|
|
value={["auth", "params", "headers", "body"]}
|
|
|
|
|
+ class="h-full overflow-scroll"
|
|
|
>
|
|
>
|
|
|
<!-- URL PARAMS -->
|
|
<!-- URL PARAMS -->
|
|
|
|
|
|
|
@@ -356,11 +359,18 @@
|
|
|
</Accordion.Root>
|
|
</Accordion.Root>
|
|
|
</Resizable.Pane>
|
|
</Resizable.Pane>
|
|
|
|
|
|
|
|
- <Resizable.Handle withHandle class="p-1.5" />
|
|
|
|
|
|
|
+ <Resizable.Handle
|
|
|
|
|
+ withHandle
|
|
|
|
|
+ class="p-1.5"
|
|
|
|
|
+ ondblclick={() => {
|
|
|
|
|
+ requestPane.resize(50);
|
|
|
|
|
+ responsePane.resize(50);
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<!-- RESPONSE -->
|
|
<!-- RESPONSE -->
|
|
|
|
|
|
|
|
- <Resizable.Pane defaultSize={0}>
|
|
|
|
|
|
|
+ <Resizable.Pane defaultSize={0} bind:this={responsePane}>
|
|
|
{#if isSending}
|
|
{#if isSending}
|
|
|
<div class="flex justify-center py-8">
|
|
<div class="flex justify-center py-8">
|
|
|
<Loader class="h-6 w-6 animate-spin text-muted-foreground" />
|
|
<Loader class="h-6 w-6 animate-spin text-muted-foreground" />
|