refactor: improve ui consistency

This commit is contained in:
liyasthomas
2022-02-02 15:28:59 +05:30
parent c0aab9ad41
commit 72172b8351
32 changed files with 150 additions and 102 deletions

View File

@@ -1,7 +1,7 @@
<template> <template>
<div :class="{ 'rounded border border-divider': saveRequest }"> <div :class="{ 'rounded border border-divider': saveRequest }">
<div <div
class="sticky z-10 flex flex-col border-b rounded-t divide-dividerLight divide-y bg-primary border-dividerLight" class="sticky z-10 flex flex-col border-b rounded-t divide-y divide-dividerLight bg-primary border-dividerLight"
:style="saveRequest ? 'top: calc(-1 * var(--font-size-body))' : 'top: 0'" :style="saveRequest ? 'top: calc(-1 * var(--font-size-body))' : 'top: 0'"
> >
<div v-if="!saveRequest" class="flex flex-col"> <div v-if="!saveRequest" class="flex flex-col">
@@ -63,7 +63,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="flex flex-col"> <div class="flex flex-col flex-1">
<component <component
:is=" :is="
collectionsType.type == 'my-collections' collectionsType.type == 'my-collections'

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="sticky top-0 z-10 flex p-4 bg-primary"> <div
class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
>
<div class="inline-flex flex-1 space-x-2"> <div class="inline-flex flex-1 space-x-2">
<input <input
id="url" id="url"

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col flex-1 h-full">
<SmartTabs styles="sticky bg-primary top-upperPrimaryStickyFold z-10"> <SmartTabs styles="sticky bg-primary top-upperPrimaryStickyFold z-10">
<SmartTab <SmartTab
:id="'query'" :id="'query'"
@@ -8,7 +8,7 @@
:indicator="gqlQueryString && gqlQueryString.length > 0 ? true : false" :indicator="gqlQueryString && gqlQueryString.length > 0 ? true : false"
> >
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold gqlRunQuery" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold gqlRunQuery"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("request.query") }} {{ t("request.query") }}
@@ -62,7 +62,7 @@
/> />
</div> </div>
</div> </div>
<div ref="queryEditor"></div> <div ref="queryEditor" class="flex flex-col flex-1"></div>
</SmartTab> </SmartTab>
<SmartTab <SmartTab
@@ -71,7 +71,7 @@
:indicator="variableString && variableString.length > 0 ? true : false" :indicator="variableString && variableString.length > 0 ? true : false"
> >
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("request.variables") }} {{ t("request.variables") }}
@@ -105,7 +105,7 @@
/> />
</div> </div>
</div> </div>
<div ref="variableEditor"></div> <div ref="variableEditor" class="flex flex-col flex-1"></div>
</SmartTab> </SmartTab>
<SmartTab <SmartTab
@@ -114,7 +114,7 @@
:info="activeGQLHeadersCount === 0 ? null : `${activeGQLHeadersCount}`" :info="activeGQLHeadersCount === 0 ? null : `${activeGQLHeadersCount}`"
> >
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("tab.headers") }} {{ t("tab.headers") }}
@@ -149,7 +149,11 @@
/> />
</div> </div>
</div> </div>
<div v-if="bulkMode" ref="bulkEditor"></div> <div
v-if="bulkMode"
ref="bulkEditor"
class="flex flex-col flex-1"
></div>
<div v-else> <div v-else>
<div <div
v-for="(header, index) in workingHeaders" v-for="(header, index) in workingHeaders"

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col flex-1 h-full">
<div <div
v-if="responseString === 'loading'" v-if="responseString === 'loading'"
class="flex flex-col items-center justify-center p-4" class="flex flex-col items-center justify-center p-4"
@@ -7,9 +7,9 @@
<SmartSpinner class="my-4" /> <SmartSpinner class="my-4" />
<span class="text-secondaryLight">{{ t("state.loading") }}</span> <span class="text-secondaryLight">{{ t("state.loading") }}</span>
</div> </div>
<div v-else-if="responseString"> <div v-else-if="responseString" class="flex flex-col flex-1">
<div <div
class="sticky top-0 z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight" class="sticky top-0 z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("response.title") }} {{ t("response.title") }}
@@ -38,7 +38,7 @@
/> />
</div> </div>
</div> </div>
<div ref="schemaEditor"></div> <div ref="schemaEditor" class="flex flex-col flex-1"></div>
</div> </div>
<div <div
v-else v-else

View File

