diff --git a/packages/hoppscotch-app/locales/af.json b/packages/hoppscotch-app/locales/af.json
index 5ab5d0e48..3ff994a6a 100644
--- a/packages/hoppscotch-app/locales/af.json
+++ b/packages/hoppscotch-app/locales/af.json
@@ -502,6 +502,11 @@
"send_request": "Stuur versoek",
"title": "Versoek"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/ar.json b/packages/hoppscotch-app/locales/ar.json
index 7cee606c6..db59fb5d2 100644
--- a/packages/hoppscotch-app/locales/ar.json
+++ b/packages/hoppscotch-app/locales/ar.json
@@ -502,6 +502,11 @@
"send_request": "ارسل طلب",
"title": "طلب"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "انتقل الى الوضع الأسود",
"dark": "انتقل الى الوضع الليلي",
diff --git a/packages/hoppscotch-app/locales/ca.json b/packages/hoppscotch-app/locales/ca.json
index 239debb03..2da437f38 100644
--- a/packages/hoppscotch-app/locales/ca.json
+++ b/packages/hoppscotch-app/locales/ca.json
@@ -502,6 +502,11 @@
"send_request": "Enviar sol.licitud",
"title": "Sol·licitud"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/cn.json b/packages/hoppscotch-app/locales/cn.json
index c268adc5e..27c5e1bbd 100644
--- a/packages/hoppscotch-app/locales/cn.json
+++ b/packages/hoppscotch-app/locales/cn.json
@@ -502,6 +502,11 @@
"send_request": "发送请求",
"title": "请求"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "切换为黑色主题",
"dark": "切换为深色主题",
diff --git a/packages/hoppscotch-app/locales/cs.json b/packages/hoppscotch-app/locales/cs.json
index fa850e55a..6430f3db3 100644
--- a/packages/hoppscotch-app/locales/cs.json
+++ b/packages/hoppscotch-app/locales/cs.json
@@ -502,6 +502,11 @@
"send_request": "Poslat žádost",
"title": "Žádost"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/da.json b/packages/hoppscotch-app/locales/da.json
index 5c813b9f1..eb034e2e7 100644
--- a/packages/hoppscotch-app/locales/da.json
+++ b/packages/hoppscotch-app/locales/da.json
@@ -502,6 +502,11 @@
"send_request": "Send anmodning",
"title": "Anmodning"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/de.json b/packages/hoppscotch-app/locales/de.json
index 9bf978f9d..fff35452a 100644
--- a/packages/hoppscotch-app/locales/de.json
+++ b/packages/hoppscotch-app/locales/de.json
@@ -502,6 +502,11 @@
"send_request": "Anfrage senden",
"title": "Anfrage"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Auf Schwarzes Design wechseln",
"dark": "Auf Dunkles Design wechseln",
diff --git a/packages/hoppscotch-app/locales/el.json b/packages/hoppscotch-app/locales/el.json
index bfac3c8c3..fc0bf9c62 100644
--- a/packages/hoppscotch-app/locales/el.json
+++ b/packages/hoppscotch-app/locales/el.json
@@ -502,6 +502,11 @@
"send_request": "Στείλε αίτημα",
"title": "Αίτηση"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/en.json b/packages/hoppscotch-app/locales/en.json
index 26027f384..6233d2bf9 100644
--- a/packages/hoppscotch-app/locales/en.json
+++ b/packages/hoppscotch-app/locales/en.json
@@ -502,6 +502,11 @@
"send_request": "Send Request",
"title": "Request"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/es.json b/packages/hoppscotch-app/locales/es.json
index e6db50a23..d22c83b4e 100644
--- a/packages/hoppscotch-app/locales/es.json
+++ b/packages/hoppscotch-app/locales/es.json
@@ -502,6 +502,11 @@
"send_request": "Enviar petición",
"title": "Petición"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Cambiar el tema al modo negro",
"dark": "Cambiar el tema al modo oscuro",
diff --git a/packages/hoppscotch-app/locales/fi.json b/packages/hoppscotch-app/locales/fi.json
index 4968969d8..8ba2df54b 100644
--- a/packages/hoppscotch-app/locales/fi.json
+++ b/packages/hoppscotch-app/locales/fi.json
@@ -502,6 +502,11 @@
"send_request": "Lähetä pyyntö",
"title": "Pyyntö"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/fr.json b/packages/hoppscotch-app/locales/fr.json
index 48cecdc4b..d6514aa0c 100644
--- a/packages/hoppscotch-app/locales/fr.json
+++ b/packages/hoppscotch-app/locales/fr.json
@@ -502,6 +502,11 @@
"send_request": "Envoyer la requête",
"title": "Requête"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/he.json b/packages/hoppscotch-app/locales/he.json
index d5aa97bae..5640c8712 100644
--- a/packages/hoppscotch-app/locales/he.json
+++ b/packages/hoppscotch-app/locales/he.json
@@ -502,6 +502,11 @@
"send_request": "שלח בקשה",
"title": "בַּקָשָׁה"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/hu.json b/packages/hoppscotch-app/locales/hu.json
index 24cf3e127..0ea08dcae 100644
--- a/packages/hoppscotch-app/locales/hu.json
+++ b/packages/hoppscotch-app/locales/hu.json
@@ -502,6 +502,11 @@
"send_request": "Kérés elküldése",
"title": "Kérés"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Téma átváltása fekete módra",
"dark": "Téma átváltása sötét módra",
diff --git a/packages/hoppscotch-app/locales/it.json b/packages/hoppscotch-app/locales/it.json
index 36f6ed6b5..8e289bc7c 100644
--- a/packages/hoppscotch-app/locales/it.json
+++ b/packages/hoppscotch-app/locales/it.json
@@ -502,6 +502,11 @@
"send_request": "Invia richiesta",
"title": "Richiesta"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/ja.json b/packages/hoppscotch-app/locales/ja.json
index be84f3921..0287c1f67 100644
--- a/packages/hoppscotch-app/locales/ja.json
+++ b/packages/hoppscotch-app/locales/ja.json
@@ -502,6 +502,11 @@
"send_request": "Send Request",
"title": "Request"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/ko.json b/packages/hoppscotch-app/locales/ko.json
index 1beed9791..58a8365a8 100644
--- a/packages/hoppscotch-app/locales/ko.json
+++ b/packages/hoppscotch-app/locales/ko.json
@@ -502,6 +502,11 @@
"send_request": "요청 보내기",
"title": "요청"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "검은 테마로 전환",
"dark": "어두운 테마로 전환",
diff --git a/packages/hoppscotch-app/locales/nl.json b/packages/hoppscotch-app/locales/nl.json
index 6c982fbba..8f90e455b 100644
--- a/packages/hoppscotch-app/locales/nl.json
+++ b/packages/hoppscotch-app/locales/nl.json
@@ -502,6 +502,11 @@
"send_request": "Verstuur verzoek",
"title": "Verzoek"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/no.json b/packages/hoppscotch-app/locales/no.json
index 81be98b73..b85a8ef43 100644
--- a/packages/hoppscotch-app/locales/no.json
+++ b/packages/hoppscotch-app/locales/no.json
@@ -502,6 +502,11 @@
"send_request": "Send forespørsel",
"title": "Be om"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/pl.json b/packages/hoppscotch-app/locales/pl.json
index 3666f65ad..71db539da 100644
--- a/packages/hoppscotch-app/locales/pl.json
+++ b/packages/hoppscotch-app/locales/pl.json
@@ -502,6 +502,11 @@
"send_request": "Wyślij żądanie",
"title": "Żądania"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/pt-br.json b/packages/hoppscotch-app/locales/pt-br.json
index 246e97707..76e897a30 100644
--- a/packages/hoppscotch-app/locales/pt-br.json
+++ b/packages/hoppscotch-app/locales/pt-br.json
@@ -502,6 +502,11 @@
"send_request": "Enviar requisição",
"title": "Solicitar"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Trocar para o tema preto",
"dark": "Trocar para o tema escuro",
diff --git a/packages/hoppscotch-app/locales/pt.json b/packages/hoppscotch-app/locales/pt.json
index f47431c1c..dd7820c56 100644
--- a/packages/hoppscotch-app/locales/pt.json
+++ b/packages/hoppscotch-app/locales/pt.json
@@ -502,6 +502,11 @@
"send_request": "Enviar pedido",
"title": "Solicitar"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/ro.json b/packages/hoppscotch-app/locales/ro.json
index e6a7d4af6..fba7ee83a 100644
--- a/packages/hoppscotch-app/locales/ro.json
+++ b/packages/hoppscotch-app/locales/ro.json
@@ -502,6 +502,11 @@
"send_request": "Trimite cerere",
"title": "Cerere"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/ru.json b/packages/hoppscotch-app/locales/ru.json
index 90ff50715..3b3424968 100644
--- a/packages/hoppscotch-app/locales/ru.json
+++ b/packages/hoppscotch-app/locales/ru.json
@@ -502,6 +502,11 @@
"send_request": "Послать запрос",
"title": "Запрос"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/sr.json b/packages/hoppscotch-app/locales/sr.json
index fbff192b2..fcda83dde 100644
--- a/packages/hoppscotch-app/locales/sr.json
+++ b/packages/hoppscotch-app/locales/sr.json
@@ -502,6 +502,11 @@
"send_request": "Пошаљите упит",
"title": "Захтев"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/sv.json b/packages/hoppscotch-app/locales/sv.json
index ea760a824..8fcddb7db 100644
--- a/packages/hoppscotch-app/locales/sv.json
+++ b/packages/hoppscotch-app/locales/sv.json
@@ -502,6 +502,11 @@
"send_request": "Skicka förfrågan",
"title": "Begäran"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/tr.json b/packages/hoppscotch-app/locales/tr.json
index d87484696..002e7f1d3 100644
--- a/packages/hoppscotch-app/locales/tr.json
+++ b/packages/hoppscotch-app/locales/tr.json
@@ -502,6 +502,11 @@
"send_request": "İstek gönder",
"title": "İstek"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Temayı siyah mod olarak ayarla",
"dark": "Temayı karanlık mod olarak ayarla",
diff --git a/packages/hoppscotch-app/locales/tw.json b/packages/hoppscotch-app/locales/tw.json
index daf4b5c86..d6c203372 100644
--- a/packages/hoppscotch-app/locales/tw.json
+++ b/packages/hoppscotch-app/locales/tw.json
@@ -502,6 +502,11 @@
"send_request": "傳送請求",
"title": "請求"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "將主題切換至黑色模式",
"dark": "將主題切換至暗色模式",
diff --git a/packages/hoppscotch-app/locales/uk.json b/packages/hoppscotch-app/locales/uk.json
index ea9ba1101..d5c8d4f6a 100644
--- a/packages/hoppscotch-app/locales/uk.json
+++ b/packages/hoppscotch-app/locales/uk.json
@@ -502,6 +502,11 @@
"send_request": "Відправляти запит",
"title": "Запит"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/locales/vi.json b/packages/hoppscotch-app/locales/vi.json
index c08a3353f..48432f52e 100644
--- a/packages/hoppscotch-app/locales/vi.json
+++ b/packages/hoppscotch-app/locales/vi.json
@@ -502,6 +502,11 @@
"send_request": "Gửi yêu cầu",
"title": "Yêu cầu"
},
+ "response": {
+ "copy": "Copy response to clipboard",
+ "download": "Download response as file",
+ "title": "Response"
+ },
"theme": {
"black": "Switch theme to black mode",
"dark": "Switch theme to dark mode",
diff --git a/packages/hoppscotch-app/src/components/lenses/ResponseBodyRenderer.vue b/packages/hoppscotch-app/src/components/lenses/ResponseBodyRenderer.vue
index e1255a43a..9aae6fe5d 100644
--- a/packages/hoppscotch-app/src/components/lenses/ResponseBodyRenderer.vue
+++ b/packages/hoppscotch-app/src/components/lenses/ResponseBodyRenderer.vue
@@ -3,7 +3,6 @@
v-if="response"
v-model="selectedLensTab"
styles="sticky z-10 bg-primary top-lowerPrimaryStickyFold"
- render-inactive-tabs
>
${getSpecialKey()}ShiftP`"
:icon="!previewEnabled ? IconEye : IconEyeOff"
@click.prevent="togglePreview"
/>
@@ -70,6 +74,8 @@ import {
import { useCodemirror } from "@composables/codemirror"
import { useI18n } from "@composables/i18n"
import type { HoppRESTResponse } from "~/helpers/types/HoppRESTResponse"
+import { defineActionHandler } from "~/helpers/actions"
+import { getPlatformSpecialKey as getSpecialKey } from "~/helpers/platformutils"
const t = useI18n()
@@ -105,6 +111,10 @@ useCodemirror(
environmentHighlights: true,
})
)
+
+defineActionHandler("response.preview.toggle", () => togglePreview())
+defineActionHandler("response.file.download", () => downloadResponse())
+defineActionHandler("response.copy", () => copyResponse())