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

@@ -109,7 +109,7 @@
:src="`/images/states/${$colorMode.value}/login.svg`"
loading="lazy"
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">
{{ $t("empty.authorization") }}

View File

@@ -1,5 +1,5 @@
<template>
<AppSection label="bodyParameters">
<div>
<div
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`"
loading="lazy"
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">
{{ $t("empty.body") }}
@@ -160,7 +160,7 @@
@click.native="addBodyParam"
/>
</div>
</AppSection>
</div>
</template>
<script lang="ts">

View File

@@ -1,5 +1,5 @@
<template>
<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"
>
@@ -145,7 +145,7 @@
/>
</div>
</div>
</AppSection>
</div>
</template>
<script setup lang="ts">

View File

@@ -1,5 +1,5 @@
<template>
<AppSection label="parameters">
<div>
<div
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>
</AppSection>
</div>
</template>
<script setup lang="ts">

View File

@@ -1,5 +1,5 @@
<template>
<AppSection id="script" :label="`${t('preRequest.script')}`">
<div>
<div
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>
</AppSection>
</div>
</template>
<script setup lang="ts">

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
<template>
<AppSection id="script" :label="`${t('test.script')}`">
<div>
<div
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>
</AppSection>
</div>
</template>
<script setup lang="ts">