Documentation
¶
Index ¶
- func Run(dep RuntimeDependencies) error
- type ActionDependencies
- type BluetoothScanner
- type ChatAction
- type ChatActionHandler
- type DataDependencies
- type DiscoveredBluetoothDevice
- type FyneNotificationSender
- type LaunchOptions
- type MessageSender
- type NodeAction
- type NodeActionHandler
- type NodeFavoriteAction
- type NodeOverviewAction
- type NodeRowBackground
- type NodeRowRenderer
- type NodeSettingsAction
- type NodesTabActions
- type PlatformDependencies
- type RuntimeDependencies
- type TinyGoBluetoothScanner
- type TracerouteAction
- type UIHooks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(dep RuntimeDependencies) error
Types ¶
type ActionDependencies ¶
type ActionDependencies struct {
Sender MessageSender
Traceroute TracerouteAction
OnSave func(cfg config.AppConfig) error
OnChatSelected func(chatKey string)
OnDeleteDMChat func(chatKey string) error
OnMapViewportChanged func(zoom, x, y int)
OnMapDisplayConfigChanged func(cfg config.MapDisplayConfig)
OnClearDB func() error
OnClearCache func() error
OnStartUpdateChecker func()
OnQuit func()
NodeSettings NodeSettingsAction
NodeOverview NodeOverviewAction
NodeFavorite NodeFavoriteAction
}
ActionDependencies contains user-triggered operations invoked from UI.
type BluetoothScanner ¶
type BluetoothScanner interface {
Scan(ctx context.Context, adapterID string) ([]DiscoveredBluetoothDevice, error)
}
BluetoothScanner scans nearby BLE devices and returns normalized results.
type ChatAction ¶
type ChatAction string
ChatAction identifies a message-level action available from context menu.
const ( ChatActionReply ChatAction = "reply" ChatActionReact ChatAction = "react" )
type ChatActionHandler ¶
type ChatActionHandler func(message domain.ChatMessage, action ChatAction)
ChatActionHandler handles selected chat message context action.
type DataDependencies ¶
type DataDependencies struct {
Config config.AppConfig
Paths app.Paths
ChatStore *domain.ChatStore
NodeStore *domain.NodeStore
Bus bus.MessageBus
LastSelectedChat string
LocalNodeID func() string
LocalNodeSnapshot func() app.LocalNodeSnapshot
CurrentConfig func() config.AppConfig
CurrentConnStatus func() (busmsg.ConnectionStatus, bool)
}
DataDependencies contains read-only state consumed by UI tabs.
type DiscoveredBluetoothDevice ¶
type DiscoveredBluetoothDevice struct {
Name string
Address string
RSSI int
HasMeshtasticService bool
}
DiscoveredBluetoothDevice represents a discovered BLE device entry for UI selection.
type FyneNotificationSender ¶
type FyneNotificationSender struct {
// contains filtered or unexported fields
}
FyneNotificationSender bridges app notifications to native Fyne notifications.
func NewFyneNotificationSender ¶
func NewFyneNotificationSender(app fyne.App) *FyneNotificationSender
func (*FyneNotificationSender) Send ¶
func (s *FyneNotificationSender) Send(notification notifications.Payload)
type LaunchOptions ¶
type LaunchOptions struct {
StartHidden bool
}
LaunchOptions controls initial window behavior at startup.
type MessageSender ¶
type MessageSender interface {
SendText(chatKey, text string, opts radio.TextSendOptions) <-chan radio.SendResult
}
MessageSender sends user text messages through the active radio service.
type NodeAction ¶
type NodeAction string
NodeAction identifies a node-level action available from context menu.
const ( NodeActionDirectMessage NodeAction = "direct_message" NodeActionFavorite NodeAction = "favorite" NodeActionTraceroute NodeAction = "traceroute" NodeActionInfo NodeAction = "info" )
type NodeActionHandler ¶
type NodeActionHandler func(node domain.Node, action NodeAction)
NodeActionHandler handles selected node action menu item.
type NodeFavoriteAction ¶
type NodeFavoriteAction interface {
SetFavorite(ctx context.Context, targetNodeID string, favorite bool) error
}
NodeFavoriteAction handles marking remote nodes as favorite on local node DB.
type NodeOverviewAction ¶
type NodeOverviewAction interface {
RequestUserInfo(ctx context.Context, targetNodeID string, requester app.LocalNodeSnapshot) error
RequestTelemetry(ctx context.Context, targetNodeID string, kind radio.TelemetryRequestKind) error
ListTelemetryHistory(ctx context.Context, nodeID string, limit int) ([]domain.NodeTelemetryHistoryEntry, error)
ListPositionHistory(ctx context.Context, nodeID string, limit int) ([]domain.NodePositionHistoryEntry, error)
ListIdentityHistory(ctx context.Context, nodeID string, limit int) ([]domain.NodeIdentityHistoryEntry, error)
}
NodeOverviewAction handles node overview requests and history reads.
type NodeRowBackground ¶
type NodeRowBackground struct {
ThemeColorName fyne.ThemeColorName
CustomColor color.Color
Alpha float32
}
NodeRowBackground defines optional row background styling.
type NodeRowRenderer ¶
type NodeRowRenderer struct {
Create func() fyne.CanvasObject
Update func(obj fyne.CanvasObject, node domain.Node)
}
NodeRowRenderer defines create/update callbacks for nodes list row widgets.
func DefaultNodeRowRenderer ¶
func DefaultNodeRowRenderer() NodeRowRenderer
type NodeSettingsAction ¶
type NodeSettingsAction interface {
LoadUserSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeUserSettings, error)
SaveUserSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeUserSettings) error
LoadSecuritySettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeSecuritySettings, error)
SaveSecuritySettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeSecuritySettings) error
LoadLoRaSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeLoRaSettings, error)
SaveLoRaSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeLoRaSettings) error
LoadDeviceSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeDeviceSettings, error)
SaveDeviceSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeDeviceSettings) error
LoadPositionSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodePositionSettings, error)
SavePositionSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodePositionSettings) error
LoadPowerSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodePowerSettings, error)
SavePowerSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodePowerSettings) error
LoadDisplaySettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeDisplaySettings, error)
SaveDisplaySettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeDisplaySettings) error
LoadBluetoothSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeBluetoothSettings, error)
SaveBluetoothSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeBluetoothSettings) error
LoadNetworkSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeNetworkSettings, error)
SaveNetworkSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeNetworkSettings) error
LoadMQTTSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeMQTTSettings, error)
SaveMQTTSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeMQTTSettings) error
LoadSerialSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeSerialSettings, error)
SaveSerialSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeSerialSettings) error
LoadExternalNotificationSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeExternalNotificationSettings, error)
SaveExternalNotificationSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeExternalNotificationSettings) error
LoadStoreForwardSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeStoreForwardSettings, error)
SaveStoreForwardSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeStoreForwardSettings) error
LoadRangeTestSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeRangeTestSettings, error)
SaveRangeTestSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeRangeTestSettings) error
LoadTelemetrySettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeTelemetrySettings, error)
SaveTelemetrySettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeTelemetrySettings) error
LoadCannedMessageSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeCannedMessageSettings, error)
SaveCannedMessageSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeCannedMessageSettings) error
LoadAudioSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeAudioSettings, error)
SaveAudioSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeAudioSettings) error
LoadRemoteHardwareSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeRemoteHardwareSettings, error)
SaveRemoteHardwareSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeRemoteHardwareSettings) error
LoadNeighborInfoSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeNeighborInfoSettings, error)
SaveNeighborInfoSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeNeighborInfoSettings) error
LoadAmbientLightingSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeAmbientLightingSettings, error)
SaveAmbientLightingSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeAmbientLightingSettings) error
LoadDetectionSensorSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeDetectionSensorSettings, error)
SaveDetectionSensorSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeDetectionSensorSettings) error
LoadPaxcounterSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodePaxcounterSettings, error)
SavePaxcounterSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodePaxcounterSettings) error
LoadStatusMessageSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeStatusMessageSettings, error)
SaveStatusMessageSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeStatusMessageSettings) error
LoadChannelSettings(ctx context.Context, target app.NodeSettingsTarget) (app.NodeChannelSettingsList, error)
SaveChannelSettings(ctx context.Context, target app.NodeSettingsTarget, settings app.NodeChannelSettingsList) error
ExportProfile(ctx context.Context, target app.NodeSettingsTarget) (*app_generated.DeviceProfile, error)
ImportProfile(ctx context.Context, target app.NodeSettingsTarget, profile *app_generated.DeviceProfile, options app.NodeProfileImportOptions) error
RebootNode(ctx context.Context, target app.NodeSettingsTarget) error
ShutdownNode(ctx context.Context, target app.NodeSettingsTarget) error
FactoryResetNode(ctx context.Context, target app.NodeSettingsTarget) error
ResetNodeDB(ctx context.Context, target app.NodeSettingsTarget, preserveFavorites bool) error
}
NodeSettingsAction loads and saves node settings from UI.
type NodesTabActions ¶
type NodesTabActions struct {
OnNodeSecondaryTapped func(node domain.Node, position fyne.Position)
}
NodesTabActions contains optional callbacks for node row interactions.
type PlatformDependencies ¶
type PlatformDependencies struct {
BluetoothScanner BluetoothScanner
OpenBluetoothSettings func() error
}
PlatformDependencies contains OS-specific helpers used by UI actions.
type RuntimeDependencies ¶
type RuntimeDependencies struct {
Data DataDependencies
Actions ActionDependencies
Platform PlatformDependencies
UIHooks UIHooks
Launch LaunchOptions
}
RuntimeDependencies is the complete dependency graph required to run the UI.
func BuildRuntimeDependencies ¶
func BuildRuntimeDependencies(rt *meshapp.Runtime, launch LaunchOptions, onQuit func()) RuntimeDependencies
type TinyGoBluetoothScanner ¶
type TinyGoBluetoothScanner struct {
// contains filtered or unexported fields
}
TinyGoBluetoothScanner is a BluetoothScanner backed by tinygo.org/x/bluetooth.
func NewTinyGoBluetoothScanner ¶
func NewTinyGoBluetoothScanner(scanDuration time.Duration) *TinyGoBluetoothScanner
func (*TinyGoBluetoothScanner) Scan ¶
func (s *TinyGoBluetoothScanner) Scan(ctx context.Context, adapterID string) ([]DiscoveredBluetoothDevice, error)
type TracerouteAction ¶
type TracerouteAction interface {
StartTraceroute(ctx context.Context, target app.TracerouteTarget) (busmsg.TracerouteUpdate, error)
}
TracerouteAction starts traceroute requests for UI actions.
type UIHooks ¶
type UIHooks struct {
CurrentWindow func() fyne.Window
RunOnUI func(func())
RunAsync func(func())
ShowBluetoothScanDialog func(window fyne.Window, devices []DiscoveredBluetoothDevice, onSelect func(DiscoveredBluetoothDevice))
ShowErrorDialog func(err error, window fyne.Window)
ShowInfoDialog func(title, message string, window fyne.Window)
}
UIHooks overrides default UI interactions for tests and custom embedding.
Source Files
¶
- action_conventions.go
- action_node_direct_message.go
- action_node_favorite.go
- action_node_overview_requests.go
- action_node_share_contact.go
- action_node_traceroute.go
- app.go
- app_bootstrap.go
- bluetooth_scan.go
- channel_share_dialog.go
- chat_actions_menu.go
- chat_context_menu.go
- chat_display.go
- chat_message_row_item.go
- chat_reaction.go
- chat_row_item.go
- chats_tab.go
- connection_status_ui.go
- deps.go
- deps_factory.go
- dialog_helpers.go
- external_links.go
- identity_log_modal.go
- lifecycle.go
- link_image.go
- listeners.go
- main_view.go
- map_link_providers.go
- map_link_zoom.go
- map_projection.go
- map_tab.go
- node_actions_menu.go
- node_display.go
- node_overview.go
- node_settings_ambient_lighting.go
- node_settings_audio.go
- node_settings_bluetooth.go
- node_settings_canned_message.go
- node_settings_channels.go
- node_settings_controls.go
- node_settings_detection_sensor.go
- node_settings_device.go
- node_settings_display.go
- node_settings_external_notification.go
- node_settings_import_export.go
- node_settings_int32_select.go
- node_settings_keys.go
- node_settings_lora.go
- node_settings_maintenance_actions.go
- node_settings_managed.go
- node_settings_mqtt.go
- node_settings_neighbor_info.go
- node_settings_network.go
- node_settings_paxcounter.go
- node_settings_position.go
- node_settings_power.go
- node_settings_range.go
- node_settings_remote_hardware.go
- node_settings_security.go
- node_settings_serial.go
- node_settings_shared.go
- node_settings_status_message.go
- node_settings_store_forward.go
- node_settings_telemetry.go
- node_settings_uint32_select.go
- node_settings_user.go
- node_tab.go
- nodes_tab.go
- notification_sender.go
- position_log_modal.go
- presentation_bindings.go
- reaction_picker.go
- runtime.go
- settings_tab.go
- share_modal.go
- sidebar.go
- signal_indicator.go
- telemetry_log_modal.go
- theme_runtime.go
- traceroute_modal.go
- tray.go
- update_dialog.go
- update_indicator.go