@@ -48,13 +52,13 @@
@@ -83,7 +87,7 @@
{{ $t("empty.environments") }}
@@ -94,11 +98,11 @@
@@ -160,7 +164,7 @@ export default defineComponent({
clearContent() {
this.vars = []
this.clearIcon = "check"
- this.$toast.success(this.$t("state.cleared").toString(), {
+ this.$toast.success(`${this.$t("state.cleared")}`, {
icon: "clear_all",
})
setTimeout(() => (this.clearIcon = "trash-2"), 1000)
@@ -176,7 +180,7 @@ export default defineComponent({
},
saveEnvironment() {
if (!this.name) {
- this.$toast.error(this.$t("environment.invalid_name").toString(), {
+ this.$toast.error(`${this.$t("environment.invalid_name")}`, {
icon: "error_outline",
})
return
diff --git a/packages/hoppscotch-app/components/environments/Environment.vue b/packages/hoppscotch-app/components/environments/Environment.vue
index e29bdde7e..ab9c81dd1 100644
--- a/packages/hoppscotch-app/components/environments/Environment.vue
+++ b/packages/hoppscotch-app/components/environments/Environment.vue
@@ -33,27 +33,31 @@
{
+ $emit('edit-environment')
+ $refs.options.tippy().hide()
+ }
"
/>
{
+ confirmRemove = true
+ $refs.options.tippy().hide()
+ }
"
/>
@@ -81,7 +85,7 @@ export default defineComponent({
removeEnvironment() {
if (this.environmentIndex !== "Global")
deleteEnvironment(this.environmentIndex)
- this.$toast.success(this.$t("state.deleted").toString(), {
+ this.$toast.success(`${this.$t("state.deleted")}`, {
icon: "delete",
})
},
diff --git a/packages/hoppscotch-app/components/environments/index.vue b/packages/hoppscotch-app/components/environments/index.vue
index e5327c07c..e063a217c 100644
--- a/packages/hoppscotch-app/components/environments/index.vue
+++ b/packages/hoppscotch-app/components/environments/index.vue
@@ -1,5 +1,5 @@
-
+
{
+ selectedEnvironmentIndex = -1
+ $refs.options.tippy().hide()
+ }
"
/>
{
+ selectedEnvironmentIndex = index
+ $refs.options.tippy().hide()
+ }
"
/>
@@ -115,7 +119,7 @@
{{ $t("empty.environments") }}
diff --git a/packages/hoppscotch-app/components/firebase/Login.vue b/packages/hoppscotch-app/components/firebase/Login.vue
index ca6ddfaf7..eb47483f1 100644
--- a/packages/hoppscotch-app/components/firebase/Login.vue
+++ b/packages/hoppscotch-app/components/firebase/Login.vue
@@ -1,7 +1,7 @@
@@ -10,18 +10,18 @@
@@ -55,7 +55,7 @@
: true
"
type="button"
- :label="$t('auth.send_magic_link')"
+ :label="`${$t('auth.send_magic_link')}`"
@click.native="signInWithEmail"
/>
@@ -108,7 +108,7 @@
/>
@@ -161,7 +161,7 @@ export default defineComponent({
},
methods: {
showLoginSuccess() {
- this.$toast.success(this.$t("auth.login_success").toString(), {
+ this.$toast.success(`${this.$t("auth.login_success")}`, {
icon: "vpn_key",
})
},
@@ -184,7 +184,7 @@ export default defineComponent({
duration: 0,
closeOnSwipe: false,
action: {
- text: this.$t("action.yes").toString(),
+ text: `${this.$t("action.yes")}`,
onClick: async (_, toastObject) => {
const { user } = await signInUserWithGithub()
await linkWithFBCredential(user, pendingCred)
@@ -196,7 +196,7 @@ export default defineComponent({
},
})
} else {
- this.$toast.error(this.$t("error.something_went_wrong").toString(), {
+ this.$toast.error(`${this.$t("error.something_went_wrong")}`, {
icon: "error_outline",
})
}
@@ -228,7 +228,7 @@ export default defineComponent({
duration: 0,
closeOnSwipe: false,
action: {
- text: this.$t("action.yes").toString(),
+ text: `${this.$t("action.yes")}`,
onClick: async (_, toastObject) => {
const { user } = await signInUserWithGoogle()
await linkWithFBCredential(user, pendingCred)
@@ -240,7 +240,7 @@ export default defineComponent({
},
})
} else {
- this.$toast.error(this.$t("error.something_went_wrong").toString(), {
+ this.$toast.error(`${this.$t("error.something_went_wrong")}`, {
icon: "error_outline",
})
}
diff --git a/packages/hoppscotch-app/components/firebase/Logout.vue b/packages/hoppscotch-app/components/firebase/Logout.vue
index 305ced654..280e6177b 100644
--- a/packages/hoppscotch-app/components/firebase/Logout.vue
+++ b/packages/hoppscotch-app/components/firebase/Logout.vue
@@ -2,15 +2,17 @@
{
+ $emit('confirm-logout')
+ confirmLogout = true
+ }
"
/>
@@ -31,12 +33,12 @@ export default defineComponent({
async logout() {
try {
await signOutUser()
- this.$toast.success(this.$t("auth.logged_out").toString(), {
+ this.$toast.success(`${this.$t("auth.logged_out")}`, {
icon: "vpn_key",
})
} catch (e) {
console.error(e)
- this.$toast.error(this.$t("error.something_went_wrong").toString(), {
+ this.$toast.error(`${this.$t("error.something_went_wrong")}`, {
icon: "error_outline",
})
}
diff --git a/packages/hoppscotch-app/components/graphql/RequestOptions.vue b/packages/hoppscotch-app/components/graphql/RequestOptions.vue
index cd17475be..06518c758 100644
--- a/packages/hoppscotch-app/components/graphql/RequestOptions.vue
+++ b/packages/hoppscotch-app/components/graphql/RequestOptions.vue
@@ -1,7 +1,7 @@
-
+
-
+
+
{
}))
setGQLHeaders(transformation)
} catch (e) {
- $toast.error(t("error.something_went_wrong").toString(), {
+ $toast.error(`${t("error.something_went_wrong")}`, {
icon: "error_outline",
})
console.error(e)
@@ -343,7 +341,7 @@ const bulkEditor = ref(null)
useCodemirror(bulkEditor, bulkHeaders, {
extendedEditorConfig: {
mode: "text/x-yaml",
- placeholder: t("state.bulk_mode_placeholder").toString(),
+ placeholder: `${t("state.bulk_mode_placeholder")}`,
},
linter: null,
completer: null,
@@ -354,7 +352,7 @@ const variableEditor = ref(null)
useCodemirror(variableEditor, variableString, {
extendedEditorConfig: {
mode: "application/ld+json",
- placeholder: t("request.variables").toString(),
+ placeholder: `${t("request.variables")}`,
},
linter: jsonLinter,
completer: null,
@@ -366,7 +364,7 @@ const schemaString = useReadonlyStream(props.conn.schema$, null)
useCodemirror(queryEditor, gqlQueryString, {
extendedEditorConfig: {
mode: "graphql",
- placeholder: t("request.query").toString(),
+ placeholder: `${t("request.query")}`,
},
linter: createGQLQueryLinter(schemaString),
completer: queryCompleter(schemaString),
@@ -409,7 +407,7 @@ const runQuery = async () => {
const startTime = Date.now()
nuxt.value.$loading.start()
- response.value = t("state.loading").toString()
+ response.value = `${t("state.loading")}`
try {
const runURL = clone(url.value)
@@ -443,14 +441,14 @@ const runQuery = async () => {
})
)
- $toast.success(t("state.finished_in", { duration }).toString(), {
+ $toast.success(`${t("state.finished_in", { duration })}`, {
icon: "done",
})
} catch (e: any) {
response.value = `${e}. ${t("error.check_console_details")}`
nuxt.value.$loading.finish()
- $toast.error(`${e} ${t("error.f12_details").toString()}`, {
+ $toast.error(`${e} ${t("error.f12_details")}`, {
icon: "error_outline",
})
console.error(e)
@@ -470,7 +468,7 @@ const prettifyQuery = () => {
try {
gqlQueryString.value = gql.print(gql.parse(gqlQueryString.value))
} catch (e) {
- $toast.error(t("error.gql_prettify_invalid_query").toString(), {
+ $toast.error(`${t("error.gql_prettify_invalid_query")}`, {
icon: "error_outline",
})
}
diff --git a/packages/hoppscotch-app/components/graphql/Response.vue b/packages/hoppscotch-app/components/graphql/Response.vue
index f0027d92a..10da832ff 100644
--- a/packages/hoppscotch-app/components/graphql/Response.vue
+++ b/packages/hoppscotch-app/components/graphql/Response.vue
@@ -71,7 +71,7 @@
{
document.body.appendChild(a)
a.click()
downloadResponseIcon.value = "check"
- $toast.success(t("state.download_started").toString(), {
+ $toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
setTimeout(() => {
diff --git a/packages/hoppscotch-app/components/graphql/Sidebar.vue b/packages/hoppscotch-app/components/graphql/Sidebar.vue
index b5746843c..b43c68c9d 100644
--- a/packages/hoppscotch-app/components/graphql/Sidebar.vue
+++ b/packages/hoppscotch-app/components/graphql/Sidebar.vue
@@ -8,7 +8,7 @@
v-model="graphqlFieldsFilterText"
type="search"
autocomplete="off"
- :placeholder="$t('action.search')"
+ :placeholder="`${$t('action.search')}`"
class="bg-transparent flex w-full p-4 py-2"
/>
@@ -29,7 +29,7 @@
@@ -44,7 +44,7 @@
-
+
-
+
@@ -412,7 +412,7 @@ const downloadSchema = () => {
document.body.appendChild(a)
a.click()
downloadSchemaIcon.value = "check"
- $toast.success(t("state.download_started").toString(), {
+ $toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
setTimeout(() => {
diff --git a/packages/hoppscotch-app/components/graphql/TypeLink.vue b/packages/hoppscotch-app/components/graphql/TypeLink.vue
index 6c0c39d2b..bd6b79acc 100644
--- a/packages/hoppscotch-app/components/graphql/TypeLink.vue
+++ b/packages/hoppscotch-app/components/graphql/TypeLink.vue
@@ -22,7 +22,7 @@ export default defineComponent({
computed: {
typeString() {
- return this.gqlType.toString()
+ return `${this.gqlType}`
},
isScalar() {
return this.resolveRootType(this.gqlType) instanceof GraphQLScalarType
diff --git a/packages/hoppscotch-app/components/history/index.vue b/packages/hoppscotch-app/components/history/index.vue
index 6c29119ff..338b0ffc6 100644
--- a/packages/hoppscotch-app/components/history/index.vue
+++ b/packages/hoppscotch-app/components/history/index.vue
@@ -15,7 +15,7 @@
type="search"
autocomplete="off"
class="bg-transparent flex w-full p-4 py-2"
- :placeholder="$t('action.search')"
+ :placeholder="`${$t('action.search')}`"
/>
@@ -131,7 +131,7 @@ export default defineComponent({
return Object.keys(entry).some((key) => {
let value = entry[key as keyof typeof entry]
if (value) {
- value = typeof value !== "string" ? value.toString() : value
+ value = `${value}`
return value.toLowerCase().includes(filterText)
}
return false
@@ -144,7 +144,7 @@ export default defineComponent({
clearHistory() {
if (this.page === "rest") clearRESTHistory()
else clearGraphqlHistory()
- this.$toast.success(this.$t("state.history_deleted").toString(), {
+ this.$toast.success(`${this.$t("state.history_deleted")}`, {
icon: "delete",
})
},
@@ -154,7 +154,7 @@ export default defineComponent({
deleteHistory(entry: any) {
if (this.page === "rest") deleteRESTHistoryEntry(entry)
else deleteGraphqlHistoryEntry(entry)
- this.$toast.success(this.$t("state.deleted").toString(), {
+ this.$toast.success(`${this.$t("state.deleted")}`, {
icon: "delete",
})
},
diff --git a/packages/hoppscotch-app/components/history/rest/Card.vue b/packages/hoppscotch-app/components/history/rest/Card.vue
index 3e22c5fc4..7ebf40e6e 100644
--- a/packages/hoppscotch-app/components/history/rest/Card.vue
+++ b/packages/hoppscotch-app/components/history/rest/Card.vue
@@ -4,7 +4,7 @@
class="cursor-pointer flex px-2 w-16 justify-center items-center truncate"
:class="entryStatus.className"
data-testid="restore_history_entry"
- :title="duration"
+ :title="`${duration}`"
@click="$emit('use-entry')"
>
{{ entry.request.method }}
@@ -20,7 +20,7 @@
group-hover:text-secondaryDark
"
data-testid="restore_history_entry"
- :title="duration"
+ :title="`${duration}`"
@click="$emit('use-entry')"
>
@@ -75,9 +75,9 @@ export default defineComponent({
if (!responseDuration) return ""
return responseDuration > 0
- ? `${$t("request.duration").toString()}: ${responseDuration}ms`
- : $t("error.no_duration").toString()
- } else return $t("error.no_duration").toString()
+ ? `${$t("request.duration")}: ${responseDuration}ms`
+ : $t("error.no_duration")
+ } else return $t("error.no_duration")
})
const entryStatus = computed(() => {
diff --git a/packages/hoppscotch-app/components/http/Body.vue b/packages/hoppscotch-app/components/http/Body.vue
index c683f9e20..79e7b9b87 100644
--- a/packages/hoppscotch-app/components/http/Body.vue
+++ b/packages/hoppscotch-app/components/http/Body.vue
@@ -37,8 +37,10 @@
:info-icon="contentType === null ? 'done' : ''"
:active-info-icon="contentType === null"
@click.native="
- contentType = null
- $refs.contentTypeOptions.tippy().hide()
+ () => {
+ contentType = null
+ $refs.contentTypeOptions.tippy().hide()
+ }
"
/>
{
+ contentType = contentTypeItem
+ $refs.contentTypeOptions.tippy().hide()
+ }
"
/>
@@ -66,7 +70,7 @@
@@ -48,12 +48,12 @@
@@ -126,7 +126,7 @@ const hideModal = () => emit("hide-modal")
const copyRequestCode = () => {
copyToClipboard(requestCode.value)
copyIcon.value = "check"
- $toast.success(t("state.copied_to_clipboard").toString(), {
+ $toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
setTimeout(() => (copyIcon.value = "copy"), 1000)
diff --git a/packages/hoppscotch-app/components/http/Headers.vue b/packages/hoppscotch-app/components/http/Headers.vue
index 55ffce53d..52be87fde 100644
--- a/packages/hoppscotch-app/components/http/Headers.vue
+++ b/packages/hoppscotch-app/components/http/Headers.vue
@@ -55,7 +55,7 @@
class="divide-x divide-dividerLight border-b border-dividerLight flex"
>
@@ -202,7 +202,7 @@ const bulkEditor = ref(null)
useCodemirror(bulkEditor, bulkHeaders, {
extendedEditorConfig: {
mode: "text/x-yaml",
- placeholder: t("state.bulk_mode_placeholder").toString(),
+ placeholder: `${t("state.bulk_mode_placeholder")}`,
},
linter: null,
completer: null,
@@ -217,7 +217,7 @@ watch(bulkHeaders, () => {
}))
setRESTHeaders(transformation)
} catch (e) {
- $toast.error(t("error.something_went_wrong").toString(), {
+ $toast.error(`${t("error.something_went_wrong")}`, {
icon: "error_outline",
})
console.error(e)
diff --git a/packages/hoppscotch-app/components/http/ImportCurl.vue b/packages/hoppscotch-app/components/http/ImportCurl.vue
index 1701da26c..ba7a2cc58 100644
--- a/packages/hoppscotch-app/components/http/ImportCurl.vue
+++ b/packages/hoppscotch-app/components/http/ImportCurl.vue
@@ -1,9 +1,5 @@
-
+
@@ -12,11 +8,11 @@
@@ -49,7 +45,7 @@ const curlEditor = ref(null)
useCodemirror(curlEditor, curl, {
extendedEditorConfig: {
mode: "application/x-sh",
- placeholder: t("request.enter_curl").toString(),
+ placeholder: `${t("request.enter_curl")}`,
},
linter: null,
completer: null,
@@ -128,7 +124,7 @@ const handleImport = () => {
)
} catch (e) {
console.error(e)
- $toast.error(t("error.curl_invalid_format").toString(), {
+ $toast.error(`${t("error.curl_invalid_format")}`, {
icon: "error_outline",
})
}
diff --git a/packages/hoppscotch-app/components/http/OAuth2Authorization.vue b/packages/hoppscotch-app/components/http/OAuth2Authorization.vue
index 97f5cce45..43e232466 100644
--- a/packages/hoppscotch-app/components/http/OAuth2Authorization.vue
+++ b/packages/hoppscotch-app/components/http/OAuth2Authorization.vue
@@ -48,7 +48,7 @@
@@ -97,7 +97,7 @@ export default {
oidcDiscoveryURL.value === "" &&
(authURL.value === "" || accessTokenURL.value === "")
) {
- $toast.error($t("complete_config_urls").toString(), {
+ $toast.error(`${$t("complete_config_urls")}`, {
icon: "error",
})
return
@@ -113,7 +113,7 @@ export default {
}
await tokenRequest(tokenReqParams)
} catch (e) {
- $toast.error(e, {
+ $toast.error(`${e}`, {
icon: "code",
})
}
diff --git a/packages/hoppscotch-app/components/http/Parameters.vue b/packages/hoppscotch-app/components/http/Parameters.vue
index 037f6c597..e6cdfeba0 100644
--- a/packages/hoppscotch-app/components/http/Parameters.vue
+++ b/packages/hoppscotch-app/components/http/Parameters.vue
@@ -57,7 +57,7 @@
{
}))
setRESTParams(transformation)
} catch (e) {
- $toast.error(t("error.something_went_wrong").toString(), {
+ $toast.error(`${t("error.something_went_wrong")}`, {
icon: "error_outline",
})
console.error(e)
@@ -228,7 +230,7 @@ const bulkEditor = ref(null)
useCodemirror(bulkEditor, bulkParams, {
extendedEditorConfig: {
mode: "text/x-yaml",
- placeholder: t("state.bulk_mode_placeholder").toString(),
+ placeholder: `${t("state.bulk_mode_placeholder")}`,
},
linter: null,
completer: null,
diff --git a/packages/hoppscotch-app/components/http/PreRequestScript.vue b/packages/hoppscotch-app/components/http/PreRequestScript.vue
index 563fcc9e2..b4b34aeee 100644
--- a/packages/hoppscotch-app/components/http/PreRequestScript.vue
+++ b/packages/hoppscotch-app/components/http/PreRequestScript.vue
@@ -1,5 +1,5 @@
-
+
@@ -107,7 +107,7 @@ useCodemirror(
extendedEditorConfig: {
mode: "application/javascript",
lineWrapping: linewrapEnabled,
- placeholder: t("preRequest.javascript_code").toString(),
+ placeholder: `${t("preRequest.javascript_code")}`,
},
linter,
completer,
diff --git a/packages/hoppscotch-app/components/http/RawBody.vue b/packages/hoppscotch-app/components/http/RawBody.vue
index 2c6ff4a7d..b11ef8dc6 100644
--- a/packages/hoppscotch-app/components/http/RawBody.vue
+++ b/packages/hoppscotch-app/components/http/RawBody.vue
@@ -35,7 +35,7 @@
v-tippy="{ theme: 'tooltip' }"
:title="$t('action.clear')"
svg="trash-2"
- @click.native="clearContent('rawParams', $event)"
+ @click.native="clearContent"
/>
{
rawParamsBody.value = target?.result
}
reader.readAsText(file)
- $toast.success(t("state.file_imported").toString(), {
+ $toast.success(`${t("state.file_imported")}`, {
icon: "attach_file",
})
} else {
- $toast.error(t("action.choose_file").toString(), {
+ $toast.error(`${t("action.choose_file")}`, {
icon: "attach_file",
})
}
diff --git a/packages/hoppscotch-app/components/http/Request.vue b/packages/hoppscotch-app/components/http/Request.vue
index e11bd6aa8..d4fea1d92 100644
--- a/packages/hoppscotch-app/components/http/Request.vue
+++ b/packages/hoppscotch-app/components/http/Request.vue
@@ -43,7 +43,7 @@
"
:value="newMethod"
:readonly="!isCustomMethod"
- :placeholder="$t('request.method')"
+ :placeholder="`${$t('request.method')}`"
@input="onSelectMethod($event.target.value)"
/>
@@ -61,7 +61,7 @@
@@ -110,7 +110,7 @@
@@ -125,7 +125,7 @@
{
@@ -135,7 +135,7 @@
"
/>
{
@@ -146,7 +146,7 @@
/>
{
@@ -159,7 +159,7 @@
{
@@ -198,7 +198,7 @@
/>
{
@@ -352,7 +352,7 @@ const copyRequest = () => {
.catch(() => {})
} else {
copyToClipboard(window.location.href)
- $toast.success(t("state.copied_to_clipboard").toString(), {
+ $toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
}
@@ -409,7 +409,7 @@ const saveRequest = () => {
return
}
}
- $toast.success(t("request.saved").toString(), {
+ $toast.success(`${t("request.saved")}`, {
icon: "playlist_add_check",
})
}
diff --git a/packages/hoppscotch-app/components/http/TestResult.vue b/packages/hoppscotch-app/components/http/TestResult.vue
index 0ce516558..0e3bc8998 100644
--- a/packages/hoppscotch-app/components/http/TestResult.vue
+++ b/packages/hoppscotch-app/components/http/TestResult.vue
@@ -1,5 +1,5 @@
-
+
{{
` \xA0 — \xA0test ${
- result.status === "pass" ? $t("passed") : $t("failed")
+ result.status === "pass"
+ ? $t("test.passed")
+ : $t("test.failed")
}`
}}
@@ -84,7 +86,7 @@
{{
- ` \xA0 — \xA0test ${
- result.status === "pass" ? $t("passed") : $t("failed")
+ ` \xA0 — \xA0 ${
+ result.status === "pass" ? $t("test.passed") : $t("test.failed")
}`
}}
diff --git a/packages/hoppscotch-app/components/http/Tests.vue b/packages/hoppscotch-app/components/http/Tests.vue
index 949296215..5f8d06b00 100644
--- a/packages/hoppscotch-app/components/http/Tests.vue
+++ b/packages/hoppscotch-app/components/http/Tests.vue
@@ -1,5 +1,5 @@
-
+
@@ -107,7 +107,7 @@ useCodemirror(
extendedEditorConfig: {
mode: "application/javascript",
lineWrapping: linewrapEnabled,
- placeholder: t("test.javascript_code").toString(),
+ placeholder: `${t("test.javascript_code")}`,
},
linter,
completer,
diff --git a/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue b/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue
index 1dccd74c3..ce2687ef0 100644
--- a/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue
+++ b/packages/hoppscotch-app/components/lenses/ResponseBodyRenderer.vue
@@ -13,7 +13,7 @@
v-if="headerLength"
id="headers"
:label="$t('response.headers')"
- :info="headerLength.toString()"
+ :info="`${headerLength}`"
>
diff --git a/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue
index 928b82204..87178b1de 100644
--- a/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue
+++ b/packages/hoppscotch-app/components/lenses/renderers/HTMLLensRenderer.vue
@@ -130,7 +130,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
- $toast.success(t("state.download_started").toString(), {
+ $toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
setTimeout(() => {
@@ -143,7 +143,7 @@ const downloadResponse = () => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
- $toast.success(t("state.copied_to_clipboard").toString(), {
+ $toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
setTimeout(() => (copyIcon.value = "copy"), 1000)
diff --git a/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue
index 79652d54f..db00a34f2 100644
--- a/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue
+++ b/packages/hoppscotch-app/components/lenses/renderers/JSONLensRenderer.vue
@@ -74,7 +74,7 @@
{}
[]
- {{ item.index.toString() }}
+ {{ item.index }}
{{ item.name }}
@@ -87,7 +87,7 @@
{
jumpCursor(arrayMember)
@@ -235,7 +235,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
- $toast.success(t("state.download_started").toString(), {
+ $toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
setTimeout(() => {
@@ -257,7 +257,7 @@ const outlinePath = computed(() => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
- $toast.success(t("state.copied_to_clipboard").toString(), {
+ $toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
setTimeout(() => (copyIcon.value = "copy"), 1000)
diff --git a/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue
index 9203bddc2..c6beccdcc 100644
--- a/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue
+++ b/packages/hoppscotch-app/components/lenses/renderers/RawLensRenderer.vue
@@ -117,7 +117,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
- $toast.success(t("state.download_started").toString(), {
+ $toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
setTimeout(() => {
@@ -130,7 +130,7 @@ const downloadResponse = () => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
- $toast.success(t("state.copied_to_clipboard").toString(), {
+ $toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
setTimeout(() => (copyIcon.value = "copy"), 1000)
diff --git a/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue b/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue
index 25d173c91..bc409c0a0 100644
--- a/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue
+++ b/packages/hoppscotch-app/components/lenses/renderers/XMLLensRenderer.vue
@@ -118,7 +118,7 @@ const downloadResponse = () => {
document.body.appendChild(a)
a.click()
downloadIcon.value = "check"
- $toast.success(t("state.download_started").toString(), {
+ $toast.success(`${t("state.download_started")}`, {
icon: "downloading",
})
setTimeout(() => {
@@ -131,7 +131,7 @@ const downloadResponse = () => {
const copyResponse = () => {
copyToClipboard(responseBodyText.value)
copyIcon.value = "check"
- $toast.success(t("state.copied_to_clipboard").toString(), {
+ $toast.success(`${t("state.copied_to_clipboard")}`, {
icon: "content_paste",
})
setTimeout(() => (copyIcon.value = "copy"), 1000)
diff --git a/packages/hoppscotch-app/components/smart/ChangeLanguage.vue b/packages/hoppscotch-app/components/smart/ChangeLanguage.vue
index f85337b18..b1293cc88 100644
--- a/packages/hoppscotch-app/components/smart/ChangeLanguage.vue
+++ b/packages/hoppscotch-app/components/smart/ChangeLanguage.vue
@@ -19,7 +19,7 @@
v-for="(locale, index) in $i18n.locales.filter(
({ code }) => code !== $i18n.locale
)"
- :key="`locale-${index}`"
+ :key="`locale-${String(index)}`"
:to="switchLocalePath(locale.code)"
@click="$refs.language.tippy().hide()"
>
diff --git a/packages/hoppscotch-app/components/smart/EnvInput.vue b/packages/hoppscotch-app/components/smart/EnvInput.vue
index 0040ca44e..bd31c9a7f 100644
--- a/packages/hoppscotch-app/components/smart/EnvInput.vue
+++ b/packages/hoppscotch-app/components/smart/EnvInput.vue
@@ -384,10 +384,10 @@ export default defineComponent({
const preSelectionRange = range.cloneRange()
preSelectionRange.selectNodeContents(containerEl)
preSelectionRange.setEnd(range.startContainer, range.startOffset)
- start = preSelectionRange.toString().length
+ start = `${preSelectionRange}`.length
return {
start,
- end: start + range.toString().length,
+ end: start + `${range}`.length,
}
} else if (document.selection) {
const selectedTextRange = document.selection.createRange()
diff --git a/packages/hoppscotch-app/components/smart/FontSizePicker.vue b/packages/hoppscotch-app/components/smart/FontSizePicker.vue
index 5b862ba83..042f5a571 100644
--- a/packages/hoppscotch-app/components/smart/FontSizePicker.vue
+++ b/packages/hoppscotch-app/components/smart/FontSizePicker.vue
@@ -9,19 +9,23 @@
class="pr-8"
svg="type"
outline
- :label="getFontSizeName(fontSizes.find((size) => size == active))"
+ :label="`${getFontSizeName(
+ fontSizes.find((size) => size == active)
+ )}`"
/>
{
+ setActiveFont(size)
+ $refs.fontSize.tippy().hide()
+ }
"
/>
diff --git a/packages/hoppscotch-app/components/smart/Tabs.vue b/packages/hoppscotch-app/components/smart/Tabs.vue
index 6f229af58..0c2dc2d95 100644
--- a/packages/hoppscotch-app/components/smart/Tabs.vue
+++ b/packages/hoppscotch-app/components/smart/Tabs.vue
@@ -17,7 +17,7 @@
{{ tab.icon }}
{{ tab.label }}
-
+
{{ tab.info }}
diff --git a/packages/hoppscotch-app/components/teams/Team.vue b/packages/hoppscotch-app/components/teams/Team.vue
index 06d8a59b2..029a9f1b1 100644
--- a/packages/hoppscotch-app/components/teams/Team.vue
+++ b/packages/hoppscotch-app/components/teams/Team.vue
@@ -35,8 +35,10 @@
svg="edit"
:label="$t('action.edit')"
@click.native="
- $emit('edit-team')
- $refs.options.tippy().hide()
+ () => {
+ $emit('edit-team')
+ $refs.options.tippy().hide()
+ }
"
/>
{
+ deleteTeam()
+ $refs.options.tippy().hide()
+ }
"
/>
{
+ exitTeam()
+ $refs.options.tippy().hide()
+ }
"
/>
diff --git a/packages/hoppscotch-app/helpers/codegen/codegen.ts b/packages/hoppscotch-app/helpers/codegen/codegen.ts
index 88c057e70..ebeb3e6dc 100644
--- a/packages/hoppscotch-app/helpers/codegen/codegen.ts
+++ b/packages/hoppscotch-app/helpers/codegen/codegen.ts
@@ -157,7 +157,7 @@ function getCodegenGeneralRESTInfo(
params: request.effectiveFinalParams.map((x) => ({ ...x, active: true })),
method: request.method,
url: urlObj.origin,
- queryString: urlObj.searchParams.toString(),
+ queryString: `${urlObj.searchParams}`,
pathName: urlObj.pathname,
}
}
diff --git a/packages/hoppscotch-app/helpers/codegen/generators/php-curl.js b/packages/hoppscotch-app/helpers/codegen/generators/php-curl.js
index 3b58d6cfd..0b71d9766 100644
--- a/packages/hoppscotch-app/helpers/codegen/generators/php-curl.js
+++ b/packages/hoppscotch-app/helpers/codegen/generators/php-curl.js
@@ -64,7 +64,7 @@ export const PhpCurlCodegen = {
} else {
const requestObject = JSON.parse(requestBody)
requestBody = `"${Object.keys(requestObject)
- .map((key) => `${key}=${requestObject[key].toString()}`)
+ .map((key) => `${key}=${requestObject[key]}`)
.join("&")}"`
}
}
diff --git a/packages/hoppscotch-app/helpers/postwomanTesting.ts b/packages/hoppscotch-app/helpers/postwomanTesting.ts
index 8e954c3e0..4057e905a 100644
--- a/packages/hoppscotch-app/helpers/postwomanTesting.ts
+++ b/packages/hoppscotch-app/helpers/postwomanTesting.ts
@@ -50,7 +50,7 @@ export default function runTestScriptWithVariables(
} catch (e: any) {
pw._testReports.push({
result: "ERROR",
- message: e.toString(),
+ message: `${e}`,
styles: styles.ERROR,
})
}
diff --git a/packages/hoppscotch-app/layouts/default.vue b/packages/hoppscotch-app/layouts/default.vue
index 544568052..e58de7b2c 100644
--- a/packages/hoppscotch-app/layouts/default.vue
+++ b/packages/hoppscotch-app/layouts/default.vue
@@ -171,12 +171,12 @@ export default defineComponent({
if (workbox) {
workbox.addEventListener("installed", (event: any) => {
if (event.isUpdate) {
- this.$toast.show(this.$t("app.new_version_found").toString(), {
+ this.$toast.show(`${this.$t("app.new_version_found")}`, {
icon: "download_for_offline",
duration: 0,
action: [
{
- text: this.$t("app.reload").toString(),
+ text: `${this.$t("app.reload")}`,
onClick: (_, toastObject) => {
toastObject.goAway(0)
window.location.reload()
diff --git a/packages/hoppscotch-app/locales/en.json b/packages/hoppscotch-app/locales/en.json
index 8af61b8b7..e6c1bd351 100644
--- a/packages/hoppscotch-app/locales/en.json
+++ b/packages/hoppscotch-app/locales/en.json
@@ -480,8 +480,10 @@
"title": "Teams"
},
"test": {
+ "failed": "test failed",
"javascript_code": "JavaScript Code",
"learn": "Read documentation",
+ "passed": "test passed",
"report": "Test Report",
"results": "Test Results",
"script": "Script",
diff --git a/packages/hoppscotch-app/newstore/collections.ts b/packages/hoppscotch-app/newstore/collections.ts
index 244238a1d..2a9ca8c56 100644
--- a/packages/hoppscotch-app/newstore/collections.ts
+++ b/packages/hoppscotch-app/newstore/collections.ts
@@ -260,7 +260,6 @@ const restCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve path '${path}'. Ignoring editRequest dispatch.`
)
-
return {}
}
@@ -287,7 +286,6 @@ const restCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve path '${path}'. Ignoring saveRequestAs dispatch.`
)
-
return {}
}
@@ -312,7 +310,6 @@ const restCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve path '${path}'. Ignoring removeRequest dispatch.`
)
-
return {}
}
@@ -364,7 +361,6 @@ const restCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve destination path '${destinationPath}'. Skipping moveRequest dispatch.`
)
-
return {}
}
@@ -533,7 +529,6 @@ const gqlCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve path '${path}'. Ignoring editRequest dispatch.`
)
-
return {}
}
@@ -560,7 +555,6 @@ const gqlCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve path '${path}'. Ignoring saveRequestAs dispatch.`
)
-
return {}
}
@@ -585,7 +579,6 @@ const gqlCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve path '${path}'. Ignoring removeRequest dispatch.`
)
-
return {}
}
@@ -637,7 +630,6 @@ const gqlCollectionDispatchers = defineDispatchers({
console.log(
`Could not resolve destination path '${destinationPath}'. Skipping moveRequest dispatch.`
)
-
return {}
}
diff --git a/packages/hoppscotch-app/newstore/environments.ts b/packages/hoppscotch-app/newstore/environments.ts
index a172476d4..c3555d911 100644
--- a/packages/hoppscotch-app/newstore/environments.ts
+++ b/packages/hoppscotch-app/newstore/environments.ts
@@ -39,7 +39,6 @@ const dispatchers = defineDispatchers({
console.log(
`Ignoring possibly invalid current environment index assignment (value: ${newIndex})`
)
-
return {}
}
diff --git a/packages/hoppscotch-app/pages/index.vue b/packages/hoppscotch-app/pages/index.vue
index 147b286a2..8d13e84c7 100644
--- a/packages/hoppscotch-app/pages/index.vue
+++ b/packages/hoppscotch-app/pages/index.vue
@@ -11,37 +11,40 @@
-
+
-
+
-
+
@@ -60,15 +63,19 @@
>