refactor: minor ui improvements

This commit is contained in:
liyasthomas
2021-12-15 23:06:35 +05:30
parent 78ed95bcaa
commit daffc3fe0e
31 changed files with 908 additions and 957 deletions

View File

@@ -14,7 +14,7 @@
class="flex flex-col text-secondaryLight p-4 items-center justify-center" class="flex flex-col text-secondaryLight p-4 items-center justify-center"
> >
<i class="opacity-75 pb-2 material-icons">manage_search</i> <i class="opacity-75 pb-2 material-icons">manage_search</i>
<span class="text-center my-2"> <span class="my-2 text-center">
{{ t("state.nothing_found") }} "{{ search }}" {{ t("state.nothing_found") }} "{{ search }}"
</span> </span>
</div> </div>

View File

@@ -17,22 +17,22 @@
class="bg-transparent flex flex-shrink-0 text-base text-secondaryDark p-6" class="bg-transparent flex flex-shrink-0 text-base text-secondaryDark p-6"
/> />
<div <div
class="flex pb-4 px-4 border-b text-tiny border-dividerLight justify-between text-secondaryLight whitespace-nowrap overflow-auto flex-shrink-0 hide-scrollbar" class="border-b border-dividerLight flex flex-shrink-0 text-tiny text-secondaryLight px-4 pb-4 justify-between whitespace-nowrap overflow-auto hide-scrollbar"
> >
<div class="flex items-center"> <div class="flex items-center">
<kbd class="shortcut-key"></kbd> <kbd class="shortcut-key"></kbd>
<kbd class="shortcut-key"></kbd> <kbd class="shortcut-key"></kbd>
<span class="truncate ml-2"> <span class="ml-2 truncate">
{{ t("action.to_navigate") }} {{ t("action.to_navigate") }}
</span> </span>
<kbd class="shortcut-key"></kbd> <kbd class="shortcut-key"></kbd>
<span class="truncate ml-2"> <span class="ml-2 truncate">
{{ t("action.to_select") }} {{ t("action.to_select") }}
</span> </span>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<kbd class="shortcut-key">ESC</kbd> <kbd class="shortcut-key">ESC</kbd>
<span class="truncate ml-2"> <span class="ml-2 truncate">
{{ t("action.to_close") }} {{ t("action.to_close") }}
</span> </span>
</div> </div>

View File

@@ -1,14 +0,0 @@
<template>
<section :id="label.toLowerCase()" class="flex flex-col flex-1 relative">
<slot></slot>
</section>
</template>
<script setup lang="ts">
defineProps({
label: {
type: String,
default: "Section",
},
})
</script>

View File

@@ -1,29 +1,24 @@
<template> <template>
<AppSlideOver :show="show" @close="close()"> <AppSlideOver :show="show" @close="close()">
<template #content> <template #content>
<div class="bg-primary flex flex-col top-0 z-10 sticky">
<div <div
class="bg-primary border-b border-dividerLight flex p-2 top-0 z-10 sticky items-center justify-between" class="border-b border-dividerLight flex p-2 items-center justify-between"
> >
<h3 class="ml-4 heading">{{ t("app.shortcuts") }}</h3> <h3 class="ml-4 heading">{{ t("app.shortcuts") }}</h3>
<div class="flex">
<ButtonSecondary svg="x" @click.native="close()" /> <ButtonSecondary svg="x" @click.native="close()" />
</div> </div>
</div> <div class="border-b border-dividerLight flex flex-col py-4 px-6">
<div class="bg-primary border-b border-dividerLight">
<div class="flex flex-col my-4 mx-6">
<input <input
v-model="filterText" v-model="filterText"
type="search" type="search"
autocomplete="off" autocomplete="off"
class="bg-primaryLight border border-dividerLight rounded flex w-full py-2 px-4 focus-visible:border-divider" class="bg-primaryLight border border-dividerLight rounded flex py-2 px-4 focus-visible:border-divider"
:placeholder="`${t('action.search')}`" :placeholder="`${t('action.search')}`"
/> />
</div> </div>
</div> </div>
<div <div v-if="filterText" class="divide-dividerLight divide-y flex flex-col">
v-if="filterText"
class="divide-dividerLight divide-y flex flex-col flex-1 overflow-auto hide-scrollbar"
>
<div <div
v-for="(map, mapIndex) in searchResults" v-for="(map, mapIndex) in searchResults"
:key="`map-${mapIndex}`" :key="`map-${mapIndex}`"
@@ -43,15 +38,12 @@
class="flex flex-col text-secondaryLight p-4 items-center justify-center" class="flex flex-col text-secondaryLight p-4 items-center justify-center"
> >
<i class="opacity-75 pb-2 material-icons">manage_search</i> <i class="opacity-75 pb-2 material-icons">manage_search</i>
<span class="text-center my-2"> <span class="my-2 text-center">
{{ t("state.nothing_found") }} "{{ filterText }}" {{ t("state.nothing_found") }} "{{ filterText }}"
</span> </span>
</div> </div>
</div> </div>
<div <div v-else class="divide-dividerLight divide-y flex flex-col">
v-else
class="divide-dividerLight divide-y flex flex-col flex-1 overflow-auto hide-scrollbar"
>
<div <div
v-for="(map, mapIndex) in mappings" v-for="(map, mapIndex) in mappings"
:key="`map-${mapIndex}`" :key="`map-${mapIndex}`"

