ui calculator
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"galaxy/client"
|
||||
"galaxy/client/appmeta"
|
||||
"galaxy/client/loader"
|
||||
"galaxy/connector/http"
|
||||
@@ -12,6 +13,7 @@ import (
|
||||
"os/signal"
|
||||
|
||||
"fyne.io/fyne/v2/app"
|
||||
"fyne.io/fyne/v2/lang"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -19,7 +21,7 @@ func main() {
|
||||
defer func() {
|
||||
if err == nil {
|
||||
if r := recover(); r != nil {
|
||||
err = errors.Join(err, fmt.Errorf("app panics: %v", r))
|
||||
err = errors.Join(err, fmt.Errorf("panic: %v", r))
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
@@ -32,6 +34,9 @@ func main() {
|
||||
defer cancel()
|
||||
|
||||
app := app.NewWithID(appmeta.AppID)
|
||||
if err = lang.AddTranslationsFS(client.Translations, "resource/lang"); err != nil {
|
||||
return
|
||||
}
|
||||
s, err := fs.NewFS(app.Storage().RootURI().Path())
|
||||
if err != nil {
|
||||
return
|
||||
@@ -44,6 +49,5 @@ func main() {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = l.Run(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user