Skip to content

Commit

Permalink
feat: add the date and time field to the search gui
Browse files Browse the repository at this point in the history
Signed-off-by: hanshal101 <[email protected]>
  • Loading branch information
hanshal101 committed Nov 18, 2024
1 parent a2c73d1 commit bb41de4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/search/versionList.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"strings"
"time"

"github.com/charmbracelet/bubbles/key"
"github.com/charmbracelet/bubbles/list"
Expand Down Expand Up @@ -36,6 +37,7 @@ func convFPR2Rows(versions *buildsafev1.FetchPackagesResponse) []table.Row {
pkg.SpdxId,
free,
pkg.Homepage,
time.Unix(int64(pkg.EpochSeconds), 0).Format("2006-01-02 15"),
})
}
return items
Expand All @@ -50,6 +52,7 @@ func initVersionTable(searchList list.Model, versions *buildsafev1.FetchPackages
{Title: "License", Width: frameWidth / cols},
{Title: "Free", Width: frameWidth / cols},
{Title: "Homepage", Width: frameWidth * 2 / cols},
{Title: "Date", Width: frameWidth / cols},
}

rows := convFPR2Rows(versions)
Expand Down

0 comments on commit bb41de4

Please sign in to comment.