@@ -137,7 +137,7 @@
<SmartTab :id="'schema'" icon="box" :label="`${t('tab.schema')}`"> <SmartTab :id="'schema'" icon="box" :label="`${t('tab.schema')}`">
<div <div
v-if="schemaString" v-if="schemaString"
class="sticky top-0 z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight" class="sticky top-0 z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("graphql.schema") }} {{ t("graphql.schema") }}
@@ -173,7 +173,11 @@
/> />
</div> </div>
</div> </div>
<div v-if="schemaString" ref="schemaEditor"></div> <div
v-if="schemaString"
ref="schemaEditor"
class="flex flex-col flex-1"
></div>
<div <div
v-else v-else
class="flex flex-col items-center justify-center p-4 text-secondaryLight" class="flex flex-col items-center justify-center p-4 text-secondaryLight"

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<span class="flex items-center"> <span class="flex items-center">
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<span class="flex items-center"> <span class="flex items-center">
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperTertiaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperTertiaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ $t("request.body") }} {{ $t("request.body") }}
@@ -135,7 +135,7 @@
</span> </span>
</div> </div>
<div <div
v-if="bodyParams.length === 0" v-if="workingParams.length === 0"
class="flex flex-col items-center justify-center p-4 text-secondaryLight" class="flex flex-col items-center justify-center p-4 text-secondaryLight"
> >
<img <img

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("request.header_list") }} {{ t("request.header_list") }}
@@ -36,7 +36,7 @@
/> />
</div> </div>
</div> </div>
<div v-if="bulkMode" ref="bulkEditor"></div> <div v-if="bulkMode" ref="bulkEditor" class="flex flex-col flex-1"></div>
<div v-else> <div v-else>
<div <div
v-for="(header, index) in workingHeaders" v-for="(header, index) in workingHeaders"

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("request.parameter_list") }} {{ t("request.parameter_list") }}
@@ -36,7 +36,7 @@
/> />
</div> </div>
</div> </div>
<div v-if="bulkMode" ref="bulkEditor"></div> <div v-if="bulkMode" ref="bulkEditor" class="flex flex-col flex-1"></div>
<div v-else> <div v-else>
<div <div
v-for="(param, index) in workingParams" v-for="(param, index) in workingParams"

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("preRequest.javascript_code") }} {{ t("preRequest.javascript_code") }}

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperTertiaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperTertiaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("request.raw_body") }} {{ t("request.raw_body") }}
@@ -52,21 +52,15 @@
/> />
</div> </div>
</div> </div>
<div ref="rawBodyParameters"></div> <div ref="rawBodyParameters" class="flex flex-col flex-1"></div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { import { computed, reactive, Ref, ref } from "@nuxtjs/composition-api"
computed,
reactive,
Ref,
ref,
watchEffect,
} from "@nuxtjs/composition-api"
import * as TO from "fp-ts/TaskOption" import * as TO from "fp-ts/TaskOption"
import { pipe } from "fp-ts/function" import { pipe } from "fp-ts/function"
import { HoppRESTReqBody, ValidContentTypes } from "~/../hoppscotch-data/dist" import { HoppRESTReqBody, ValidContentTypes } from "@hoppscotch/data"
import { useCodemirror } from "~/helpers/editor/codemirror" import { useCodemirror } from "~/helpers/editor/codemirror"
import { getEditorLangForMimeType } from "~/helpers/editorutils" import { getEditorLangForMimeType } from "~/helpers/editorutils"
import { pluckRef, useI18n, useToast } from "~/helpers/utils/composables" import { pluckRef, useI18n, useToast } from "~/helpers/utils/composables"
@@ -106,8 +100,6 @@ const langLinter = computed(() =>
isJSONContentType(props.contentType) ? jsonLinter : null isJSONContentType(props.contentType) ? jsonLinter : null
) )
watchEffect(() => console.log(rawInputEditorLang.value))
const linewrapEnabled = ref(true) const linewrapEnabled = ref(true)
const rawBodyParameters = ref<any | null>(null) const rawBodyParameters = ref<any | null>(null)

View File

@@ -1,6 +1,6 @@
<template> <template>
<div <div
class="sticky top-0 z-10 flex p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar" class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
> >
<div class="flex flex-1"> <div class="flex flex-1">
<div class="relative flex"> <div class="relative flex">

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperSecondaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("test.javascript_code") }} {{ t("test.javascript_code") }}

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperTertiaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperTertiaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ t("request.body") }} {{ t("request.body") }}
@@ -36,7 +36,7 @@
/> />
</div> </div>
</div> </div>
<div v-if="bulkMode" ref="bulkEditor"></div> <div v-if="bulkMode" ref="bulkEditor" class="flex flex-col flex-1"></div>
<div v-else> <div v-else>
<div <div
v-for="(param, index) in workingUrlEncodedParams" v-for="(param, index) in workingUrlEncodedParams"

