Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: minor ui improvements (#3603)
Liyas Thomas1cc845e17d42
diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.jsonindex 8fa7c3812..2f8a779fb 100644--- a/packages/hoppscotch-common/locales/en.json+++ b/packages/hoppscotch-common/locales/en.json@@ -497,7 +497,8 @@"enter_curl": "Enter cURL command","generate_code": "Generate code","generated_code": "Generated code",- "go_to_authorization_tab": "Go to Authorization",+ "go_to_authorization_tab": "Go to Authorization tab",+ "go_to_body_tab": "Go to Body tab","header_list": "Header List","invalid_name": "Please provide a name for the request","method": "Method",diff --git a/packages/hoppscotch-common/src/components/graphql/Headers.vue b/packages/hoppscotch-common/src/components/graphql/Headers.vueindex 92da574f3..8be85436e 100644--- a/packages/hoppscotch-common/src/components/graphql/Headers.vue+++ b/packages/hoppscotch-common/src/components/graphql/Headers.vue@@ -69,9 +69,9 @@: null,}":icon="IconGripVertical"- class="cursor-auto text-primary hover:text-primary"+ class="opacity-0":class="{- 'draggable-handle !cursor-grab group-hover:text-secondaryLight':+ 'draggable-handle cursor-grab group-hover:opacity-100':index !== workingHeaders?.length - 1,}"tabindex="-1"diff --git a/packages/hoppscotch-common/src/components/graphql/Response.vue b/packages/hoppscotch-common/src/components/graphql/Response.vueindex d830fd0b7..979503773 100644--- a/packages/hoppscotch-common/src/components/graphql/Response.vue+++ b/packages/hoppscotch-common/src/components/graphql/Response.vue@@ -1,10 +1,10 @@<template>- <div class="flex flex-col flex-1 overflow-auto whitespace-nowrap">+ <div class="flex flex-1 flex-col overflow-auto whitespace-nowrap"><divv-if="response && response.length === 1 && response[0].type === 'response'"- class="flex flex-col flex-1"+ class="flex flex-1 flex-col"><divclass="sticky top-0 z-10 flex flex-shrink-0 items-center justify-between overflow-x-auto border-b border-dividerLight bg-primary pl-4"diff --git a/packages/hoppscotch-common/src/components/http/BodyParameters.vue b/packages/hoppscotch-common/src/components/http/BodyParameters.vueindex 860c3bdbf..b4e4d6de7 100644--- a/packages/hoppscotch-common/src/components/http/BodyParameters.vue+++ b/packages/hoppscotch-common/src/components/http/BodyParameters.vue@@ -54,9 +54,9 @@: null,}":icon="IconGripVertical"- class="cursor-auto text-primary hover:text-primary"+ class="opacity-0":class="{- 'draggable-handle !cursor-grab group-hover:text-secondaryLight':+ 'draggable-handle cursor-grab group-hover:opacity-100':index !== workingParams?.length - 1,}"tabindex="-1"@@ -75,7 +75,7 @@"/><div v-if="entry.isFile" class="file-chips-container">- <div class="file-chips-wrapper space-x-2">+ <div class="file-chips-wrapper space-x-1"><HoppSmartFileChipv-for="(file, fileIndex) in entry.value":key="`param-${index}-file-${fileIndex}`"diff --git a/packages/hoppscotch-common/src/components/http/Headers.vue b/packages/hoppscotch-common/src/components/http/Headers.vueindex dbc065963..6b92a2ea1 100644--- a/packages/hoppscotch-common/src/components/http/Headers.vue+++ b/packages/hoppscotch-common/src/components/http/Headers.vue@@ -71,9 +71,9 @@: null,}":icon="IconGripVertical"- class="cursor-auto text-primary hover:text-primary"+ class="opacity-0":class="{- 'draggable-handle !cursor-grab group-hover:text-secondaryLight':+ 'draggable-handle cursor-grab group-hover:opacity-100':index !== workingHeaders?.length - 1,}"tabindex="-1"@@ -190,19 +190,13 @@:icon="masking ? IconEye : IconEyeOff"@click="toggleMask()"/>- <HoppButtonSecondary- v-else- v-tippy="{ theme: 'tooltip' }"- :icon="IconArrowUpRight"- :title="t('request.go_to_authorization_tab')"- class="cursor-auto text-primary hover:text-primary"- />+ <div v-else class="aspect-square w-8"></div></span><span><HoppButtonSecondaryv-tippy="{ theme: 'tooltip' }":icon="IconArrowUpRight"- :title="t('request.go_to_authorization_tab')"+ :title="changeTabTooltip(header.source)"@click="changeTab(header.source)"/></span>@@ -510,6 +504,15 @@ const mask = (header: ComputedHeader) => {return header.header.value}+const changeTabTooltip = (tab: ComputedHeader["source"]) => {+ switch (tab) {+ case "auth":+ return t("request.go_to_authorization_tab")+ case "body":+ return t("request.go_to_body_tab")+ }+}+const changeTab = (tab: ComputedHeader["source"]) => {if (tab === "auth") emit("change-tab", "authorization")else emit("change-tab", "bodyParams")diff --git a/packages/hoppscotch-common/src/components/http/Parameters.vue b/packages/hoppscotch-common/src/components/http/Parameters.vueindex aaa55e298..6f7dab60e 100644--- a/packages/hoppscotch-common/src/components/http/Parameters.vue+++ b/packages/hoppscotch-common/src/components/http/Parameters.vue@@ -71,9 +71,9 @@: null,}":icon="IconGripVertical"- class="cursor-auto text-primary hover:text-primary"+ class="opacity-0":class="{- 'draggable-handle !cursor-grab group-hover:text-secondaryLight':+ 'draggable-handle cursor-grab group-hover:opacity-100':index !== workingParams?.length - 1,}"tabindex="-1"diff --git a/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue b/packages/hoppscotch-common/src/components/http/URLEncodedParams.vueindex f1c582d7f..2d36f565e 100644--- a/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue+++ b/packages/hoppscotch-common/src/components/http/URLEncodedParams.vue@@ -71,9 +71,9 @@: null,}":icon="IconGripVertical"- class="cursor-auto text-primary hover:text-primary"+ class="opacity-0":class="{- 'draggable-handle !cursor-grab group-hover:text-secondaryLight':+ 'draggable-handle cursor-grab group-hover:opacity-100':index !== workingUrlEncodedParams?.length - 1,}"tabindex="-1"diff --git a/packages/hoppscotch-common/src/pages/realtime/websocket.vue b/packages/hoppscotch-common/src/pages/realtime/websocket.vueindex 3714296f5..8affba8ef 100644--- a/packages/hoppscotch-common/src/pages/realtime/websocket.vue+++ b/packages/hoppscotch-common/src/pages/realtime/websocket.vue@@ -98,9 +98,9 @@: null,}":icon="IconGripVertical"- class="cursor-auto text-primary hover:text-primary"+ class="opacity-0":class="{- 'draggable-handle !cursor-grab group-hover:text-secondaryLight':+ 'draggable-handle cursor-grab group-hover:opacity-100':index !== protocols?.length - 1,}"tabindex="-1"diff --git a/packages/hoppscotch-ui/src/components/smart/FileChip.vue b/packages/hoppscotch-ui/src/components/smart/FileChip.vueindex 484ca229a..c835ced58 100644--- a/packages/hoppscotch-ui/src/components/smart/FileChip.vue+++ b/packages/hoppscotch-ui/src/components/smart/FileChip.vue@@ -1,6 +1,12 @@<template>- <span class="inline-flex items-center justify-center rounded pl-2 pr-0.5 bg-primaryDark">- <icon-lucide-file class="opacity-75 svg-icons" />- <span class="px-2 truncate max-w-54"><slot></slot></span>+ <span+ class="inline-flex items-center space-x-1 justify-center rounded px-2 bg-primaryDark"+ >+ <IconLucideFile class="opacity-75 svg-icons" />+ <span class="truncate max-w-54"><slot></slot></span></span></template>++<script setup lang="ts">+import IconLucideFile from "~icons/lucide/file"+</script>