Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(cfg *config.Config, onOpenExample func(), onOpenBackups func(), onQuit func(), updateCh <-chan UpdateInfo, trusted *TrustedFolderHooks)
Types ¶
type Row ¶ added in v1.3.0
Row is one entry in a list submenu. Label is what the user sees, Path is what the hook is called with. They are carried separately because they differ: a folder that is missing or whose identity no longer matches is labelled as such. Recovering the path by stripping that marker off the label was the old protocol, and it broke for anyone who named a folder to end in the marker.
type TrustedFolderHooks ¶ added in v1.2.0
type TrustedFolderHooks struct {
List func() []Row
Add func() []Row
Remove func(path string) []Row
}
TrustedFolderHooks are the app operations the Trusted Folders submenu drives. Each returns the authoritative list so the tray always re-renders from truth rather than tracking state itself. Add pops the native folder picker and trusts the choice; Remove untrusts one (asking first, app-side, because it closes a live origin); List is the initial render and the poll.