View File

@@ -10,7 +10,7 @@
</div> </div>
</transition> </transition>
<aside <aside
class="bg-primary flex flex-col h-full max-w-full transform transition top-0 ease-in-out right-0 w-96 z-30 duration-300 fixed overflow-auto" class="bg-primary flex flex-col h-full max-w-full transform transition top-0 ease-in-out right-0 w-96 z-30 duration-300 fixed overflow-auto hide-scrollbar"
:class="show ? 'shadow-xl translate-x-0' : 'translate-x-full'" :class="show ? 'shadow-xl translate-x-0' : 'translate-x-full'"
> >
<slot name="content"></slot> <slot name="content"></slot>

View File

@@ -140,7 +140,7 @@
:src="`/images/states/${$colorMode.value}/pack.svg`" :src="`/images/states/${$colorMode.value}/pack.svg`"
loading="lazy" loading="lazy"
class="flex-col object-contain object-center h-16 mb-4 w-16 inline-flex" class="flex-col object-contain object-center h-16 mb-4 w-16 inline-flex"
:alt="$t('empty.collection')" :alt="`${$t('empty.collection')}`"
/> />
<span class="text-center"> <span class="text-center">
{{ $t("empty.collection") }} {{ $t("empty.collection") }}

View File

@@ -1,8 +1,5 @@
<template> <template>
<AppSection <div :class="{ 'rounded border border-divider': savingMode }">
label="collections"
:class="{ 'rounded border border-divider': savingMode }"
>
<div <div
class="divide-dividerLight divide-y border-b border-dividerLight flex flex-col top-0 z-10 sticky" class="divide-dividerLight divide-y border-b border-dividerLight flex flex-col top-0 z-10 sticky"
:class="{ 'bg-primary': !savingMode }" :class="{ 'bg-primary': !savingMode }"
@@ -13,7 +10,7 @@
type="search" type="search"
autocomplete="off" autocomplete="off"
:placeholder="$t('action.search')" :placeholder="$t('action.search')"
class="bg-transparent flex w-full py-2 px-4" class="bg-transparent flex py-2 px-4"
/> />
<div class="flex flex-1 justify-between"> <div class="flex flex-1 justify-between">
<ButtonSecondary <ButtonSecondary
@@ -84,7 +81,7 @@
class="flex flex-col text-secondaryLight p-4 items-center justify-center" class="flex flex-col text-secondaryLight p-4 items-center justify-center"
> >
<i class="opacity-75 pb-2 material-icons">manage_search</i> <i class="opacity-75 pb-2 material-icons">manage_search</i>
<span class="text-center my-2"> <span class="my-2 text-center">
{{ $t("state.nothing_found") }} "{{ filterText }}" {{ $t("state.nothing_found") }} "{{ filterText }}"
</span> </span>
</div> </div>
@@ -126,7 +123,7 @@
:show="showModalImportExport" :show="showModalImportExport"
@hide-modal="displayModalImportExport(false)" @hide-modal="displayModalImportExport(false)"
/> />
</AppSection> </div>
</template> </template>
<script> <script>