View File

@@ -6,7 +6,7 @@
:key="`lens-${index}`" :key="`lens-${index}`"
:label="$t(lens.lensName)" :label="$t(lens.lensName)"
:selected="index === 0" :selected="index === 0"
class="flex flex-col flex-1" class="flex flex-col flex-1 w-full h-full"
> >
<component :is="lens.renderer" :response="response" /> <component :is="lens.renderer" :response="response" />
</SmartTab> </SmartTab>

View File

@@ -42,7 +42,11 @@
/> />
</div> </div>
</div> </div>
<div v-show="!previewEnabled" ref="htmlResponse"></div> <div
v-show="!previewEnabled"
ref="htmlResponse"
class="flex flex-col flex-1"
></div>
<iframe <iframe
v-show="previewEnabled" v-show="previewEnabled"
ref="previewFrame" ref="previewFrame"

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold"
> >
@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<img <img
class="flex flex-1 max-w-full border-b border-dividerLight" class="flex flex-col flex-1 max-w-full border-b border-dividerLight"
:src="imageSource" :src="imageSource"
loading="lazy" loading="lazy"
:alt="imageSource" :alt="imageSource"

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold"
> >
@@ -33,10 +33,10 @@
/> />
</div> </div>
</div> </div>
<div ref="jsonResponse"></div> <div ref="jsonResponse" class="flex flex-col flex-1"></div>
<div <div
v-if="outlinePath" v-if="outlinePath"
class="sticky bottom-0 z-10 flex flex-1 px-2 overflow-auto border-t bg-primaryLight border-dividerLight flex-nowrap hide-scrollbar" class="sticky bottom-0 z-10 flex px-2 overflow-auto border-t bg-primaryLight border-dividerLight flex-nowrap hide-scrollbar"
> >
<div <div
v-for="(item, index) in outlinePath" v-for="(item, index) in outlinePath"

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold"
> >
@@ -33,7 +33,7 @@
/> />
</div> </div>
</div> </div>
<div ref="rawResponse"></div> <div ref="rawResponse" class="flex flex-col flex-1"></div>
</div> </div>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div class="flex flex-col flex-1">
<div <div
class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-lowerSecondaryStickyFold"
> >
@@ -33,7 +33,7 @@
/> />
</div> </div>
</div> </div>
<div ref="xmlResponse"></div> <div ref="xmlResponse" class="flex flex-col flex-1"></div>
</div> </div>
</template> </template>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="flex flex-col"> <div class="flex flex-col flex-1">
<div <div
class="sticky top-0 z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight" class="sticky top-0 z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight"
> >
<label for="log" class="py-2 font-semibold text-secondaryLight"> <label for="log" class="py-2 font-semibold text-secondaryLight">
{{ title }} {{ title }}
@@ -13,6 +13,7 @@
v-for="(entry, index) in log" v-for="(entry, index) in log"
:key="`entry-${index}`" :key="`entry-${index}`"
:style="{ color: entry.color }" :style="{ color: entry.color }"
class="font-mono"
>{{ entry.ts }}{{ source(entry.source) }}{{ entry.payload }}</span >{{ entry.ts }}{{ source(entry.source) }}{{ entry.payload }}</span
> >
</span> </span>

View File

