quickpassthrough/internal/ui_main.go

26 lines
692 B
Go
Raw Permalink Normal View History

package internal
// A simple example demonstrating the use of multiple text input components
// from the Bubbles component library.
import (
2023-04-10 07:10:19 -04:00
"os"
tea "github.com/charmbracelet/bubbletea"
"github.com/HikariKnight/quickpassthrough/internal/common"
"github.com/HikariKnight/quickpassthrough/internal/pages"
)
// This is where we build everything
func Tui() {
2023-12-26 12:42:49 -05:00
// Log all errors to a new logfile (super useful feature of BubbleTea!)
_ = os.Rename("quickpassthrough_debug.log", "quickpassthrough_debug_old.log")
logfile, err := tea.LogToFile("quickpassthrough_debug.log", "")
common.ErrorCheck(err, "Error creating log file")
2023-04-10 07:10:19 -04:00
defer logfile.Close()
// New WIP Tui
2023-12-26 12:42:49 -05:00
pages.Welcome()
}