From fcde6789ff4d896e2170b36faa9e9fba7b4a0e57 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Mon, 18 Aug 2025 10:49:27 +0900 Subject: feat(frontend): introduce haptic feedback as experimental feature #16410 --- packages/frontend/src/utility/haptic.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/frontend/src/utility/haptic.ts (limited to 'packages/frontend/src/utility') diff --git a/packages/frontend/src/utility/haptic.ts b/packages/frontend/src/utility/haptic.ts new file mode 100644 index 0000000000..6f4706d202 --- /dev/null +++ b/packages/frontend/src/utility/haptic.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { haptic as _haptic } from 'ios-haptics'; +import { prefer } from '@/preferences.js'; + +export function haptic() { + if (prefer.s['experimental.enableHapticFeedback']) { + _haptic(); + } +} -- cgit v1.2.3-freya