Use native bubble table
This commit is contained in:
@@ -24,10 +24,10 @@ func NewMainPage(common *common.Common) *MainPage {
|
||||
common: common,
|
||||
}
|
||||
|
||||
// m.taskPage = NewReportPage(common, common.TW.GetReport(common.TW.GetConfig().Get("uda.tasksquire.report.default")))
|
||||
m.taskPage = NewTaskPage(common, common.TW.GetReport(common.TW.GetConfig().Get("uda.tasksquire.report.default")))
|
||||
// m.timePage = NewTimePage(common)
|
||||
//
|
||||
// m.activePage = m.taskPage
|
||||
m.activePage = m.taskPage
|
||||
m.currentTab = 0
|
||||
|
||||
return m
|
||||
@@ -82,9 +82,9 @@ func (m *MainPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// activePage, cmd := m.activePage.Update(msg)
|
||||
// m.activePage = activePage.(common.Component)
|
||||
//
|
||||
activePage, cmd := m.activePage.Update(msg)
|
||||
m.activePage = activePage.(common.Component)
|
||||
|
||||
return m, cmd
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ func (m *MainPage) renderTabBar() string {
|
||||
}
|
||||
|
||||
func (m *MainPage) View() tea.View {
|
||||
v := tea.NewView("test")
|
||||
v := tea.NewView(lipgloss.JoinVertical(lipgloss.Left, m.renderTabBar(), m.activePage.View().Content))
|
||||
v.AltScreen = true
|
||||
return v
|
||||
// return lipgloss.JoinVertical(lipgloss.Left, m.renderTabBar(), m.activePage.View())
|
||||
|
||||
Reference in New Issue
Block a user