Skip to content

Commit

Permalink
Merge branch 'refactor/strategy-proxy-handling' of https://github.com…
Browse files Browse the repository at this point in the history
…/AndrewBastin/postwoman into refactor/strategy-proxy-handling
  • Loading branch information
AndrewBastin committed Jan 18, 2020
2 parents 730018b + 9d085e3 commit c61d825
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 49 deletions.
9 changes: 7 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,8 @@ export default {
showExtensions: false,
showShortcuts: false,
showSupport: false,
firefoxExtInstalled: window.firefoxExtSendRequest,
firefoxExtInstalled:
window.firefoxExtSendRequest !== undefined ? true : false,
chromeExtInstalled: false
};
},
Expand Down Expand Up @@ -680,7 +681,11 @@ export default {
}
let showExtensionsToast =
localStorage.getItem("showExtensionsToast") === "yes";
if (!showExtensionsToast) {
if (
!this.firefoxExtInstalled &&
!this.chromeExtInstalled &&
!showExtensionsToast
) {
setTimeout(() => {
this.$toast.show(this.$t("extensions_info2"), {
icon: "extension",
Expand Down
66 changes: 30 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"test": "start-server-and-test dev http://localhost:3000 e2e"
},
"dependencies": {
"@nuxtjs/axios": "^5.9.2",
"@nuxtjs/axios": "^5.9.3",
"@nuxtjs/google-analytics": "^2.2.3",
"@nuxtjs/google-tag-manager": "^2.3.1",
"@nuxtjs/pwa": "^3.0.0-beta.19",
"@nuxtjs/robots": "^2.4.2",
"@nuxtjs/sitemap": "^2.0.1",
"@nuxtjs/toast": "^3.3.0",
"ace-builds": "^1.4.7",
"ace-builds": "^1.4.8",
"graphql": "^14.5.8",
"nuxt": "^2.11.0",
"nuxt-i18n": "^6.4.1",
Expand All @@ -37,8 +37,8 @@
},
"devDependencies": {
"cypress": "^3.8.2",
"node-sass": "^4.13.0",
"sass-loader": "^8.0.1",
"node-sass": "^4.13.1",
"sass-loader": "^8.0.2",
"start-server-and-test": "^1.10.6"
}
}
9 changes: 2 additions & 7 deletions pages/graphql.vue
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,9 @@ export default {
const gqlQueryString = this.gqlQueryString;
this.variables.forEach(variable => {
// todo: better variable type validation
const intRex = new RegExp(`\$${variable.key}\: Int`);
intRex.compile();
const floatRex = new RegExp(`\$${variable.key}\: Float`);
floatRex.compile();
if (intRex.test(gqlQueryString)) {
if (gqlQueryString.indexOf(`\$${variable.key}: Int`) > -1) {
variables[variable.key] = parseInt(variable.value);
} else if (floatRex.test(gqlQueryString)) {
} else if (gqlQueryString.indexOf(`\$${variable.key}: Float`) > -1) {
variables[variable.key] = parseFloat(variable.value);
} else {
variables[variable.key] = variable.value;
Expand Down

0 comments on commit c61d825

Please sign in to comment.