chore: rename isMac to isAppleDevice to reflect what it's actually doing
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
kolaente 2021-11-09 19:53:25 +01:00
parent ff52ceb92e
commit 8aae94f353
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import {isMac} from '@/helpers/isMac'
import {isAppleDevice} from '@/helpers/isAppleDevice'
const ctrl = isMac() ? '⌘' : 'ctrl'
const ctrl = isAppleDevice() ? '⌘' : 'ctrl'
export const KEYBOARD_SHORTCUTS = [
{

View File

@ -1,10 +1,10 @@
import {Directive} from 'vue'
import {install, uninstall} from '@github/hotkey'
import {isMac} from '@/helpers/isMac'
import {isAppleDevice} from '@/helpers/isAppleDevice'
const directive: Directive = {
mounted(el, {value}) {
if (isMac() && value.includes('Control')) {
if (isAppleDevice() && value.includes('Control')) {
value = value.replace('Control', 'Meta')
}
install(el, value)

View File

@ -1,4 +1,4 @@
export const isMac = (): Boolean => {
export const isAppleDevice = (): Boolean => {
return navigator.userAgent.includes('Mac') || [
'iPad Simulator',
'iPhone Simulator',