Skip to content

Commit

Permalink
add app name
Browse files Browse the repository at this point in the history
  • Loading branch information
ross96D committed Sep 17, 2024
1 parent 7325313 commit 995cf23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/client/views/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/x/ansi"
"github.com/ross96D/updater/cmd/client/state"
"github.com/ross96D/updater/server/user_handler"
)
Expand Down Expand Up @@ -65,7 +66,7 @@ func (av AppView) View() string {
}

return lipgloss.JoinVertical(lipgloss.Top,
"TODO: app name is missing",
strconv.Itoa(av.App.Index)+" "+ansi.Wrap(av.App.Name, 25, "..."),
av.viewPort.View(),
"Press u to update the application",
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/client/views/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/x/ansi"
"github.com/ross96D/updater/cmd/client/components"
"github.com/ross96D/updater/cmd/client/components/list"
"github.com/ross96D/updater/cmd/client/models"
Expand Down Expand Up @@ -75,7 +76,7 @@ func (sv *ServerView) init() {

for i := 0; i < length; i++ {
items = append(items, list.Item[*user_handler.App]{
Message: strconv.Itoa(sv.Server.Apps[i].Index) + " TODO missing name",
Message: strconv.Itoa(sv.Server.Apps[i].Index) + " " + ansi.Wrap(sv.Server.Apps[i].Name, 25, "..."),
Value: &sv.Server.Apps[i],
})
}
Expand Down

0 comments on commit 995cf23

Please sign in to comment.