Refactor default.vue to use getPlatformSpecialKey
This commit is contained in:
@@ -642,6 +642,7 @@ import intializePwa from "../assets/js/pwa"
|
|||||||
import * as version from "../.postwoman/version.json"
|
import * as version from "../.postwoman/version.json"
|
||||||
import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy"
|
import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy"
|
||||||
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy"
|
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy"
|
||||||
|
import { getPlatformSpecialKey } from "~/functions/platformutils"
|
||||||
import firebase from "firebase/app"
|
import firebase from "firebase/app"
|
||||||
import { fb } from "../functions/fb"
|
import { fb } from "../functions/fb"
|
||||||
|
|
||||||
@@ -653,9 +654,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getSpecialKey() {
|
getSpecialKey: getPlatformSpecialKey,
|
||||||
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl"
|
|
||||||
},
|
|
||||||
linkActive(path) {
|
linkActive(path) {
|
||||||
return {
|
return {
|
||||||
"nuxt-link-exact-active": this.$route.path === path,
|
"nuxt-link-exact-active": this.$route.path === path,
|
||||||
|
|||||||
Reference in New Issue
Block a user