add:send func

This commit is contained in:
2026-04-06 02:57:22 +09:00
parent 2760826b26
commit 5e44a3a35c
8 changed files with 342 additions and 11 deletions

View File

@@ -14,6 +14,7 @@ const (
pageSelectServer
pageServerActions
pageFileAction
pageSend
)
type TUIInterface struct {
@@ -33,6 +34,7 @@ type TUIInterface struct {
WindowHeight int
// server actions page
ActiveServer string
LocalDir string // user's cwd, destination for received files
StorageFiles []string
StorageLoading bool
StorageErr error
@@ -40,12 +42,15 @@ type TUIInterface struct {
FileFocused bool // true = ↑↓ drives file list, false = action menu
// file action page
ActiveFile string
// send / file picker page
Picker picker
}
func NewTUIInterface(store *services.ServicesStore) TUIInterface {
func NewTUIInterface(store *services.ServicesStore, localDir string) TUIInterface {
return TUIInterface{
Services: store,
Page: pageHome,
MenuItems: pages.HomeMenuItems(),
LocalDir: localDir,
}
}