Skip to content

Commit 9eb0c50

Browse files
committed
feat(go to object in alias view)
1 parent 1045190 commit 9eb0c50

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

internal/ui/components/header/header.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (h *HeaderComponent) Update(stats dao.HostStats, shortcuts []string) {
6767

6868
// Clear Sub-Views
6969
h.StatsView.Clear()
70-
h.ShortcutsView.Clear()
70+
// Shortcuts cleared only if changed
7171
h.LogoView.Clear()
7272

7373
// 1. Stats View

internal/ui/views/aliases/aliases.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (a Alias) GetDefaultSortColumn() string {
5252
func Fetch(app common.AppController) ([]dao.Resource, error) {
5353
// Static list of aliases
5454
aliases := []Alias{
55-
{Title: styles.TitleContainers, Resource: "aliases", Group: "internal"},
55+
{Title: styles.TitleAliases, Resource: "aliases", Group: "internal"},
5656
{Title: styles.TitleContainers, Resource: "containers", Group: "docker"},
5757
{Title: styles.TitleImages, Resource: "images", Group: "docker"},
5858
{Title: styles.TitleVolumes, Resource: "volumes", Group: "docker"},
@@ -74,5 +74,13 @@ func GetShortcuts() []string {
7474
}
7575

7676
func InputHandler(v *view.ResourceView, event *tcell.EventKey) *tcell.EventKey {
77+
switch event.Key() {
78+
case tcell.KeyEnter:
79+
id, err := v.GetSelectedID()
80+
if err == nil {
81+
v.App.SwitchTo(id)
82+
return nil
83+
}
84+
}
7785
return event
7886
}

0 commit comments

Comments
 (0)