Skip to content

Commit 517e603

Browse files
committed
footer fix on audit log
1 parent d60bee3 commit 517e603

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

internal/tui/audit_log.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ func (m *auditLogModel) View() string {
221221
} else {
222222
b.WriteString(m.renderAuditLogTable())
223223
}
224-
// Always show the styled help line/footer at the bottom
225-
b.WriteString("\n")
224+
// Always show the styled help line/footer at the bottom, single line, styled
226225
footerStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Background(lipgloss.Color("236")).Padding(0, 1).Italic(true)
227-
b.WriteString(footerStyle.Render(m.footerView()))
226+
b.WriteString("\n")
227+
b.WriteString(footerStyle.Render(m.footerLine()))
228228
return b.String()
229229
}
230230

231-
func (m *auditLogModel) footerView() string {
231+
func (m *auditLogModel) footerLine() string {
232232
var filterStatus string
233233
colNames := []string{
234234
i18n.T("all"),
@@ -238,13 +238,14 @@ func (m *auditLogModel) footerView() string {
238238
i18n.T("audit_log.header.details"),
239239
}
240240
if m.isFiltering {
241-
filterStatus = fmt.Sprintf("Filter [%s]: %s█ (tab to change column)", colNames[m.filterCol], m.filter)
241+
filterStatus = fmt.Sprintf(i18n.T("audit_log.filtering"), colNames[m.filterCol], m.filter)
242242
} else if m.filter != "" {
243-
filterStatus = fmt.Sprintf("Filter [%s]: %s (press 'esc' to clear)", colNames[m.filterCol], m.filter)
243+
filterStatus = fmt.Sprintf(i18n.T("audit_log.filter_active"), colNames[m.filterCol], m.filter)
244244
} else {
245-
filterStatus = "Press / to filter..."
245+
filterStatus = i18n.T("audit_log.filter_hint")
246246
}
247-
return helpStyle.Render(fmt.Sprintf("\n(↑/↓ to scroll, tab: column, q to quit) %s", filterStatus))
247+
// Single line: help and filter status
248+
return fmt.Sprintf("%s %s", i18n.T("audit_log.footer"), filterStatus)
248249
}
249250

250251
func (m *auditLogModel) renderAuditLogTable() string {

0 commit comments

Comments
 (0)