From d4c6065e4523e2f010eb494ca815d9c6d1916bee Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 27 Feb 2020 21:44:52 -0500 Subject: [PATCH] Refactor default.vue to use getPlatformSpecialKey --- layouts/default.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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,