State
state
¶
Defines a mutable cross-panel state for the GUI
Usage
-
Stores the user's configuration so that the UI doesn't have to re-load the
.envon every panel -
Holds the UI's internal state, such as whether or not an action is happening (
busy) -
Holds objects that should be accessible from any panel, such as the callback function to display a toast notification on the application-scoped
NotificationBar(notify)
AppState
dataclass
¶
The GUI's Current Working State
Attributes:
| Name | Type | Description |
|---|---|---|
notify |
Callable[[str, str], None]
|
The callback function attached to
the application-scoped |
set_busy |
Callable[[bool], None]
|
The callback function that locks/unlocks the navigation and panel buttons while a long-running action is in progress to prevent the user from changing the configuration or navigating away mid-action |
backend |
Backend
|
The chosen mirumoji transcription backend |
source |
ImageSource
|
Whether to pull pre-built images or build locally |
env_path |
Path
|
Path to the managed user configuration file ( |
env |
dict[str, str]
|
Resolved environment variables (from |
busy |
bool
|
Whether a long-running action is in progress |
sync_dashboard |
Callable[[], None] | None
|
The callback function attached to the dashboard's configuration-display elements that updates the shown configuration based on the managed user configuration file whenver the dashboard is re-loaded by the main page |