30 lines
454 B
Go
30 lines
454 B
Go
package gui
|
|
|
|
import "github.com/rivo/tview"
|
|
|
|
type panels struct {
|
|
currentPanel int
|
|
panel []panel
|
|
}
|
|
|
|
|
|
type state struct {
|
|
panels panels
|
|
tabBar *tview.TextView
|
|
resources resources
|
|
stopChans map[string]chan int
|
|
}
|
|
|
|
func newState() *state {
|
|
return &state{
|
|
stopChans: make(map[string]chan int),
|
|
}
|
|
}
|
|
|
|
type Gui struct {
|
|
app *tview.Application
|
|
pages *tview.Pages
|
|
state *state
|
|
db *db.Database
|
|
//statsLocations *statsLocations
|
|
} |