ui/home is now in the same app

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-19 14:34:48 +02:00
parent eaa960e6ab
commit 6f56e0b26a
4 changed files with 79 additions and 25 deletions
+5 -4
View File
@@ -142,6 +142,11 @@ type Project struct {
ModTime time.Time
}
// ProjectSelectedMsg is emitted when the user picks a project from the home screen.
type ProjectSelectedMsg struct {
Project *Project
}
type inputMode int
const (
@@ -161,15 +166,11 @@ type Model struct {
list list.Model
projectDir string
nameInput textinput.Model
selected *Project
width int
height int
teapotFrame int
}
// Selected returns the project chosen by the user, or nil if the program was
// quit without making a selection.
func (m Model) Selected() *Project { return m.selected }
func New(projectDir string) Model {
projects := loadProjects(projectDir)