|
@@ -49,49 +49,49 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<Tabs.Root value="body" class="min-h-0">
|
|
<Tabs.Root value="body" class="min-h-0">
|
|
|
- <header class="flex items-center w-full px-2 py-2 gap-4">
|
|
|
|
|
- <Badge variant="outline" class={`rounded-sm ${borderColor}`}>
|
|
|
|
|
|
|
+ <header class="flex items-center w-full py-2 gap-4 border-b">
|
|
|
|
|
+ <Badge variant="outline" class={`h-4 rounded-sm ${borderColor}`}>
|
|
|
<Dot strokeWidth={5} color={dotColor} />
|
|
<Dot strokeWidth={5} color={dotColor} />
|
|
|
{response.status}
|
|
{response.status}
|
|
|
</Badge>
|
|
</Badge>
|
|
|
|
|
|
|
|
- <Tabs.List>
|
|
|
|
|
|
|
+ <Tabs.List class="h-6">
|
|
|
<Tabs.Trigger class="text-xs" value="body">Body</Tabs.Trigger>
|
|
<Tabs.Trigger class="text-xs" value="body">Body</Tabs.Trigger>
|
|
|
<Tabs.Trigger class="text-xs" value="headers">Headers</Tabs.Trigger>
|
|
<Tabs.Trigger class="text-xs" value="headers">Headers</Tabs.Trigger>
|
|
|
</Tabs.List>
|
|
</Tabs.List>
|
|
|
|
|
|
|
|
- <Tabs.Content value="body">
|
|
|
|
|
- <div class="justify-center relative">
|
|
|
|
|
|
|
+ <Tabs.Content value="body" class="flex items-center">
|
|
|
|
|
+ <div class="flex items-center gap-1">
|
|
|
<Button
|
|
<Button
|
|
|
|
|
+ class="h-6 p-1"
|
|
|
variant={wrap ? "default" : "outline"}
|
|
variant={wrap ? "default" : "outline"}
|
|
|
onclick={handleToggleWrap}
|
|
onclick={handleToggleWrap}
|
|
|
- size="icon-sm"><TextWrap /></Button
|
|
|
|
|
|
|
+ size="icon-sm"
|
|
|
>
|
|
>
|
|
|
|
|
+ <TextWrap />
|
|
|
|
|
+ </Button>
|
|
|
<Button
|
|
<Button
|
|
|
|
|
+ class="h-6 p-1"
|
|
|
onclick={() => copyContent(view)}
|
|
onclick={() => copyContent(view)}
|
|
|
variant="outline"
|
|
variant="outline"
|
|
|
- size="icon-sm"><Clipboard /></Button
|
|
|
|
|
|
|
+ size="icon-sm"
|
|
|
>
|
|
>
|
|
|
|
|
+ <Clipboard />
|
|
|
|
|
+ </Button>
|
|
|
</div>
|
|
</div>
|
|
|
</Tabs.Content>
|
|
</Tabs.Content>
|
|
|
</header>
|
|
</header>
|
|
|
|
|
|
|
|
- <Tabs.Content
|
|
|
|
|
- value="body"
|
|
|
|
|
- class="pb-5 flex flex-col w-full max-h-11/12 overflow-scroll"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Tabs.Content value="body" class="flex-1 min-h-0 overflow-auto">
|
|
|
{#if response.body != null}
|
|
{#if response.body != null}
|
|
|
<!-- EDITOR -->
|
|
<!-- EDITOR -->
|
|
|
|
|
|
|
|
- <div id="response-view" class="rounded-md"></div>
|
|
|
|
|
|
|
+ <div id="response-view"></div>
|
|
|
{/if}
|
|
{/if}
|
|
|
</Tabs.Content>
|
|
</Tabs.Content>
|
|
|
|
|
|
|
|
- <Tabs.Content
|
|
|
|
|
- value="headers"
|
|
|
|
|
- class="flex flex-col w-full max-h-10/12 overflow-scroll"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="grid grid-cols-2">
|
|
|
|
|
|
|
+ <Tabs.Content value="headers" class="flex-1 overflow-auto">
|
|
|
|
|
+ <div class="grid grid-cols-2" id="header-tab">
|
|
|
{#each response.headers as [name, value]}
|
|
{#each response.headers as [name, value]}
|
|
|
<p>{name}</p>
|
|
<p>{name}</p>
|
|
|
<p class="wrap-anywhere">{value}</p>
|
|
<p class="wrap-anywhere">{value}</p>
|
|
@@ -99,3 +99,45 @@
|
|
|
</div>
|
|
</div>
|
|
|
</Tabs.Content>
|
|
</Tabs.Content>
|
|
|
</Tabs.Root>
|
|
</Tabs.Root>
|
|
|
|
|
+
|
|
|
|
|
+<style>
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 8rem;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @media (min-height: 400px) {
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 7rem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @media (min-height: 600px) {
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 6rem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @media (min-height: 800px) {
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 5rem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @media (min-height: 900px) {
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 4rem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @media (min-height: 1000px) {
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 3rem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @media (min-height: 1200px) {
|
|
|
|
|
+ #header-tab {
|
|
|
|
|
+ padding-bottom: 2rem;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|