prepare loader ui
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"galaxy/client/loader"
|
||||
"galaxy/connector/http"
|
||||
"galaxy/storage/fs"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -29,12 +30,16 @@ func main() {
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer cancel()
|
||||
|
||||
app := app.NewWithID("galaxy-client")
|
||||
app := app.NewWithID("GalaxyPlus")
|
||||
s, err := fs.NewFS(app.Storage().RootURI().Path())
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
l, err := loader.NewLoader(ctx, s, nil, app)
|
||||
c, err := http.NewHttpConnector(ctx, "http://127.0.0.1:8080")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
l, err := loader.NewLoader(s, c, app)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"galaxy/client"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"fyne.io/fyne/v2/app"
|
||||
)
|
||||
@@ -25,11 +23,7 @@ func main() {
|
||||
}
|
||||
}()
|
||||
app := app.New()
|
||||
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer cancel()
|
||||
|
||||
c, err := client.NewClient(ctx, nil, nil, app)
|
||||
c, err := client.NewClient(nil, nil, app)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user