summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/components/logs
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui/components/logs')
-rw-r--r--internal/tui/components/logs/details.go16
-rw-r--r--internal/tui/components/logs/table.go3
2 files changed, 5 insertions, 14 deletions
diff --git a/internal/tui/components/logs/details.go b/internal/tui/components/logs/details.go
index 7c74da104..fa49adbbb 100644
--- a/internal/tui/components/logs/details.go
+++ b/internal/tui/components/logs/details.go
@@ -119,27 +119,17 @@ func (i *detailCmp) GetSize() (int, int) {
return i.width, i.height
}
-func (i *detailCmp) SetSize(width int, height int) {
+func (i *detailCmp) SetSize(width int, height int) tea.Cmd {
i.width = width
i.height = height
i.viewport.Width = i.width
i.viewport.Height = i.height
i.updateContent()
+ return nil
}
func (i *detailCmp) BindingKeys() []key.Binding {
- return []key.Binding{
- i.viewport.KeyMap.PageDown,
- i.viewport.KeyMap.PageUp,
- i.viewport.KeyMap.HalfPageDown,
- i.viewport.KeyMap.HalfPageUp,
- }
-}
-
-func (i *detailCmp) BorderText() map[layout.BorderPosition]string {
- return map[layout.BorderPosition]string{
- layout.TopLeftBorder: "Log Details",
- }
+ return layout.KeyMapToSlice(i.viewport.KeyMap)
}
func NewLogsDetails() DetailComponent {
diff --git a/internal/tui/components/logs/table.go b/internal/tui/components/logs/table.go
index 2d0f9c533..245714d0d 100644
--- a/internal/tui/components/logs/table.go
+++ b/internal/tui/components/logs/table.go
@@ -68,7 +68,7 @@ func (i *tableCmp) GetSize() (int, int) {
return i.table.Width(), i.table.Height()
}
-func (i *tableCmp) SetSize(width int, height int) {
+func (i *tableCmp) SetSize(width int, height int) tea.Cmd {
i.table.SetWidth(width)
i.table.SetHeight(height)
cloumns := i.table.Columns()
@@ -77,6 +77,7 @@ func (i *tableCmp) SetSize(width int, height int) {
cloumns[i] = col
}
i.table.SetColumns(cloumns)
+ return nil
}
func (i *tableCmp) BindingKeys() []key.Binding {