View File

@@ -1,19 +1,16 @@
<template> <template>
<AppSection <div :class="{ 'rounded border border-divider': saveRequest }">
label="collections"
:class="{ 'rounded border border-divider': saveRequest }"
>
<div <div
class="divide-dividerLight divide-y bg-primary border-b border-dividerLight rounded-t flex flex-col z-10 sticky" class="divide-dividerLight divide-y bg-primary border-b border-dividerLight rounded-t flex flex-col z-10 sticky"
: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="search-wrappe"> <div v-if="!saveRequest" class="flex flex-col">
<input <input
v-model="filterText" v-model="filterText"
type="search" type="search"
autocomplete="off" autocomplete="off"
:placeholder="$t('action.search')" :placeholder="$t('action.search')"
class="bg-transparent flex w-full py-2 pr-2 pl-4" class="bg-transparent py-2 pr-2 pl-4"
/> />
</div> </div>
<CollectionsChooseType <CollectionsChooseType
@@ -135,7 +132,7 @@
class="flex flex-col text-secondaryLight p-4 items-center justify-center" class="flex flex-col text-secondaryLight p-4 items-center justify-center"
> >
<i class="opacity-75 pb-2 material-icons">manage_search</i> <i class="opacity-75 pb-2 material-icons">manage_search</i>
<span class="text-center my-2"> <span class="my-2 text-center">
{{ $t("state.nothing_found") }} "{{ filterText }}" {{ $t("state.nothing_found") }} "{{ filterText }}"
</span> </span>
</div> </div>
@@ -181,7 +178,7 @@
@hide-modal="displayModalImportExport(false)" @hide-modal="displayModalImportExport(false)"
@update-team-collections="updateTeamCollections" @update-team-collections="updateTeamCollections"
/> />
</AppSection> </div>
</template> </template>
<script> <script>

View File

