From 4867df5fe844eebbd438277ffa3fafe7d830c828 Mon Sep 17 00:00:00 2001 From: Dmitry Yankowski Date: Tue, 25 Feb 2020 11:10:40 -0500 Subject: [PATCH] Push updated files --- components/section.vue | 29 ++- layouts/default.vue | 21 +- pages/graphql.vue | 424 +++++++++++++++++++---------------------- pages/index.vue | 36 ++-- 4 files changed, 226 insertions(+), 284 deletions(-) diff --git a/components/section.vue b/components/section.vue index 2c6e1082b..46aa973d6 100644 --- a/components/section.vue +++ b/components/section.vue @@ -6,10 +6,7 @@ {{ isCollapsed(label) ? "expand_more" : "expand_less" }} -
+
@@ -25,11 +22,11 @@ fieldset.no-colored-frames legend { export default { computed: { frameColorsEnabled() { - return this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false; + return this.$store.state.postwoman.settings.FRAME_COLORS_ENABLED || false }, sectionString() { - return `${this.$route.path}/${this.label}`; - } + return `${this.$route.path}/${this.label}` + }, }, props: { @@ -44,18 +41,14 @@ export default { methods: { collapse({ target }) { - const parent = target.parentNode.parentNode; - parent.querySelector(".collapsible").classList.toggle("hidden"); + const parent = target.parentNode.parentNode + parent.querySelector(".collapsible").classList.toggle("hidden") // Save collapsed section into the collapsedSections array - this.$store.commit("setCollapsedSection", this.sectionString); + this.$store.commit("setCollapsedSection", this.sectionString) }, isCollapsed(label) { - return ( - this.$store.state.theme.collapsedSections.includes( - this.sectionString - ) || false - ); - } - } -}; + return this.$store.state.theme.collapsedSections.includes(this.sectionString) || false + }, + }, +} diff --git a/layouts/default.vue b/layouts/default.vue index d2af4f703..996759827 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -757,8 +757,7 @@ export default { ], }) } - let showExtensionsToast = - localStorage.getItem("showExtensionsToast") === "yes"; + let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes" // Just return if showExtensionsToast is "no" if (!showExtensionsToast) return @@ -783,15 +782,15 @@ export default { onClick: (e, toastObject) => { this.$store.commit("setMiscState", { value: false, - attribute: "showExtensionsToast" - }); - localStorage.setItem("showExtensionsToast", "no"); - toastObject.goAway(0); - } - } - ] - }); - }, 15000); + attribute: "showExtensionsToast", + }) + localStorage.setItem("showExtensionsToast", "no") + toastObject.goAway(0) + }, + }, + ], + }) + }, 15000) } this._keyListener = function(e) { diff --git a/pages/graphql.vue b/pages/graphql.vue index a811cc17a..5634bdc11 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -32,11 +32,7 @@
-
@@ -61,7 +57,7 @@ @input=" $store.commit('setGQLHeaderKey', { index, - value: $event + value: $event, }) " autofocus @@ -75,7 +71,7 @@ @change=" $store.commit('setGQLHeaderValue', { index, - value: $event.target.value + value: $event.target.value, }) " autofocus @@ -113,9 +109,7 @@ @click="ToggleExpandResponse" ref="ToggleExpandResponse" v-tooltip="{ - content: !expandResponse - ? $t('expand_response') - : $t('collapse_response') + content: !expandResponse ? $t('expand_response') : $t('collapse_response'), }" > @@ -150,7 +144,7 @@ autoScrollEditorIntoView: true, readOnly: true, showPrintMargin: false, - useWorker: false + useWorker: false, }" /> @@ -181,7 +175,7 @@ fontSize: '16px', autoScrollEditorIntoView: true, showPrintMargin: false, - useWorker: false + useWorker: false, }" /> @@ -196,7 +190,7 @@ fontSize: '16px', autoScrollEditorIntoView: true, showPrintMargin: false, - useWorker: false + useWorker: false, }" /> @@ -225,7 +219,7 @@ autoScrollEditorIntoView: true, readOnly: true, showPrintMargin: false, - useWorker: false + useWorker: false, }" /> @@ -245,10 +239,7 @@
- +
@@ -264,10 +255,7 @@
- +
@@ -283,10 +271,7 @@
- +
@@ -301,15 +286,8 @@ {{ $t("types") }}
-
- +
+
@@ -342,17 +320,17 @@ diff --git a/pages/index.vue b/pages/index.vue index d2a46209c..9626c78cc 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1443,12 +1443,11 @@ export default { settings: { SCROLL_INTO_ENABLED: - typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== - "undefined" + typeof this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED !== "undefined" ? this.$store.state.postwoman.settings.SCROLL_INTO_ENABLED - : true - } - }; + : true, + }, + } }, watch: { urlExcludes: { @@ -1970,21 +1969,14 @@ export default { behavior: "smooth", }) }, - handleUseHistory({ - label, - method, - url, - path, - usesScripts, - preRequestScript - }) { - this.label = label; - this.method = method; - this.url = url; - this.path = path; - this.showPreRequestScript = usesScripts; - this.preRequestScript = preRequestScript; - this.settings.SCROLL_INTO_ENABLED && this.scrollInto("request"); + handleUseHistory({ label, method, url, path, usesScripts, preRequestScript }) { + this.label = label + this.method = method + this.url = url + this.path = path + this.showPreRequestScript = usesScripts + this.preRequestScript = preRequestScript + this.settings.SCROLL_INTO_ENABLED && this.scrollInto("request") }, getVariablesFromPreRequestScript() { if (!this.preRequestScript) { @@ -2019,8 +2011,8 @@ export default { return await sendNetworkRequest(requestOptions, this.$store) }, async sendRequest() { - this.$toast.clear(); - this.settings.SCROLL_INTO_ENABLED && this.scrollInto("response"); + this.$toast.clear() + this.settings.SCROLL_INTO_ENABLED && this.scrollInto("response") if (!this.isValidURL) { this.$toast.error(this.$t("url_invalid_format"), {