Lint + ES6
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
@mixin baseTheme {
|
@mixin baseTheme {
|
||||||
--font-body: "Poppins", "sans-serif";
|
--font-body: "Poppins", "sans-serif";
|
||||||
--font-mono: "Roboto Mono", "monoscpace";
|
--font-mono: "Roboto Mono", "monospace";
|
||||||
--font-icon: "Material Icons";
|
--font-icon: "Material Icons";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
importFromPostman({ name, values }) {
|
importFromPostman({ name, values }) {
|
||||||
let environment = { name: name, variables: [] }
|
let environment = { name, variables: [] }
|
||||||
values.forEach(({ key, value }) => environment.variables.push({ key: key, value: value }))
|
values.forEach(({ key, value }) => environment.variables.push({ key, value }))
|
||||||
let environments = [environment]
|
let environments = [environment]
|
||||||
this.importFromPostwoman(environments)
|
this.importFromPostwoman(environments)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -471,12 +471,12 @@ export default {
|
|||||||
|
|
||||||
if (!fields || fields.length === 0) return []
|
if (!fields || fields.length === 0) return []
|
||||||
|
|
||||||
return fields.filter((field) => {
|
return fields.filter((field) =>
|
||||||
return this.isTextFoundInGraphqlFieldObject({
|
this.isTextFoundInGraphqlFieldObject({
|
||||||
text: this.graphqlFieldsFilterText,
|
text: this.graphqlFieldsFilterText,
|
||||||
graphqlFieldObject: field,
|
graphqlFieldObject: field,
|
||||||
})
|
})
|
||||||
})
|
)
|
||||||
},
|
},
|
||||||
isTextFoundInGraphqlFieldObject({ text, graphqlFieldObject }) {
|
isTextFoundInGraphqlFieldObject({ text, graphqlFieldObject }) {
|
||||||
const normalizedText = text.toLowerCase()
|
const normalizedText = text.toLowerCase()
|
||||||
@@ -491,9 +491,9 @@ export default {
|
|||||||
getFilteredGraphqlFields({ filterText, fields }) {
|
getFilteredGraphqlFields({ filterText, fields }) {
|
||||||
if (!filterText) return fields
|
if (!filterText) return fields
|
||||||
|
|
||||||
return fields.filter((field) => {
|
return fields.filter((field) =>
|
||||||
return this.isTextFoundInGraphqlFieldObject({ text: filterText, graphqlFieldObject: field })
|
this.isTextFoundInGraphqlFieldObject({ text: filterText, graphqlFieldObject: field })
|
||||||
})
|
)
|
||||||
},
|
},
|
||||||
getFilteredGraphqlTypes({ filterText, types }) {
|
getFilteredGraphqlTypes({ filterText, types }) {
|
||||||
if (!filterText) return types
|
if (!filterText) return types
|
||||||
@@ -509,12 +509,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isFilterTextMatchingAtLeastOneField = Object.values(type._fields || {}).some(
|
const isFilterTextMatchingAtLeastOneField = Object.values(type._fields || {}).some(
|
||||||
(field) => {
|
(field) =>
|
||||||
return this.isTextFoundInGraphqlFieldObject({
|
this.isTextFoundInGraphqlFieldObject({
|
||||||
text: filterText,
|
text: filterText,
|
||||||
graphqlFieldObject: field,
|
graphqlFieldObject: field,
|
||||||
})
|
})
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return isFilterTextMatchingAtLeastOneField
|
return isFilterTextMatchingAtLeastOneField
|
||||||
|
|||||||
@@ -1361,7 +1361,7 @@ export default {
|
|||||||
: true,
|
: true,
|
||||||
},
|
},
|
||||||
currentMethodIndex: 0,
|
currentMethodIndex: 0,
|
||||||
codegens: codegens,
|
codegens,
|
||||||
methodMenuItems: [
|
methodMenuItems: [
|
||||||
"GET",
|
"GET",
|
||||||
"HEAD",
|
"HEAD",
|
||||||
@@ -1416,7 +1416,7 @@ export default {
|
|||||||
this.setRouteQueryState()
|
this.setRouteQueryState()
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
handler: function (newValue) {
|
handler(newValue) {
|
||||||
if (!this.paramsWatchEnabled) {
|
if (!this.paramsWatchEnabled) {
|
||||||
this.paramsWatchEnabled = true
|
this.paramsWatchEnabled = true
|
||||||
return
|
return
|
||||||
@@ -1474,7 +1474,7 @@ export default {
|
|||||||
? "application/json"
|
? "application/json"
|
||||||
: ""
|
: ""
|
||||||
},
|
},
|
||||||
preRequestScript: function (val, oldVal) {
|
preRequestScript(val, oldVal) {
|
||||||
this.uri = this.uri
|
this.uri = this.uri
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -1826,7 +1826,7 @@ export default {
|
|||||||
httpUser: this.httpUser,
|
httpUser: this.httpUser,
|
||||||
httpPassword: this.httpPassword,
|
httpPassword: this.httpPassword,
|
||||||
bearerToken: this.bearerToken,
|
bearerToken: this.bearerToken,
|
||||||
headers: headers,
|
headers,
|
||||||
rawInput: this.rawInput,
|
rawInput: this.rawInput,
|
||||||
rawParams: this.rawParams,
|
rawParams: this.rawParams,
|
||||||
rawRequestBody: this.rawRequestBody,
|
rawRequestBody: this.rawRequestBody,
|
||||||
@@ -1860,7 +1860,7 @@ export default {
|
|||||||
if (env.name === "Globals" || env.name === "globals") {
|
if (env.name === "Globals" || env.name === "globals") {
|
||||||
preRequestScriptString += this.useSelectedEnvironment({
|
preRequestScriptString += this.useSelectedEnvironment({
|
||||||
environment: env,
|
environment: env,
|
||||||
environments: environments,
|
environments,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,9 +257,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
proxySettings: {
|
proxySettings: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler(value) {
|
handler({ url, key }) {
|
||||||
this.applySetting("PROXY_URL", value.url)
|
this.applySetting("PROXY_URL", url)
|
||||||
this.applySetting("PROXY_KEY", value.key)
|
this.applySetting("PROXY_KEY", key)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user