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>
<div>
<div class="flex flex-col flex-1">
<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">
<label class="font-semibold text-secondaryLight">

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
<label class="font-semibold text-secondaryLight">

View File

@@ -1,7 +1,7 @@
<template>
<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">
{{ $t("request.body") }}
@@ -135,7 +135,7 @@
</span>
</div>
<div
v-if="bodyParams.length === 0"
v-if="workingParams.length === 0"
class="flex flex-col items-center justify-center p-4 text-secondaryLight"
>
<img

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
{{ t("request.header_list") }}
@@ -36,7 +36,7 @@
/>
</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-for="(header, index) in workingHeaders"

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
{{ t("request.parameter_list") }}
@@ -36,7 +36,7 @@
/>
</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-for="(param, index) in workingParams"

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
{{ t("preRequest.javascript_code") }}

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
{{ t("request.raw_body") }}
@@ -52,21 +52,15 @@
/>
</div>
</div>
<div ref="rawBodyParameters"></div>
<div ref="rawBodyParameters" class="flex flex-col flex-1"></div>
</div>
</template>
<script setup lang="ts">
import {
computed,
reactive,
Ref,
ref,
watchEffect,
} from "@nuxtjs/composition-api"
import { computed, reactive, Ref, ref } from "@nuxtjs/composition-api"
import * as TO from "fp-ts/TaskOption"
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 { getEditorLangForMimeType } from "~/helpers/editorutils"
import { pluckRef, useI18n, useToast } from "~/helpers/utils/composables"
@@ -106,8 +100,6 @@ const langLinter = computed(() =>
isJSONContentType(props.contentType) ? jsonLinter : null
)
watchEffect(() => console.log(rawInputEditorLang.value))
const linewrapEnabled = ref(true)
const rawBodyParameters = ref<any | null>(null)

View File

@@ -1,6 +1,6 @@
<template>
<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="relative flex">

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
{{ t("test.javascript_code") }}

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex flex-col flex-1">
<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">
{{ t("request.body") }}
@@ -36,7 +36,7 @@
/>
</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-for="(param, index) in workingUrlEncodedParams"