Skip to content

Commit bb41de4

Browse files
committed
feat: add the date and time field to the search gui
Signed-off-by: hanshal101 <122217807+hanshal101@users.noreply.github.com>
1 parent a2c73d1 commit bb41de4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/search/versionList.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"strings"
7+
"time"
78

89
"github.com/charmbracelet/bubbles/key"
910
"github.com/charmbracelet/bubbles/list"
@@ -36,6 +37,7 @@ func convFPR2Rows(versions *buildsafev1.FetchPackagesResponse) []table.Row {
3637
pkg.SpdxId,
3738
free,
3839
pkg.Homepage,
40+
time.Unix(int64(pkg.EpochSeconds), 0).Format("2006-01-02 15"),
3941
})
4042
}
4143
return items
@@ -50,6 +52,7 @@ func initVersionTable(searchList list.Model, versions *buildsafev1.FetchPackages
5052
{Title: "License", Width: frameWidth / cols},
5153
{Title: "Free", Width: frameWidth / cols},
5254
{Title: "Homepage", Width: frameWidth * 2 / cols},
55+
{Title: "Date", Width: frameWidth / cols},
5356
}
5457

5558
rows := convFPR2Rows(versions)

0 commit comments

Comments
 (0)