Implement graphql api client and update gui to display data

This commit is contained in:
2023-02-23 22:15:39 -07:00
parent 9ba09da4fd
commit 268ac8f1e4
15 changed files with 1498 additions and 11 deletions
+13 -3
View File
@@ -37,6 +37,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
Height: m.height,
}
}
case error:
m.screen = screens.ErrorScreen{
Err: msg,
}
return m, nil
}
var cmd tea.Cmd
@@ -54,17 +59,22 @@ func main() {
screen: screens.CreateLogin(
// TODO: load from config file
[]screens.CursoriusServer{
screens.CursoriusServer{
{
Name: "local-test",
Url: "http://127.0.0.1:45421/graphql",
Token: "",
},
{
Name: "ohea",
Url: "https://ci.cursorius.server",
Token: "test",
},
screens.CursoriusServer{
{
Name: "nohea",
Url: "https://ci.cursoriuspreview.server",
Token: "test",
},
screens.CursoriusServer{
{
Name: "work",
Url: "https://ci.acme.corp",
Token: "test",