@@ -78,7 +78,7 @@
:src="`/images/states/${$colorMode.value}/blockchain.svg`" :src="`/images/states/${$colorMode.value}/blockchain.svg`"
loading="lazy" loading="lazy"
class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex" class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex"
:alt="$t('empty.environments')" :alt="`${$t('empty.environments')}`"
/> />
<span class="text-center pb-4"> <span class="text-center pb-4">
{{ $t("empty.environments") }} {{ $t("empty.environments") }}

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection :label="`${$t('environment.title')}`"> <div>
<div class="bg-primary rounded-t flex flex-col top-0 z-10 sticky"> <div class="bg-primary rounded-t flex flex-col top-0 z-10 sticky">
<tippy ref="options" interactive trigger="click" theme="popover" arrow> <tippy ref="options" interactive trigger="click" theme="popover" arrow>
<template #trigger> <template #trigger>
@@ -69,19 +69,6 @@
</div> </div>
</div> </div>
</div> </div>
<EnvironmentsAdd
:show="showModalAdd"
@hide-modal="displayModalAdd(false)"
/>
<EnvironmentsEdit
:show="showModalEdit"
:editing-environment-index="editingEnvironmentIndex"
@hide-modal="displayModalEdit(false)"
/>
<EnvironmentsImportExport
:show="showModalImportExport"
@hide-modal="displayModalImportExport(false)"
/>
<div class="flex flex-col"> <div class="flex flex-col">
<EnvironmentsEnvironment <EnvironmentsEnvironment
environment-index="Global" environment-index="Global"
@@ -117,7 +104,20 @@
@click.native="displayModalAdd(true)" @click.native="displayModalAdd(true)"
/> />
</div> </div>
</AppSection> <EnvironmentsAdd
:show="showModalAdd"
@hide-modal="displayModalAdd(false)"
/>
<EnvironmentsEdit
:show="showModalEdit"
:editing-environment-index="editingEnvironmentIndex"
@hide-modal="displayModalEdit(false)"
/>
<EnvironmentsImportExport
:show="showModalImportExport"
@hide-modal="displayModalImportExport(false)"
/>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@@ -7,7 +7,6 @@
:selected="true" :selected="true"
:indicator="gqlQueryString.length > 0" :indicator="gqlQueryString.length > 0"
> >
<AppSection label="query">
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between gqlRunQuery" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between gqlRunQuery"
> >
@@ -56,7 +55,6 @@
</div> </div>
</div> </div>
<div ref="queryEditor"></div> <div ref="queryEditor"></div>
</AppSection>
</SmartTab> </SmartTab>
<SmartTab <SmartTab
@@ -64,7 +62,6 @@
:label="`${t('tab.variables')}`" :label="`${t('tab.variables')}`"
:indicator="variableString.length > 0" :indicator="variableString.length > 0"
> >
<AppSection label="variables">
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -85,6 +82,13 @@
svg="trash-2" svg="trash-2"
@click.native="clearGQLVariables()" @click.native="clearGQLVariables()"
/> />
<ButtonSecondary
ref="prettifyRequest"
v-tippy="{ theme: 'tooltip' }"
:title="t('action.prettify')"
:svg="prettifyVariablesIcon"
@click.native="prettifyVariableString"
/>
<ButtonSecondary <ButtonSecondary
v-tippy="{ theme: 'tooltip' }" v-tippy="{ theme: 'tooltip' }"
:title="t('action.copy')" :title="t('action.copy')"
@@ -94,7 +98,6 @@
</div> </div>
</div> </div>
<div ref="variableEditor"></div> <div ref="variableEditor"></div>
</AppSection>
</SmartTab> </SmartTab>
<SmartTab <SmartTab
@@ -102,7 +105,6 @@
:label="`${t('tab.headers')}`" :label="`${t('tab.headers')}`"
:info="activeGQLHeadersCount === 0 ? null : `${activeGQLHeadersCount}`" :info="activeGQLHeadersCount === 0 ? null : `${activeGQLHeadersCount}`"
> >
<AppSection label="headers">
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -242,10 +244,8 @@
/> />
</div> </div>
</div> </div>
</AppSection>
</SmartTab> </SmartTab>
</SmartTabs> </SmartTabs>
<CollectionsSaveRequest <CollectionsSaveRequest
mode="graphql" mode="graphql"
:show="showSaveRequestModal" :show="showSaveRequestModal"
@@ -379,8 +379,9 @@ useCodemirror(queryEditor, gqlQueryString, {
}) })
const copyQueryIcon = ref("copy") const copyQueryIcon = ref("copy")
const prettifyQueryIcon = ref("wand")
const copyVariablesIcon = ref("copy") const copyVariablesIcon = ref("copy")
const prettifyQueryIcon = ref("wand")
const prettifyVariablesIcon = ref("wand")
const showSaveRequestModal = ref(false) const showSaveRequestModal = ref(false)
@@ -511,6 +512,19 @@ const copyVariables = () => {
setTimeout(() => (copyVariablesIcon.value = "copy"), 1000) setTimeout(() => (copyVariablesIcon.value = "copy"), 1000)
} }
const prettifyVariableString = () => {
try {
const jsonObj = JSON.parse(variableString.value)
variableString.value = JSON.stringify(jsonObj, null, 2)
prettifyVariablesIcon.value = "check"
} catch (e) {
console.error(e)
prettifyVariablesIcon.value = "info"
toast.error(`${t("error.json_prettify_invalid_body")}`)
}
setTimeout(() => (prettifyVariablesIcon.value = "wand"), 1000)
}
const addRequestHeader = () => { const addRequestHeader = () => {
const empty = { key: "", value: "", active: true } const empty = { key: "", value: "", active: true }
const index = headers.value.length const index = headers.value.length

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection ref="response" label="response"> <div>
<div <div
v-if="responseString === 'loading'" v-if="responseString === 'loading'"
class="flex flex-col p-4 items-center justify-center" class="flex flex-col p-4 items-center justify-center"
@@ -71,7 +71,7 @@
reverse reverse
/> />
</div> </div>
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -26,7 +26,6 @@
icon="book-open" icon="book-open"
:label="`${t('tab.documentation')}`" :label="`${t('tab.documentation')}`"
> >
<AppSection label="docs">
<div <div
v-if=" v-if="
queryFields.length === 0 && queryFields.length === 0 &&
@@ -133,11 +132,9 @@
</div> </div>
</SmartTabs> </SmartTabs>
</div> </div>
</AppSection>
</SmartTab> </SmartTab>
<SmartTab :id="'schema'" icon="box" :label="`${t('tab.schema')}`"> <SmartTab :id="'schema'" icon="box" :label="`${t('tab.schema')}`">
<AppSection ref="schema" label="schema">
<div <div
v-if="schemaString" v-if="schemaString"
class="bg-primary border-b border-dividerLight flex flex-1 pl-4 top-0 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 pl-4 top-0 z-10 sticky items-center justify-between"
@@ -191,7 +188,6 @@
{{ t("empty.schema") }} {{ t("empty.schema") }}
</span> </span>
</div> </div>
</AppSection>
</SmartTab> </SmartTab>
</SmartTabs> </SmartTabs>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection label="history"> <div>
<div class="bg-primary border-b border-dividerLight flex top-0 z-10 sticky"> <div class="bg-primary border-b border-dividerLight flex top-0 z-10 sticky">
<input <input
v-model="filterText" v-model="filterText"
@@ -52,7 +52,7 @@
class="flex flex-col text-secondaryLight p-4 items-center justify-center" class="flex flex-col text-secondaryLight p-4 items-center justify-center"
> >
<i class="opacity-75 pb-2 material-icons">manage_search</i> <i class="opacity-75 pb-2 material-icons">manage_search</i>
<span class="text-center my-2"> <span class="my-2 text-center">
{{ $t("state.nothing_found") }} "{{ filterText }}" {{ $t("state.nothing_found") }} "{{ filterText }}"
</span> </span>
</div> </div>
@@ -64,7 +64,7 @@
:src="`/images/states/${$colorMode.value}/history.svg`" :src="`/images/states/${$colorMode.value}/history.svg`"
loading="lazy" loading="lazy"
class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex" class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex"
:alt="$t('empty.history')" :alt="`${$t('empty.history')}`"
/> />
<span class="text-center mb-4"> <span class="text-center mb-4">
{{ $t("empty.history") }} {{ $t("empty.history") }}
@@ -76,7 +76,7 @@
@hide-modal="confirmRemove = false" @hide-modal="confirmRemove = false"
@resolve="clearHistory" @resolve="clearHistory"
/> />
</AppSection> </div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@@ -109,7 +109,7 @@
:src="`/images/states/${$colorMode.value}/login.svg`" :src="`/images/states/${$colorMode.value}/login.svg`"
loading="lazy" loading="lazy"
class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex" class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex"
:alt="$t('empty.authorization')" :alt="`${$t('empty.authorization')}`"
/> />
<span class="text-center pb-4"> <span class="text-center pb-4">
{{ $t("empty.authorization") }} {{ $t("empty.authorization") }}

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection label="bodyParameters"> <div>
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperTertiaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperTertiaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -147,7 +147,7 @@
:src="`/images/states/${$colorMode.value}/upload_single_file.svg`" :src="`/images/states/${$colorMode.value}/upload_single_file.svg`"
loading="lazy" loading="lazy"
class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex" class="flex-col object-contain object-center h-16 my-4 w-16 inline-flex"
:alt="$t('empty.body')" :alt="`${$t('empty.body')}`"
/> />
<span class="text-center pb-4"> <span class="text-center pb-4">
{{ $t("empty.body") }} {{ $t("empty.body") }}
@@ -160,7 +160,7 @@
@click.native="addBodyParam" @click.native="addBodyParam"
/> />
</div> </div>
</AppSection> </div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection label="headers"> <div>
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -145,7 +145,7 @@
/> />
</div> </div>
</div> </div>
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection label="parameters"> <div>
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -138,7 +138,7 @@
/> />
</div> </div>
</div> </div>
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection id="script" :label="`${t('preRequest.script')}`"> <div>
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -58,7 +58,7 @@
</div> </div>
</div> </div>
</div> </div>
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -117,10 +117,11 @@ const prettifyRequestBody = () => {
const jsonObj = JSON.parse(rawParamsBody.value) const jsonObj = JSON.parse(rawParamsBody.value)
rawParamsBody.value = JSON.stringify(jsonObj, null, 2) rawParamsBody.value = JSON.stringify(jsonObj, null, 2)
prettifyIcon.value = "check" prettifyIcon.value = "check"
setTimeout(() => (prettifyIcon.value = "wand"), 1000)
} catch (e) { } catch (e) {
console.error(e) console.error(e)
prettifyIcon.value = "info"
toast.error(`${t("error.json_prettify_invalid_body")}`) toast.error(`${t("error.json_prettify_invalid_body")}`)
} }
setTimeout(() => (prettifyIcon.value = "wand"), 1000)
} }
</script> </script>

