mirror of
https://github.com/HikariKnight/quickpassthrough.git
synced 2025-05-19 01:35:21 -04:00
enable new TUI
This commit is contained in:
parent
95c77bbf33
commit
4a95fef56b
1 changed files with 11 additions and 9 deletions
|
@ -7,25 +7,27 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
|
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
|
||||||
|
"github.com/HikariKnight/quickpassthrough/internal/pages"
|
||||||
tea "github.com/charmbracelet/bubbletea"
|
tea "github.com/charmbracelet/bubbletea"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is where we build everything
|
// This is where we build everything
|
||||||
func Tui() {
|
func Tui() {
|
||||||
// Log all errors to a new logfile
|
// Log all errors to a new logfile (super useful feature of BubbleTea!)
|
||||||
os.Remove("debug.log")
|
os.Remove("debug.log")
|
||||||
logfile, err := tea.LogToFile("debug.log", "")
|
logfile, err := tea.LogToFile("debug.log", "")
|
||||||
errorcheck.ErrorCheck(err, "Error creating log file")
|
errorcheck.ErrorCheck(err, "Error creating log file")
|
||||||
defer logfile.Close()
|
defer logfile.Close()
|
||||||
|
|
||||||
// New WIP Tui
|
// New WIP Tui
|
||||||
//pages.Welcome()
|
pages.Welcome()
|
||||||
|
/*
|
||||||
|
// Make a blank model to keep our state in
|
||||||
|
m := NewModel()
|
||||||
|
|
||||||
// Make a blank model to keep our state in
|
// Start the program with the model
|
||||||
m := NewModel()
|
p := tea.NewProgram(m, tea.WithAltScreen())
|
||||||
|
_, err = p.Run()
|
||||||
// Start the program with the model
|
errorcheck.ErrorCheck(err, "Failed to initialize UI")
|
||||||
p := tea.NewProgram(m, tea.WithAltScreen())
|
*/
|
||||||
_, err = p.Run()
|
|
||||||
errorcheck.ErrorCheck(err, "Failed to initialize UI")
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue