mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Added capability filter
This commit is contained in:
parent
770eb43e52
commit
395c96c7a4
11
ui/ui.go
11
ui/ui.go
@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/mrusme/gobbs/ui/ctx"
|
||||
"github.com/mrusme/gobbs/ui/navigation"
|
||||
"github.com/mrusme/gobbs/ui/views/posts"
|
||||
|
||||
"github.com/mrusme/gobbs/ui/views"
|
||||
|
||||
@ -124,6 +125,16 @@ func NewModel(c *ctx.Ctx) Model {
|
||||
}
|
||||
|
||||
m.nav = navigation.NewModel(m.ctx)
|
||||
for _, capability := range (*m.ctx.Systems[0]).GetCapabilities() { // TODO
|
||||
switch capability.ID {
|
||||
case "posts":
|
||||
m.views = append(m.views, posts.NewModel(m.ctx))
|
||||
// case "groups":
|
||||
// m.views = append(m.views, groups.NewModel(m.ctx))
|
||||
// case "search":
|
||||
// m.views = append(m.views, search.NewModel(m.ctx))
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user