From e1e763575de9a5aee8758946df1b560951f40f82 Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Sat, 18 Sep 2021 16:09:58 +0530 Subject: [PATCH] perf: template literals --- .../hoppscotch-app/components/app/Header.vue | 6 +-- .../components/app/PowerSearch.vue | 2 +- .../components/app/PowerSearchEntry.vue | 2 +- .../hoppscotch-app/components/app/Share.vue | 2 +- .../components/app/Shortcuts.vue | 2 +- .../components/app/ShortcutsEntry.vue | 2 +- .../components/collections/ChooseType.vue | 8 ++-- .../components/collections/ImportExport.vue | 18 ++++++--- .../components/collections/SaveRequest.vue | 12 +++--- .../components/collections/graphql/Add.vue | 8 ++-- .../collections/graphql/Collection.vue | 38 +++++++++++-------- .../components/collections/graphql/Edit.vue | 12 ++++-- .../collections/graphql/EditFolder.vue | 11 ++++-- .../collections/graphql/EditRequest.vue | 15 ++++++-- .../components/collections/graphql/Folder.vue | 34 ++++++++++------- .../collections/graphql/Request.vue | 28 ++++++++------ .../components/collections/my/Collection.vue | 28 ++++++++------ .../components/collections/my/Folder.vue | 28 ++++++++------ .../collections/teams/Collection.vue | 24 +++++++----- .../components/collections/teams/Folder.vue | 28 ++++++++------ .../components/environments/Add.vue | 12 ++++-- .../components/environments/Edit.vue | 20 ++++++---- .../components/environments/Environment.vue | 20 ++++++---- .../components/environments/index.vue | 24 +++++++----- .../components/firebase/Login.vue | 22 +++++------ .../components/firebase/Logout.vue | 14 ++++--- .../components/graphql/RequestOptions.vue | 32 ++++++++-------- .../components/graphql/Response.vue | 4 +- .../components/graphql/Sidebar.vue | 16 ++++---- .../components/graphql/TypeLink.vue | 2 +- .../components/history/index.vue | 10 ++--- .../components/history/rest/Card.vue | 10 ++--- .../hoppscotch-app/components/http/Body.vue | 14 ++++--- .../components/http/BodyParameters.vue | 10 ++--- .../components/http/CodegenModal.vue | 8 ++-- .../components/http/Headers.vue | 12 +++--- .../components/http/ImportCurl.vue | 14 +++---- .../components/http/OAuth2Authorization.vue | 6 +-- .../components/http/Parameters.vue | 16 ++++---- .../components/http/PreRequestScript.vue | 6 +-- .../components/http/RawBody.vue | 8 ++-- .../components/http/Request.vue | 26 ++++++------- .../components/http/TestResult.vue | 8 ++-- .../components/http/TestResultEntry.vue | 4 +- .../hoppscotch-app/components/http/Tests.vue | 6 +-- .../lenses/ResponseBodyRenderer.vue | 2 +- .../lenses/renderers/HTMLLensRenderer.vue | 4 +- .../lenses/renderers/JSONLensRenderer.vue | 8 ++-- .../lenses/renderers/RawLensRenderer.vue | 4 +- .../lenses/renderers/XMLLensRenderer.vue | 4 +- .../components/smart/ChangeLanguage.vue | 2 +- .../components/smart/EnvInput.vue | 4 +- .../components/smart/FontSizePicker.vue | 12 ++++-- .../hoppscotch-app/components/smart/Tabs.vue | 2 +- .../hoppscotch-app/components/teams/Team.vue | 18 ++++++--- .../hoppscotch-app/helpers/codegen/codegen.ts | 2 +- .../helpers/codegen/generators/php-curl.js | 2 +- .../helpers/postwomanTesting.ts | 2 +- packages/hoppscotch-app/layouts/default.vue | 4 +- packages/hoppscotch-app/locales/en.json | 2 + .../hoppscotch-app/newstore/collections.ts | 8 ---- .../hoppscotch-app/newstore/environments.ts | 1 - packages/hoppscotch-app/pages/index.vue | 35 ++++++++++------- packages/hoppscotch-app/pages/settings.vue | 10 +++-- 64 files changed, 425 insertions(+), 333 deletions(-) diff --git a/packages/hoppscotch-app/components/app/Header.vue b/packages/hoppscotch-app/components/app/Header.vue index 567e969a7..283e58b48 100644 --- a/packages/hoppscotch-app/components/app/Header.vue +++ b/packages/hoppscotch-app/components/app/Header.vue @@ -137,12 +137,12 @@ export default defineComponent({ const cookiesAllowed = getLocalConfig("cookiesAllowed") === "yes" if (!cookiesAllowed) { - this.$toast.show(this.$t("app.we_use_cookies").toString(), { + this.$toast.show(this.$t("app.we_use_cookies"), { icon: "cookie", duration: 0, action: [ { - text: this.$t("action.learn_more").toString(), + text: this.$t("action.learn_more"), onClick: (_, toastObject) => { setLocalConfig("cookiesAllowed", "yes") toastObject.goAway(0) @@ -152,7 +152,7 @@ export default defineComponent({ }, }, { - text: this.$t("action.dismiss").toString(), + text: this.$t("action.dismiss"), onClick: (_, toastObject) => { setLocalConfig("cookiesAllowed", "yes") toastObject.goAway(0) diff --git a/packages/hoppscotch-app/components/app/PowerSearch.vue b/packages/hoppscotch-app/components/app/PowerSearch.vue index ad402751c..054440755 100644 --- a/packages/hoppscotch-app/components/app/PowerSearch.vue +++ b/packages/hoppscotch-app/components/app/PowerSearch.vue @@ -8,7 +8,7 @@ type="text" autocomplete="off" name="command" - :placeholder="$t('app.type_a_command_search').toString()" + :placeholder="`${$t('app.type_a_command_search')}`" class=" bg-transparent border-b border-dividerLight diff --git a/packages/hoppscotch-app/components/app/PowerSearchEntry.vue b/packages/hoppscotch-app/components/app/PowerSearchEntry.vue index 2b25f9eff..158761f1a 100644 --- a/packages/hoppscotch-app/components/app/PowerSearchEntry.vue +++ b/packages/hoppscotch-app/components/app/PowerSearchEntry.vue @@ -40,7 +40,7 @@ {{ key }} diff --git a/packages/hoppscotch-app/components/app/Share.vue b/packages/hoppscotch-app/components/app/Share.vue index cbe9d1db7..abba3c85e 100644 --- a/packages/hoppscotch-app/components/app/Share.vue +++ b/packages/hoppscotch-app/components/app/Share.vue @@ -88,7 +88,7 @@ export default defineComponent({ copyAppLink() { copyToClipboard(this.url) this.copyIcon = "check" - this.$toast.success(this.$t("state.copied_to_clipboard").toString(), { + this.$toast.success(this.$t("state.copied_to_clipboard"), { icon: "content_paste", }) setTimeout(() => (this.copyIcon = "copy"), 1000) diff --git a/packages/hoppscotch-app/components/app/Shortcuts.vue b/packages/hoppscotch-app/components/app/Shortcuts.vue index 0dc91afdc..05d07033f 100644 --- a/packages/hoppscotch-app/components/app/Shortcuts.vue +++ b/packages/hoppscotch-app/components/app/Shortcuts.vue @@ -36,7 +36,7 @@ px-4 focus-visible:border-divider " - :placeholder="$t('action.search')" + :placeholder="`${$t('action.search')}`" /> diff --git a/packages/hoppscotch-app/components/app/ShortcutsEntry.vue b/packages/hoppscotch-app/components/app/ShortcutsEntry.vue index 7115cc821..b4ceadd6b 100644 --- a/packages/hoppscotch-app/components/app/ShortcutsEntry.vue +++ b/packages/hoppscotch-app/components/app/ShortcutsEntry.vue @@ -5,7 +5,7 @@ {{ key }} diff --git a/packages/hoppscotch-app/components/collections/ChooseType.vue b/packages/hoppscotch-app/components/collections/ChooseType.vue index 3bea3010e..01665ed55 100644 --- a/packages/hoppscotch-app/components/collections/ChooseType.vue +++ b/packages/hoppscotch-app/components/collections/ChooseType.vue @@ -3,13 +3,13 @@
@@ -43,8 +43,8 @@ diff --git a/packages/hoppscotch-app/components/collections/ImportExport.vue b/packages/hoppscotch-app/components/collections/ImportExport.vue index f21a5c5c9..d3855dbd0 100644 --- a/packages/hoppscotch-app/components/collections/ImportExport.vue +++ b/packages/hoppscotch-app/components/collections/ImportExport.vue @@ -12,8 +12,10 @@ class="rounded" svg="arrow-left" @click.native=" - mode = 'import_export' - mySelectedCollectionID = undefined + () => { + mode = 'import_export' + mySelectedCollectionID = undefined + } " /> @@ -39,8 +41,10 @@ icon="assignment_returned" :label="$t('import.from_gist')" @click.native=" - readCollectionGist - $refs.options.tippy().hide() + () => { + readCollectionGist + $refs.options.tippy().hide() + } " /> diff --git a/packages/hoppscotch-app/components/collections/SaveRequest.vue b/packages/hoppscotch-app/components/collections/SaveRequest.vue index 58daaea7d..bdc926ee5 100644 --- a/packages/hoppscotch-app/components/collections/SaveRequest.vue +++ b/packages/hoppscotch-app/components/collections/SaveRequest.vue @@ -1,7 +1,7 @@