Move main TUI model to home package
This commit is contained in:
parent
31d1664619
commit
7ead78327c
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ui
|
||||
package home
|
||||
|
||||
import (
|
||||
"github.com/charmbracelet/bubbles/help"
|
|
@ -1,4 +1,4 @@
|
|||
package ui
|
||||
package home
|
||||
|
||||
import (
|
||||
"github.com/charmbracelet/bubbles/key"
|
|
@ -1,4 +1,4 @@
|
|||
package ui
|
||||
package home
|
||||
|
||||
import (
|
||||
"os"
|
Loading…
Reference in New Issue