summaryrefslogtreecommitdiff
path: root/internal/client/ui/ui.go
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-01-22 19:16:51 +0200
committerKyren223 <Kyren223@proton.me>2025-01-22 19:16:51 +0200
commit8702aaac955a6131e7ef7b3827c652b4cd4a7f26 (patch)
tree92a99a2bcfba4ec4b9dd8630125805de630496da /internal/client/ui/ui.go
parent7e0bb07d61b656fedc1ed42b07b4e47765ffb6cf (diff)
Each section in the client (network/frequency/member/chat) now has a
different background color, similar to how discord has it
Diffstat (limited to 'internal/client/ui/ui.go')
-rw-r--r--internal/client/ui/ui.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/client/ui/ui.go b/internal/client/ui/ui.go
index 61bf7bf..12af548 100644
--- a/internal/client/ui/ui.go
+++ b/internal/client/ui/ui.go
@@ -196,3 +196,24 @@ func getLines(s string) (lines []string, widest int) {
func clamp(v, lower, upper int) int {
return min(max(v, lower), upper)
}
+
+/*
+🭊🭂██🭍🬿
+██████
+🭥🭓██🭞🭚
+
+🭠🭘 🭣🭕
+
+🭏🬽 🭈🭄
+*/
+
+func IconStyle(icon string, iconFg, iconBg, bg lipgloss.Color) lipgloss.Style {
+ bgStyle := lipgloss.NewStyle().Background(iconBg).Foreground(bg)
+ top := bgStyle.Render("🭠🭘 🭣🭕")
+ middle := lipgloss.NewStyle().Width(6).Align(lipgloss.Center).
+ Background(iconBg).Foreground(iconFg).Render(icon)
+ bgStyle2 := lipgloss.NewStyle().Foreground(iconBg)
+ bottom := bgStyle2.Render("🭥🭓██🭞🭚")
+ combined := lipgloss.JoinVertical(lipgloss.Left, top, middle, bottom)
+ return lipgloss.NewStyle().SetString(combined)
+}