diff options
| -rw-r--r-- | internal/client/client.go | 7 | ||||
| -rw-r--r-- | internal/client/config/config.go | 12 |
2 files changed, 2 insertions, 17 deletions
diff --git a/internal/client/client.go b/internal/client/client.go index b0a3447..0ba3530 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -13,7 +13,6 @@ import ( "github.com/kyren223/eko/internal/client/config" "github.com/kyren223/eko/internal/client/ui" "github.com/kyren223/eko/internal/client/ui/auth" - "github.com/kyren223/eko/internal/client/ui/colors" "github.com/kyren223/eko/pkg/assert" ) @@ -44,12 +43,6 @@ func Run() { os.Exit(1) } - config.Use(func(config *config.Config) { - if config.Colors != nil { - colors.LoadStrings(config.Colors) - } - }) - program := tea.NewProgram(initialModel(dump), tea.WithAltScreen()) assert.AddFlush(BubbleTeaCloser{program}) ui.Program = program diff --git a/internal/client/config/config.go b/internal/client/config/config.go index aadde87..c3264c5 100644 --- a/internal/client/config/config.go +++ b/internal/client/config/config.go @@ -21,22 +21,13 @@ type Config struct { } func Default() Config { - colors.Save() - cols := colors.Get() - sColors := make([]string, 0, colors.Count) - for _, color := range cols { - if color != "" { - sColors = append(sColors, colors.ToHex(color)) - } - } - return Config{ ServerName: "eko.kyren.codes", PrivateKeyPath: "", InsertModeTabToSpace: true, InsertModeSpacesPerTab: 4, InsecureDebugMode: false, - Colors: sColors, + Colors: nil, } } @@ -59,6 +50,7 @@ func VerifyAndFix(config *Config) error { ) } + colors.LoadStrings(config.Colors) } return nil |
