refactor: minor ui improvements

This commit is contained in:
liyasthomas
2021-08-14 16:14:08 +05:30
parent a129d7eb13
commit 2051b8788a
17 changed files with 75 additions and 46 deletions

View File

@@ -156,7 +156,7 @@ a {
.tippy-content > div {
@apply flex flex-col;
@apply max-h-56;
@apply max-h-46;
@apply items-stretch;
@apply overflow-y-auto;

View File

@@ -32,6 +32,14 @@
class="rounded-none"
@click.native="displayModalAdd(true)"
/>
<div class="flex">
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
to="https://docs.hoppscotch.io/"
blank
:title="$t('wiki')"
icon="help_outline"
/>
<ButtonSecondary
v-if="showCollActions"
v-tippy="{ theme: 'tooltip' }"
@@ -41,6 +49,7 @@
/>
</div>
</div>
</div>
<div class="flex-col">
<CollectionsGraphqlCollection
v-for="(collection, index) in filteredCollections"

View File

@@ -45,6 +45,14 @@
class="rounded-none"
@click.native="displayModalAdd(true)"
/>
<div class="flex">
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
to="https://docs.hoppscotch.io/"
blank
:title="$t('wiki')"
icon="help_outline"
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
icon="import_export"
@@ -53,6 +61,7 @@
/>
</div>
</div>
</div>
<EnvironmentsAdd
:show="showModalAdd"
@hide-modal="displayModalAdd(false)"

View File

@@ -152,7 +152,6 @@
border-b border-dividerLight
flex
"
:class="{ 'border-t': index == 0 }"
>
<SmartAutoComplete
:placeholder="$t('count.header', { count: index + 1 })"
@@ -333,6 +332,7 @@ export default defineComponent({
const showSaveRequestModal = ref(false)
const schema = useReadonlyStream(props.conn.schemaString$, "")
watch(
headers,
() => {

View File

@@ -6,7 +6,7 @@
<div
class="
bg-primaryLight
flex flex-col
flex
top-sidebarPrimaryStickyFold
z-10
sticky
@@ -29,11 +29,19 @@
"
/>
</div>
<div class="flex">
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
to="https://docs.hoppscotch.io/"
blank
:title="$t('wiki')"
icon="help_outline"
/>
</div>
</div>
<SmartTabs
ref="gqlTabs"
styles="
border-t border-dividerLight sticky z-8 top-sidebarSecondaryStickyFold"
styles="border-t border-dividerLight sticky z-10 top-sidebarSecondaryStickyFold"
>
<div class="gqlTabs">
<SmartTab
@@ -153,6 +161,13 @@
{{ $t("schema") }}
</label>
<div class="flex">
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
to="https://docs.hoppscotch.io/"
blank
:title="$t('wiki')"
icon="help_outline"
/>
<ButtonSecondary
ref="downloadSchema"
v-tippy="{ theme: 'tooltip' }"

View File

@@ -27,6 +27,14 @@
:placeholder="$t('search')"
/>
</div>
<div class="flex">
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
to="https://docs.hoppscotch.io/"
blank
:title="$t('wiki')"
icon="help_outline"
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
data-testid="clear_history"
@@ -36,6 +44,7 @@
@click.native="confirmRemove = true"
/>
</div>
</div>
<div class="flex flex-col">
<div v-for="(entry, index) in filteredHistory" :key="`entry-${index}`">
<HistoryRestCard

View File

@@ -66,7 +66,7 @@
class="px-2"
@change="authActive = !authActive"
>
{{ authActive ? $t("enabled") : $t("disabled") }}
{{ $t("enabled") }}
</SmartToggle>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"

View File

@@ -45,10 +45,7 @@
</tippy>
</span>
</div>
<HttpBodyParameters
v-if="contentType == 'multipart/form-data'"
:content-type="contentType"
/>
<HttpBodyParameters v-if="contentType == 'multipart/form-data'" />
<HttpRawBody v-else :content-type="contentType" />
</div>
</template>

View File

@@ -42,7 +42,6 @@
v-for="(header, index) in headers$"
:key="`header-${index}`"
class="divide-x divide-dividerLight border-b border-dividerLight flex"
:class="{ 'border-t': index == 0 }"
>
<SmartAutoComplete
:placeholder="$t('count.header', { count: index + 1 })"

View File

@@ -119,7 +119,6 @@ export default defineComponent({
body: {
contentType: "application/json",
body: "",
isRaw: false,
},
})
)

View File

@@ -42,7 +42,6 @@
v-for="(param, index) in params$"
:key="`param-${index}`"
class="divide-x divide-dividerLight border-b border-dividerLight flex"
:class="{ 'border-t': index == 0 }"
>
<SmartEnvInput
v-if="EXPERIMENTAL_URL_BAR_ENABLED"

View File

@@ -24,7 +24,7 @@
icon="help_outline"
/>
</div>
<div class="flex">
<div class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3">
<SmartJsEditor
v-model="preRequestScript"

View File

@@ -13,7 +13,7 @@
justify-between
"
>
<label for="rawBody">
<label class="font-semibold text-secondaryLight">
{{ $t("raw_request_body") }}
</label>
<div class="flex">

View File

@@ -24,7 +24,7 @@
icon="help_outline"
/>
</div>
<div class="flex">
<div class="border-b border-dividerLight flex">
<div class="border-r border-dividerLight w-2/3">
<SmartJsEditor
v-model="testScript"

View File

@@ -79,7 +79,6 @@
border-b border-dividerLight
flex
"
:class="{ 'border-t': index == 0 }"
>
<input
v-model="protocol.value"

View File

@@ -268,7 +268,7 @@
"path": "Path",
"label": "Label",
"content_type": "Content Type",
"raw_input": "Raw input",
"raw": "Raw",
"parameter_list": "Query Parameters",
"body": "Body",
"request_body": "Request Body",

View File

@@ -14,13 +14,7 @@
"~/*": ["./*"],
"@/*": ["./*"]
},
"types": [
"@types/node",
"@nuxt/types",
"@nuxtjs/i18n",
"@nuxtjs/toast",
"vue-rx"
]
"types": ["@types/node", "@nuxt/types", "@nuxtjs/i18n", "@nuxtjs/toast"]
},
"exclude": ["node_modules", ".nuxt", "dist"]
}