Archipelago — open-source initial import

This commit is contained in:
Archipelago
2026-08-12 10:55:50 +00:00
commit b67e1527a2
2068 changed files with 472303 additions and 0 deletions
@@ -0,0 +1,30 @@
import { useSettingsStore } from '@/stores/settings'
export function useHaptics() {
const isSupported = 'vibrate' in navigator
function vibrate(pattern: number | number[]) {
if (!isSupported) return
try {
const settings = useSettingsStore()
if (settings.settings.notificationsEnabled === false) return // reuse notifications toggle
navigator.vibrate(pattern)
} catch { /* ignore */ }
}
function messageSend() { vibrate(10) }
function favoriteToggle() { vibrate(15) }
function error() { vibrate([50, 50, 50]) }
function pullRefresh() { vibrate(20) }
function longPress() { vibrate(20) }
return {
isSupported,
vibrate,
messageSend,
favoriteToggle,
error,
pullRefresh,
longPress,
}
}