Move main TUI model to home package

This commit is contained in:
The Magician 2024-06-08 16:32:19 +01:00
parent 31d1664619
commit 7ead78327c
5 changed files with 7 additions and 8 deletions

View File

@ -2,13 +2,13 @@ package main
import (
"sevenkeys/logic"
"sevenkeys/ui"
"sevenkeys/tui/home"
tea "github.com/charmbracelet/bubbletea"
)
func main() {
m := ui.NewModel()
m := home.NewModel()
p := tea.NewProgram(m, tea.WithAltScreen())
_, err := p.Run()
logic.Check(err)

View File

@ -1,10 +1,9 @@
package ui
package home
import (
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
)
func (m Model) Init() tea.Cmd {
return textinput.Blink
return nil
}

View File

@ -1,4 +1,4 @@
package ui
package home
import (
"github.com/charmbracelet/bubbles/help"

View File

@ -1,4 +1,4 @@
package ui
package home
import (
"github.com/charmbracelet/bubbles/key"

View File

@ -1,4 +1,4 @@
package ui
package home
import (
"os"