From dcc59f42fa66257266d02951453b2cbfc9b05cba Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Tue, 31 Aug 2021 21:54:24 +0530 Subject: [PATCH] fix: remove // from key on disabled bulk edit entries --- components/graphql/RequestOptions.vue | 8 +++++--- components/http/Headers.vue | 8 +++++--- components/http/ImportCurl.vue | 2 +- components/http/Parameters.vue | 8 +++++--- nuxt.config.js | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/components/graphql/RequestOptions.vue b/components/graphql/RequestOptions.vue index a27716ac8..0aba1a240 100644 --- a/components/graphql/RequestOptions.vue +++ b/components/graphql/RequestOptions.vue @@ -181,7 +181,9 @@ class=" bg-transparent border-b border-dividerLight - flex flex-1 + flex + font-mono + flex-1 py-2 px-4 whitespace-pre @@ -368,8 +370,8 @@ export default defineComponent({ watch(bulkHeaders, () => { try { const transformation = bulkHeaders.value.split("\n").map((item) => ({ - key: item.substr(0, item.indexOf(":")).trim(), - value: item.substr(item.indexOf(":") + 1).trim(), + key: item.substring(0, item.indexOf(":")).trim().replace(/^\/\//, ""), + value: item.substring(item.indexOf(":") + 1).trim(), active: !item.trim().startsWith("//"), })) setGQLHeaders(transformation) diff --git a/components/http/Headers.vue b/components/http/Headers.vue index 69bc6196c..3294219b8 100644 --- a/components/http/Headers.vue +++ b/components/http/Headers.vue @@ -55,7 +55,9 @@ class=" bg-transparent border-b border-dividerLight - flex flex-1 + flex + font-mono + flex-1 py-2 px-4 whitespace-pre @@ -225,8 +227,8 @@ export default defineComponent({ watch(bulkHeaders, () => { try { const transformation = bulkHeaders.value.split("\n").map((item) => ({ - key: item.substr(0, item.indexOf(":")).trim(), - value: item.substr(item.indexOf(":") + 1).trim(), + key: item.substring(0, item.indexOf(":")).trim().replace(/^\/\//, ""), + value: item.substring(item.indexOf(":") + 1).trim(), active: !item.trim().startsWith("//"), })) setRESTHeaders(transformation) diff --git a/components/http/ImportCurl.vue b/components/http/ImportCurl.vue index 79aba62f0..7e7ae3657 100644 --- a/components/http/ImportCurl.vue +++ b/components/http/ImportCurl.vue @@ -5,7 +5,7 @@ ({ - key: item.substr(0, item.indexOf(":")).trim(), - value: item.substr(item.indexOf(":") + 1).trim(), + key: item.substring(0, item.indexOf(":")).trim().replace(/^\/\//, ""), + value: item.substring(item.indexOf(":") + 1).trim(), active: !item.trim().startsWith("//"), })) setRESTParams(transformation) diff --git a/nuxt.config.js b/nuxt.config.js index e72bcbfbd..fb856f486 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -214,7 +214,7 @@ export default { families: { Inter: [400, 500, 600, 700, 800], "Material+Icons": true, - "Roboto+Mono": true, + "Roboto+Mono": [500], }, },