mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 17:52:33 +02:00
add pages "update" label
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,8 @@ type pageEntry struct {
|
||||
isEditing func(m *Model) bool
|
||||
// resize propagates a new (w, h) to the page model.
|
||||
resize func(m *Model, w, h int)
|
||||
// hasUpdate reports whether the page has unseen updates.
|
||||
hasUpdate func(m *Model) bool
|
||||
}
|
||||
|
||||
var pageRegistry = []pageEntry{
|
||||
@@ -52,6 +54,7 @@ var pageRegistry = []pageEntry{
|
||||
},
|
||||
isEditing: func(m *Model) bool { return m.intercept.IsEditing() },
|
||||
resize: func(m *Model, w, h int) { m.intercept.SetSize(w, h) },
|
||||
hasUpdate: func(m *Model) bool { return m.intercept.HasUnread() },
|
||||
},
|
||||
{
|
||||
id: pageHistory,
|
||||
@@ -114,7 +117,8 @@ var pageRegistry = []pageEntry{
|
||||
m.findingsPage = updated.(findingsUI.Model)
|
||||
return cmd
|
||||
},
|
||||
resize: func(m *Model, w, h int) { m.findingsPage.SetSize(w, h) },
|
||||
resize: func(m *Model, w, h int) { m.findingsPage.SetSize(w, h) },
|
||||
hasUpdate: func(m *Model) bool { return m.findingsPage.HasUnread() },
|
||||
},
|
||||
{
|
||||
id: pageDocs,
|
||||
|
||||
Reference in New Issue
Block a user