Creates a new SettingsViewModel instance and loads initial settings.
The Redux store for state management
Service for handling settings persistence and logic
The page the dialog should open on, when its opener asked for one.
Read once by the dialog as it mounts. It is not in Redux because the dialog reads this view model directly rather than subscribing to the store, so a dispatch would not reach it — the same reason the tactile connection state is held outside the store.
The requested section, or null when the opener had no preference
Current state of the connection to a tactile graphics display.
Disposes the view model and resets settings state.
Loads settings from storage and updates the state.
Saves settings, updates state, and closes the settings modal.
The settings to save
Saves settings and updates the state without closing the modal.
The settings to save
Resets settings to default values and updates the state.
Toggles the visibility of the settings modal.
Optionalsection: "audio" | "braille" | "general" | "visual" | "ai" | "about"Subscribes to changes in the tactile display connection.
Settings reads this view model directly rather than through a Redux selector, so connection progress reaches the dialog through this subscription instead of a store update the dialog would not re-render for.
Called with each new connection state
A disposable that ends the subscription
Reports whether the page can reach a tactile display over one transport.
The connection to test
Fetches the tactile display SDK ahead of any connect attempt, so the connect click is not spent waiting for it.
Opens the browser's device picker and connects to a tactile display.
Must be reached synchronously from the user's click: the browser only shows the picker while a gesture is still in progress, and anything awaited first spends that activation.
Whether to look for the device over Bluetooth or USB
The connection state once the attempt settles
Disconnects the tactile display.
ViewModel for managing application settings and configuration.