fix: open native directory picker for new instances
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"chub/internal/domain"
|
||||
"chub/internal/platform/browser"
|
||||
"chub/internal/platform/config"
|
||||
"chub/internal/platform/files"
|
||||
"chub/internal/platform/logging"
|
||||
"chub/internal/ui"
|
||||
"gioui.org/app"
|
||||
@@ -102,6 +103,8 @@ func runWindow(logger *slog.Logger) {
|
||||
window.Option(app.Title("Chub"), app.Size(unit.Dp(1100), unit.Dp(720)))
|
||||
theme := material.NewTheme()
|
||||
shell := ui.NewShell(theme)
|
||||
directoryPicker := files.NewDirectoryPicker()
|
||||
shell.OnChooseDirectory(directoryPicker.ChooseDirectory, window.Invalidate)
|
||||
discoverer := browser.NewDiscoverer()
|
||||
shell.OnPathSearch(func(ctx context.Context, field ui.PathField, current string) (string, error) {
|
||||
switch field {
|
||||
|
||||
Reference in New Issue
Block a user