update:wip

This commit is contained in:
2026-04-06 01:39:29 +09:00
parent 09c78206a8
commit ed19e0ba4e
10 changed files with 475 additions and 58 deletions

View File

@@ -5,13 +5,25 @@ import (
"filepass/internal/services"
)
type page int
const (
pageHome page = iota
pageConfig
pageAddServer
)
type TUIInterface struct {
Services *services.ServicesStore
Page page
MenuItems []pages.MenuItem
Selected int
Servers map[string]services.Server
NoServers bool
InitErr error
FlashMsg string
Form addServerForm
FormErr string // inline field error (e.g. duplicate name)
Quitting bool
WindowWidth int
WindowHeight int
@@ -20,6 +32,7 @@ type TUIInterface struct {
func NewTUIInterface(store *services.ServicesStore) TUIInterface {
return TUIInterface{
Services: store,
Page: pageHome,
MenuItems: pages.HomeMenuItems(),
}
}