@@ -7,13 +7,19 @@
}" }"
:horizontal="!mdAndLarger" :horizontal="!mdAndLarger"
> >
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> <Pane
size="75"
min-size="65"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane <Pane
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="sticky top-0 z-10 flex flex-col p-4 space-y-4 bg-primary"> <div
class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
>
<div class="inline-flex flex-1 space-x-2"> <div class="inline-flex flex-1 space-x-2">
<input <input
id="mqtt-url" id="mqtt-url"
@@ -61,7 +67,7 @@
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<RealtimeLog :title="$t('mqtt.log')" :log="log" /> <RealtimeLog :title="$t('mqtt.log')" :log="log" />
</Pane> </Pane>
@@ -71,9 +77,9 @@
v-if="SIDEBAR" v-if="SIDEBAR"
size="25" size="25"
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="flex flex-col flex-1 p-4"> <div class="flex items-center justify-between p-4">
<label for="pub_topic" class="font-semibold text-secondaryLight"> <label for="pub_topic" class="font-semibold text-secondaryLight">
{{ $t("mqtt.topic") }} {{ $t("mqtt.topic") }}
</label> </label>
@@ -89,7 +95,7 @@
spellcheck="false" spellcheck="false"
/> />
</div> </div>
<div class="flex items-center justify-between flex-1 p-4"> <div class="flex items-center justify-between p-4">
<label for="mqtt-message" class="font-semibold text-secondaryLight"> <label for="mqtt-message" class="font-semibold text-secondaryLight">
{{ $t("mqtt.communication") }} {{ $t("mqtt.communication") }}
</label> </label>
@@ -112,7 +118,9 @@
@click.native="publish" @click.native="publish"
/> />
</div> </div>
<div class="flex flex-col flex-1 p-4 mt-4 border-t border-dividerLight"> <div
class="flex items-center justify-between p-4 mt-4 border-t border-dividerLight"
>
<label for="sub_topic" class="font-semibold text-secondaryLight"> <label for="sub_topic" class="font-semibold text-secondaryLight">
{{ $t("mqtt.topic") }} {{ $t("mqtt.topic") }}
</label> </label>

View File

@@ -7,13 +7,19 @@
}" }"
:horizontal="!mdAndLarger" :horizontal="!mdAndLarger"
> >
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> <Pane
size="75"
min-size="65"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane <Pane
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="sticky top-0 z-10 flex p-4 bg-primary"> <div
class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
>
<div class="inline-flex flex-1 space-x-2"> <div class="inline-flex flex-1 space-x-2">
<div class="flex flex-1"> <div class="flex flex-1">
<label for="client-version"> <label for="client-version">
@@ -82,7 +88,7 @@
</div> </div>
</div> </div>
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperPrimaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperPrimaryStickyFold"
> >
<span class="flex items-center"> <span class="flex items-center">
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
@@ -213,7 +219,7 @@
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<RealtimeLog :title="$t('socketio.log')" :log="log" /> <RealtimeLog :title="$t('socketio.log')" :log="log" />
</Pane> </Pane>
@@ -223,9 +229,9 @@
v-if="SIDEBAR" v-if="SIDEBAR"
size="25" size="25"
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="flex flex-col flex-1 p-4"> <div class="flex items-center justify-between p-4">
<label for="events" class="font-semibold text-secondaryLight"> <label for="events" class="font-semibold text-secondaryLight">
{{ $t("socketio.events") }} {{ $t("socketio.events") }}
</label> </label>
@@ -242,7 +248,7 @@
:disabled="!connectionState" :disabled="!connectionState"
/> />
</div> </div>
<div class="flex items-center justify-between flex-1 p-4"> <div class="flex items-center justify-between p-4">
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ $t("socketio.communication") }} {{ $t("socketio.communication") }}
</label> </label>

View File

@@ -1,7 +1,12 @@
<template> <template>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane :size="COLUMN_LAYOUT ? 45 : 50" class="hide-scrollbar !overflow-auto"> <Pane
<div class="sticky top-0 z-10 flex p-4 bg-primary"> :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<div
class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
>
<div class="inline-flex flex-1 space-x-2"> <div class="inline-flex flex-1 space-x-2">
<div class="flex flex-1"> <div class="flex flex-1">
<input <input
@@ -44,7 +49,10 @@
</div> </div>
</div> </div>
</Pane> </Pane>
<Pane :size="COLUMN_LAYOUT ? 65 : 50" class="hide-scrollbar !overflow-auto"> <Pane
:size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<RealtimeLog :title="$t('sse.log')" :log="log" /> <RealtimeLog :title="$t('sse.log')" :log="log" />
</Pane> </Pane>
</Splitpanes> </Splitpanes>

View File

