chore: rename isMac to isAppleDevice to reflect what it's actually doing
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
ff52ceb92e
commit
8aae94f353
|
@ -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 = [
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const isMac = (): Boolean => {
|
||||
export const isAppleDevice = (): Boolean => {
|
||||
return navigator.userAgent.includes('Mac') || [
|
||||
'iPad Simulator',
|
||||
'iPhone Simulator',
|
Reference in New Issue
Block a user