add:partial functionality

This commit is contained in:
2026-04-06 02:38:37 +09:00
parent da82f233bc
commit 9c7f1149ba
10 changed files with 444 additions and 47 deletions

View File

@@ -12,23 +12,34 @@ const (
pageConfig
pageAddServer
pageSelectServer
pageServerActions
pageFileAction
)
type TUIInterface struct {
Services *services.ServicesStore
Page page
MenuItems []pages.MenuItem
Selected int
Servers map[string]services.Server
ServerNames []string // sorted, stable order for list rendering
NoServers bool
InitErr error
FlashMsg string
Form addServerForm
FormErr string // inline field error (e.g. duplicate name)
Quitting bool
WindowWidth int
WindowHeight int
Services *services.ServicesStore
Page page
MenuItems []pages.MenuItem
Selected int
Servers map[string]services.Server
ServerNames []string // sorted, stable order for list rendering
NoServers bool
InitErr error
FlashMsg string
Form addServerForm
FormErr string // inline field error (e.g. duplicate name)
Quitting bool
WindowWidth int
WindowHeight int
// server actions page
ActiveServer string
StorageFiles []string
StorageLoading bool
StorageErr error
FileSelected int // cursor within StorageFiles
FileFocused bool // true = ↑↓ drives file list, false = action menu
// file action page
ActiveFile string
}
func NewTUIInterface(store *services.ServicesStore) TUIInterface {