Skip to content

Commit 3131112

Browse files
committed
fixup! feat: add NcKbd component
1 parent d59897e commit 3131112

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/NcKbd/NcKbd.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import type { Slot } from 'vue'
88
99
import { computed } from 'vue'
1010
import { t } from '../../l10n.ts'
11-
import { isMacos } from '../../utils/platform.ts'
11+
import { isMac } from '../../utils/platform.ts'
1212
1313
const {
1414
symbol = undefined,
15-
mac = isMacos,
15+
mac = isMac,
1616
} = defineProps<{
1717
/**
1818
* Key name or symbol to display.

src/composables/useHotKey/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55
import { onKeyStroke } from '@vueuse/core'
6+
import { isMac } from '../../utils/platform.ts'
67

78
const disableKeyboardShortcuts = window.OCP?.Accessibility?.disableKeyboardShortcuts?.()
8-
const isMac = /mac|ipad|iphone|darwin/i.test(navigator.userAgent)
99
const derivedKeysRegex = /^[a-zA-Z0-9]$/
1010
const nonAsciiPrintableRegex = /^[^\x20-\x7F]$/
1111

src/utils/platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
export const isMacos = /Mac|iPhone|iPod|iPad/i.test(navigator.userAgent)
6+
export const isMac = /mac|ipad|iphone|darwin/i.test(navigator.userAgent)

0 commit comments

Comments
 (0)