View File

@@ -1,11 +1,11 @@
<template> <template>
<AppSection label="response"> <div>
<HttpResponseMeta :response="response" /> <HttpResponseMeta :response="response" />
<LensesResponseBodyRenderer <LensesResponseBodyRenderer
v-if="!loading && hasResponse" v-if="!loading && hasResponse"
:response="response" :response="response"
/> />
</AppSection> </div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection :label="`${t('test.results')}`"> <div>
<div <div
v-if=" v-if="
testResults && testResults &&
@@ -88,7 +88,7 @@
class="my-4" class="my-4"
/> />
</div> </div>
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection id="script" :label="`${t('test.script')}`"> <div>
<div <div
class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between" class="bg-primary border-b border-dividerLight flex flex-1 top-upperSecondaryStickyFold pl-4 z-10 sticky items-center justify-between"
> >
@@ -58,7 +58,7 @@
</div> </div>
</div> </div>
</div> </div>
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -13,10 +13,7 @@
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="request"> <div class="bg-primary flex flex-col space-y-4 p-4 top-0 z-10 sticky">
<div
class="bg-primary flex flex-col space-y-4 p-4 top-0 z-10 sticky"
>
<div class="space-x-2 flex-1 inline-flex"> <div class="space-x-2 flex-1 inline-flex">
<input <input
id="mqtt-url" id="mqtt-url"
@@ -61,15 +58,12 @@
/> />
</div> </div>
</div> </div>
</AppSection>
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="response">
<RealtimeLog :title="$t('mqtt.log')" :log="log" /> <RealtimeLog :title="$t('mqtt.log')" :log="log" />
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</Pane> </Pane>
@@ -79,7 +73,6 @@
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="messages">
<div class="flex flex-col flex-1 p-4 inline-flex"> <div class="flex flex-col flex-1 p-4 inline-flex">
<label for="pub_topic" class="font-semibold text-secondaryLight"> <label for="pub_topic" class="font-semibold text-secondaryLight">
{{ $t("mqtt.topic") }} {{ $t("mqtt.topic") }}
@@ -147,7 +140,6 @@
@click.native="toggleSubscription" @click.native="toggleSubscription"
/> />
</div> </div>
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</template> </template>

