|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<SmartTabs styles="sticky bg-primary top-upperPrimaryStickyFold z-10">
|
|
<SmartTabs styles="sticky bg-primary top-upperPrimaryStickyFold z-10">
|
|
- <SmartTab :id="'query'" :label="$t('tab.query')" :selected="true">
|
|
|
|
|
|
+ <SmartTab :id="'query'" :label="`${$t('tab.query')}`" :selected="true">
|
|
<AppSection label="query">
|
|
<AppSection label="query">
|
|
<div
|
|
<div
|
|
class="
|
|
class="
|
|
@@ -22,7 +22,7 @@
|
|
</label>
|
|
</label>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
<ButtonSecondary
|
|
<ButtonSecondary
|
|
- :label="$t('request.run')"
|
|
|
|
|
|
+ :label="`${$t('request.run')}`"
|
|
svg="play"
|
|
svg="play"
|
|
class="rounded-none !text-accent"
|
|
class="rounded-none !text-accent"
|
|
@click.native="runQuery()"
|
|
@click.native="runQuery()"
|
|
@@ -59,7 +59,7 @@
|
|
</AppSection>
|
|
</AppSection>
|
|
</SmartTab>
|
|
</SmartTab>
|
|
|
|
|
|
- <SmartTab :id="'variables'" :label="$t('tab.variables')">
|
|
|
|
|
|
+ <SmartTab :id="'variables'" :label="`${$t('tab.variables')}`">
|
|
<AppSection label="variables">
|
|
<AppSection label="variables">
|
|
<div
|
|
<div
|
|
class="
|
|
class="
|
|
@@ -97,7 +97,7 @@
|
|
</AppSection>
|
|
</AppSection>
|
|
</SmartTab>
|
|
</SmartTab>
|
|
|
|
|
|
- <SmartTab :id="'headers'" :label="$t('tab.headers')">
|
|
|
|
|
|
+ <SmartTab :id="'headers'" :label="`${$t('tab.headers')}`">
|
|
<AppSection label="headers">
|
|
<AppSection label="headers">
|
|
<div
|
|
<div
|
|
class="
|
|
class="
|
|
@@ -158,7 +158,7 @@
|
|
"
|
|
"
|
|
>
|
|
>
|
|
<SmartAutoComplete
|
|
<SmartAutoComplete
|
|
- :placeholder="$t('count.header', { count: index + 1 })"
|
|
|
|
|
|
+ :placeholder="`${$t('count.header', { count: index + 1 })}`"
|
|
:source="commonHeaders"
|
|
:source="commonHeaders"
|
|
:spellcheck="false"
|
|
:spellcheck="false"
|
|
:value="header.key"
|
|
:value="header.key"
|
|
@@ -182,9 +182,7 @@
|
|
/>
|
|
/>
|
|
<input
|
|
<input
|
|
class="bg-transparent flex flex-1 py-2 px-4"
|
|
class="bg-transparent flex flex-1 py-2 px-4"
|
|
- :placeholder="
|
|
|
|
- $t('count.value', { count: index + 1 }).toString()
|
|
|
|
- "
|
|
|
|
|
|
+ :placeholder="`${$t('count.value', { count: index + 1 })}`"
|
|
:name="`value ${index}`"
|
|
:name="`value ${index}`"
|
|
:value="header.value"
|
|
:value="header.value"
|
|
autofocus
|
|
autofocus
|
|
@@ -247,7 +245,7 @@
|
|
{{ $t("empty.headers") }}
|
|
{{ $t("empty.headers") }}
|
|
</span>
|
|
</span>
|
|
<ButtonSecondary
|
|
<ButtonSecondary
|
|
- :label="$t('add.new')"
|
|
|
|
|
|
+ :label="`${$t('add.new')}`"
|
|
filled
|
|
filled
|
|
svg="plus"
|
|
svg="plus"
|
|
@click.native="addRequestHeader"
|
|
@click.native="addRequestHeader"
|
|
@@ -326,7 +324,7 @@ watch(bulkHeaders, () => {
|
|
}))
|
|
}))
|
|
setGQLHeaders(transformation)
|
|
setGQLHeaders(transformation)
|
|
} catch (e) {
|
|
} catch (e) {
|
|
- $toast.error(t("error.something_went_wrong").toString(), {
|
|
|
|
|
|
+ $toast.error(`${t("error.something_went_wrong")}`, {
|
|
icon: "error_outline",
|
|
icon: "error_outline",
|
|
})
|
|
})
|
|
console.error(e)
|
|
console.error(e)
|
|
@@ -343,7 +341,7 @@ const bulkEditor = ref<any | null>(null)
|
|
useCodemirror(bulkEditor, bulkHeaders, {
|
|
useCodemirror(bulkEditor, bulkHeaders, {
|
|
extendedEditorConfig: {
|
|
extendedEditorConfig: {
|
|
mode: "text/x-yaml",
|
|
mode: "text/x-yaml",
|
|
- placeholder: t("state.bulk_mode_placeholder").toString(),
|
|
|
|
|
|
+ placeholder: `${t("state.bulk_mode_placeholder")}`,
|
|
},
|
|
},
|
|
linter: null,
|
|
linter: null,
|
|
completer: null,
|
|
completer: null,
|
|
@@ -354,7 +352,7 @@ const variableEditor = ref<any | null>(null)
|
|
useCodemirror(variableEditor, variableString, {
|
|
useCodemirror(variableEditor, variableString, {
|
|
extendedEditorConfig: {
|
|
extendedEditorConfig: {
|
|
mode: "application/ld+json",
|
|
mode: "application/ld+json",
|
|
- placeholder: t("request.variables").toString(),
|
|
|
|
|
|
+ placeholder: `${t("request.variables")}`,
|
|
},
|
|
},
|
|
linter: jsonLinter,
|
|
linter: jsonLinter,
|
|
completer: null,
|
|
completer: null,
|
|
@@ -366,7 +364,7 @@ const schemaString = useReadonlyStream(props.conn.schema$, null)
|
|
useCodemirror(queryEditor, gqlQueryString, {
|
|
useCodemirror(queryEditor, gqlQueryString, {
|
|
extendedEditorConfig: {
|
|
extendedEditorConfig: {
|
|
mode: "graphql",
|
|
mode: "graphql",
|
|
- placeholder: t("request.query").toString(),
|
|
|
|
|
|
+ placeholder: `${t("request.query")}`,
|
|
},
|
|
},
|
|
linter: createGQLQueryLinter(schemaString),
|
|
linter: createGQLQueryLinter(schemaString),
|
|
completer: queryCompleter(schemaString),
|
|
completer: queryCompleter(schemaString),
|
|
@@ -409,7 +407,7 @@ const runQuery = async () => {
|
|
const startTime = Date.now()
|
|
const startTime = Date.now()
|
|
|
|
|
|
nuxt.value.$loading.start()
|
|
nuxt.value.$loading.start()
|
|
- response.value = t("state.loading").toString()
|
|
|
|
|
|
+ response.value = `${t("state.loading")}`
|
|
|
|
|
|
try {
|
|
try {
|
|
const runURL = clone(url.value)
|
|
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",
|
|
icon: "done",
|
|
})
|
|
})
|
|
} catch (e: any) {
|
|
} catch (e: any) {
|
|
response.value = `${e}. ${t("error.check_console_details")}`
|
|
response.value = `${e}. ${t("error.check_console_details")}`
|
|
nuxt.value.$loading.finish()
|
|
nuxt.value.$loading.finish()
|
|
|
|
|
|
- $toast.error(`${e} ${t("error.f12_details").toString()}`, {
|
|
|
|
|
|
+ $toast.error(`${e} ${t("error.f12_details")}`, {
|
|
icon: "error_outline",
|
|
icon: "error_outline",
|
|
})
|
|
})
|
|
console.error(e)
|
|
console.error(e)
|
|
@@ -470,7 +468,7 @@ const prettifyQuery = () => {
|
|
try {
|
|
try {
|
|
gqlQueryString.value = gql.print(gql.parse(gqlQueryString.value))
|
|
gqlQueryString.value = gql.print(gql.parse(gqlQueryString.value))
|
|
} catch (e) {
|
|
} catch (e) {
|
|
- $toast.error(t("error.gql_prettify_invalid_query").toString(), {
|
|
|
|
|
|
+ $toast.error(`${t("error.gql_prettify_invalid_query")}`, {
|
|
icon: "error_outline",
|
|
icon: "error_outline",
|
|
})
|
|
})
|
|
}
|
|
}
|