diff --git a/components/graphql/queryeditor.vue b/components/graphql/queryeditor.vue index c76ba02d7..6378f5f09 100644 --- a/components/graphql/queryeditor.vue +++ b/components/graphql/queryeditor.vue @@ -5,17 +5,17 @@ diff --git a/functions/platformutils.js b/functions/platformutils.js new file mode 100644 index 000000000..8c285c1d5 --- /dev/null +++ b/functions/platformutils.js @@ -0,0 +1,3 @@ +export function getPlatformSpecialKey() { + return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl" +} diff --git a/layouts/default.vue b/layouts/default.vue index 6b18381da..a77c8871b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -642,6 +642,7 @@ import intializePwa from "../assets/js/pwa" import * as version from "../.postwoman/version.json" import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy" import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy" +import { getPlatformSpecialKey } from "~/functions/platformutils" import firebase from "firebase/app" import { fb } from "../functions/fb" @@ -653,9 +654,7 @@ export default { }, methods: { - getSpecialKey() { - return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl" - }, + getSpecialKey: getPlatformSpecialKey, linkActive(path) { return { "nuxt-link-exact-active": this.$route.path === path, diff --git a/pages/graphql.vue b/pages/graphql.vue index e2b5f7c37..4d07a1022 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -153,7 +153,10 @@