View File

@@ -13,7 +13,6 @@
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="request">
<div class="bg-primary flex p-4 top-0 z-10 sticky"> <div class="bg-primary flex p-4 top-0 z-10 sticky">
<div class="space-x-2 flex-1 inline-flex"> <div class="space-x-2 flex-1 inline-flex">
<div class="flex flex-1"> <div class="flex flex-1">
@@ -82,15 +81,12 @@
/> />
</div> </div>
</div> </div>
</AppSection>
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="response">
<RealtimeLog :title="$t('socketio.log')" :log="log" /> <RealtimeLog :title="$t('socketio.log')" :log="log" />
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</Pane> </Pane>
@@ -100,7 +96,6 @@
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="messages">
<div class="flex flex-col flex-1 p-4 inline-flex"> <div class="flex flex-col flex-1 p-4 inline-flex">
<label for="events" class="font-semibold text-secondaryLight"> <label for="events" class="font-semibold text-secondaryLight">
{{ $t("socketio.events") }} {{ $t("socketio.events") }}
@@ -167,7 +162,6 @@
</div> </div>
</div> </div>
</div> </div>
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</template> </template>

View File

@@ -45,14 +45,7 @@
</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">
<AppSection label="response">
<ul>
<li>
<RealtimeLog :title="$t('sse.log')" :log="log" /> <RealtimeLog :title="$t('sse.log')" :log="log" />
<div id="result"></div>
</li>
</ul>
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</template> </template>

