mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-06 10:47:12 +08:00
18 lines
494 B
TypeScript
18 lines
494 B
TypeScript
import { atom } from 'nanostores'
|
|
|
|
import { persistBoolean, storedBoolean } from '@/lib/storage'
|
|
|
|
const HAPTICS_MUTED_STORAGE_KEY = 'hermes.desktop.hapticsMuted'
|
|
|
|
export const $hapticsMuted = atom(storedBoolean(HAPTICS_MUTED_STORAGE_KEY, false))
|
|
|
|
$hapticsMuted.subscribe(muted => persistBoolean(HAPTICS_MUTED_STORAGE_KEY, muted))
|
|
|
|
export function setHapticsMuted(muted: boolean) {
|
|
$hapticsMuted.set(muted)
|
|
}
|
|
|
|
export function toggleHapticsMuted() {
|
|
$hapticsMuted.set(!$hapticsMuted.get())
|
|
}
|