@@ -7,13 +7,19 @@
}" }"
:horizontal="!mdAndLarger" :horizontal="!mdAndLarger"
> >
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> <Pane
size="75"
min-size="65"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane <Pane
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="sticky top-0 z-10 flex p-4 bg-primary"> <div
class="sticky top-0 z-10 flex flex-shrink-0 p-4 overflow-x-auto space-x-2 bg-primary hide-scrollbar"
>
<div class="inline-flex flex-1 space-x-2"> <div class="inline-flex flex-1 space-x-2">
<input <input
id="websocket-url" id="websocket-url"
@@ -43,7 +49,7 @@
</div> </div>
</div> </div>
<div <div
class="sticky z-10 flex items-center justify-between flex-1 pl-4 border-b bg-primary border-dividerLight top-upperPrimaryStickyFold" class="sticky z-10 flex items-center justify-between pl-4 border-b bg-primary border-dividerLight top-upperPrimaryStickyFold"
> >
<label class="font-semibold text-secondaryLight"> <label class="font-semibold text-secondaryLight">
{{ $t("websocket.protocols") }} {{ $t("websocket.protocols") }}
@@ -135,7 +141,7 @@
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<RealtimeLog :title="$t('websocket.log')" :log="log" /> <RealtimeLog :title="$t('websocket.log')" :log="log" />
</Pane> </Pane>
@@ -145,9 +151,9 @@
v-if="SIDEBAR" v-if="SIDEBAR"
size="25" size="25"
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="flex flex-col flex-1 p-4"> <div class="flex items-center justify-between p-4">
<label <label
for="websocket-message" for="websocket-message"
class="font-semibold text-secondaryLight" class="font-semibold text-secondaryLight"

View File

@@ -1,5 +1,5 @@
<template> <template>
<div v-show="active"> <div v-show="active" class="flex flex-col flex-1">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>

View File

@@ -32,6 +32,7 @@ export const baseTheme = EditorView.theme({
"&": { "&": {
fontSize: "var(--font-size-body)", fontSize: "var(--font-size-body)",
height: "100%", height: "100%",
width: "100%",
}, },
".cm-content": { ".cm-content": {
caretColor: "var(--secondary-light-color)", caretColor: "var(--secondary-light-color)",

View File

@@ -12,7 +12,7 @@
> >
<Pane <Pane
style="width: auto; height: auto" style="width: auto; height: auto"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<AppSidenav /> <AppSidenav />
</Pane> </Pane>

View File

@@ -7,11 +7,15 @@
}" }"
:horizontal="!mdAndLarger" :horizontal="!mdAndLarger"
> >
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> <Pane
size="75"
min-size="65"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane <Pane
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="flex items-start justify-between p-4"> <div class="flex items-start justify-between p-4">
<label> <label>
@@ -68,7 +72,7 @@
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<div class="flex flex-col"> <div class="flex flex-col">
<div <div
@@ -121,7 +125,7 @@
v-if="SIDEBAR" v-if="SIDEBAR"
size="25" size="25"
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<aside> <aside>
<Collections <Collections

View File

@@ -7,18 +7,22 @@
}" }"
:horizontal="!mdAndLarger" :horizontal="!mdAndLarger"
> >
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> <Pane
size="75"
min-size="65"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane <Pane
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<GraphqlRequest :conn="gqlConn" /> <GraphqlRequest :conn="gqlConn" />
<GraphqlRequestOptions :conn="gqlConn" /> <GraphqlRequestOptions :conn="gqlConn" />
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<GraphqlResponse :conn="gqlConn" /> <GraphqlResponse :conn="gqlConn" />
</Pane> </Pane>
@@ -28,7 +32,7 @@
v-if="SIDEBAR" v-if="SIDEBAR"
size="25" size="25"
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<GraphqlSidebar :conn="gqlConn" /> <GraphqlSidebar :conn="gqlConn" />
</Pane> </Pane>

View File

@@ -7,11 +7,15 @@
}" }"
:horizontal="!mdAndLarger" :horizontal="!mdAndLarger"
> >
<Pane size="75" min-size="65" class="hide-scrollbar !overflow-auto"> <Pane
size="75"
min-size="65"
class="hide-scrollbar !overflow-auto flex flex-col"
>
<Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT"> <Splitpanes class="smart-splitter" :horizontal="COLUMN_LAYOUT">
<Pane <Pane
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<HttpRequest /> <HttpRequest />
<SmartTabs styles="sticky bg-primary top-upperPrimaryStickyFold z-10"> <SmartTabs styles="sticky bg-primary top-upperPrimaryStickyFold z-10">
@@ -64,7 +68,7 @@
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="flex flex-col hide-scrollbar !overflow-auto" class="flex flex-col hide-scrollbar !overflow-auto flex flex-col"
> >
<HttpResponse ref="response" /> <HttpResponse ref="response" />
</Pane> </Pane>
@@ -74,7 +78,7 @@
v-if="SIDEBAR" v-if="SIDEBAR"
size="25" size="25"
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto flex flex-col"
> >
<SmartTabs styles="sticky bg-primary z-10 top-0" vertical> <SmartTabs styles="sticky bg-primary z-10 top-0" vertical>
<SmartTab <SmartTab