summaryrefslogtreecommitdiff
path: root/internal/client/ui/core/usersettings
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-07-05 11:30:16 +0300
committerKyren223 <Kyren223@proton.me>2025-07-05 11:30:16 +0300
commit317bc967e64576744dbc4cda4ba5e34131187097 (patch)
tree940b35a56cd63881a81233b057b5dafd75b31e6e /internal/client/ui/core/usersettings
parent2d1408598ada38cb51412efe74b7c64466cb9057 (diff)
Added extra info in user settings, fixed typos in help popups and
refactored some log statements
Diffstat (limited to 'internal/client/ui/core/usersettings')
-rw-r--r--internal/client/ui/core/usersettings/usersettings.go33
1 files changed, 32 insertions, 1 deletions
diff --git a/internal/client/ui/core/usersettings/usersettings.go b/internal/client/ui/core/usersettings/usersettings.go
index 92e0a1c..9afafe3 100644
--- a/internal/client/ui/core/usersettings/usersettings.go
+++ b/internal/client/ui/core/usersettings/usersettings.go
@@ -6,6 +6,7 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
+ "github.com/kyren223/eko/internal/client/config"
"github.com/kyren223/eko/internal/client/gateway"
"github.com/kyren223/eko/internal/client/ui/colors"
"github.com/kyren223/eko/internal/client/ui/core/state"
@@ -28,6 +29,11 @@ var (
Background(colors.Blue).Foreground(colors.White).
Render("Update User Settings")
}
+
+ highlightedStyle = func() lipgloss.Style {
+ return lipgloss.NewStyle().Padding(0, 0).
+ Background(colors.BackgroundHighlight).Foreground(colors.White)
+ }
)
const (
@@ -136,7 +142,32 @@ func (m Model) View() string {
Align(lipgloss.Center).
Render(m.update)
- content := flex.NewVertical(name, description, private, update).WithGap(1).View()
+ configFile := "Config File: " + highlightedStyle().Render(config.ConfigFile)
+ configFile = lipgloss.NewStyle().
+ Width(m.nameWidth).
+ Render(configFile)
+
+ option := highlightedStyle().Render("\"anonymous_device_analytics\": false")
+ analyticsOptOut := "Anonymous device analytics can be disabled by setting " + option + " in your config file"
+ analyticsOptOut = lipgloss.NewStyle().
+ Width(m.nameWidth).
+ Render(analyticsOptOut)
+
+ legalNote := "Official instance Terms of Service & Privacy Policy: " + highlightedStyle().Render("https://kyren.codes/eko/legal")
+ legalNote = lipgloss.NewStyle().
+ Width(m.nameWidth).
+ Render(legalNote)
+
+ // content := flex.NewVertical(
+ // name, description, private,
+ // configFile, analyticsOptOut, legalNote,
+ // update,
+ // ).WithGap(1).View()
+
+ content := flex.NewVertical(
+ legalNote, analyticsOptOut,
+ configFile, name, description, private, update,
+ ).WithGap(1).View()
return lipgloss.NewStyle().
Border(lipgloss.ThickBorder()).