From 40c2e698448c7f1af531d1474cf66c4a07f6c3ed Mon Sep 17 00:00:00 2001 From: Priyansh Date: Wed, 27 Aug 2025 14:57:20 +0530 Subject: Add version and build date to globals --- screens/screens.go | 8 +++++++- screens/types.go | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/screens/screens.go b/screens/screens.go index 77197ca..5e087b8 100644 --- a/screens/screens.go +++ b/screens/screens.go @@ -1,6 +1,7 @@ package screens import ( + "nectar/build" "os" tea "github.com/charmbracelet/bubbletea" @@ -53,7 +54,12 @@ func Start() tea.Model { height = 24 } - globals = Globals{width: width, height: height} + globals = Globals{ + width: width, + height: height, + buildDate: build.Date, + version: build.Version, + } return &ScreenManager{currentScreen: _root()} } diff --git a/screens/types.go b/screens/types.go index 1d89809..99541c4 100644 --- a/screens/types.go +++ b/screens/types.go @@ -1,6 +1,8 @@ package screens type Globals struct { - width int - height int + width int + height int + buildDate string + version string } -- cgit v1.2.3