View File

@@ -13,7 +13,6 @@
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="request">
<div class="bg-primary flex p-4 top-0 z-10 sticky"> <div class="bg-primary flex p-4 top-0 z-10 sticky">
<div class="space-x-2 flex-1 inline-flex"> <div class="space-x-2 flex-1 inline-flex">
<input <input
@@ -133,15 +132,12 @@
{{ $t("empty.protocols") }} {{ $t("empty.protocols") }}
</span> </span>
</div> </div>
</AppSection>
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="response">
<RealtimeLog :title="$t('websocket.log')" :log="log" /> <RealtimeLog :title="$t('websocket.log')" :log="log" />
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</Pane> </Pane>
@@ -151,7 +147,6 @@
min-size="20" min-size="20"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="messages">
<div class="flex flex-col flex-1 p-4 inline-flex"> <div class="flex flex-col flex-1 p-4 inline-flex">
<label <label
for="websocket-message" for="websocket-message"
@@ -182,7 +177,6 @@
@click.native="sendMessage" @click.native="sendMessage"
/> />
</div> </div>
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<AppSection label="teams"> <div>
<div class="space-y-4 p-4"> <div class="space-y-4 p-4">
<ButtonSecondary <ButtonSecondary
:label="`${t('team.create_new')}`" :label="`${t('team.create_new')}`"
@@ -88,7 +88,7 @@
:editing-team-i-d="editingTeamID" :editing-team-i-d="editingTeamID"
@hide-modal="displayModalInvite(false)" @hide-modal="displayModalInvite(false)"
/> />
</AppSection> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@@ -31,6 +31,7 @@ import { lintKeymap } from "@codemirror/lint"
export const baseTheme = EditorView.theme({ export const baseTheme = EditorView.theme({
"&": { "&": {
fontSize: "var(--font-size-body)", fontSize: "var(--font-size-body)",
height: "100%",
}, },
".cm-content": { ".cm-content": {
caretColor: "var(--secondary-light-color)", caretColor: "var(--secondary-light-color)",

View File

@@ -13,7 +13,6 @@
:size="COLUMN_LAYOUT ? 45 : 50" :size="COLUMN_LAYOUT ? 45 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="import">
<div class="flex p-4 items-start justify-between"> <div class="flex p-4 items-start justify-between">
<label> <label>
{{ $t("documentation.generate_message") }} {{ $t("documentation.generate_message") }}
@@ -66,13 +65,11 @@
@click.native="getDoc" @click.native="getDoc"
/> />
</div> </div>
</AppSection>
</Pane> </Pane>
<Pane <Pane
:size="COLUMN_LAYOUT ? 65 : 50" :size="COLUMN_LAYOUT ? 65 : 50"
class="hide-scrollbar !overflow-auto" class="hide-scrollbar !overflow-auto"
> >
<AppSection label="documentation">
<div class="flex flex-col"> <div class="flex flex-col">
<div <div
v-if="items.length === 0" v-if="items.length === 0"
@@ -117,7 +114,6 @@
<DocsCollection :collection="collection" /> <DocsCollection :collection="collection" />
</div> </div>
</div> </div>
</AppSection>
</Pane> </Pane>
</Splitpanes> </Splitpanes>
</Pane> </Pane>

View File

@@ -173,9 +173,7 @@
</section> </section>
</SmartTab> </SmartTab>
<SmartTab :id="'teams'" :label="t('team.title')"> <SmartTab :id="'teams'" :label="t('team.title')">
<AppSection label="teams">
<Teams :modal="false" /> <Teams :modal="false" />
</AppSection>
</SmartTab> </SmartTab>
</SmartTabs> </SmartTabs>
</div> </div>