mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-08 13:33:42 +08:00
00364fd645
Separate Galaxy authentication and local access policy from web presentation. Co-authored-by: Danny <dannyirwin31@yahoo.com> Co-authored-by: Prabhaav Pillai <prabhaav@msu.edu> Co-authored-by: dirwin31 <83434411+dirwin31@users.noreply.github.com> Co-authored-by: firestarsdog <229254897+firestarsdog@users.noreply.github.com>
10 lines
299 B
JavaScript
10 lines
299 B
JavaScript
export function haptic() {
|
|
try { globalThis.navigator?.vibrate?.(15) } catch {}
|
|
}
|
|
|
|
export function toggleHaptic(event) {
|
|
const input = event.target
|
|
if (input.matches?.('.gx-switch input[type="checkbox"], input[role="switch"]') &&
|
|
!input.disabled && !input.closest('[inert]')) haptic()
|
|
}
|