module Web.View.HubCapabilityManifests.New where
import Web.Types
import Generated.Types
import IHP.Prelude
import IHP.ViewPrelude
data NewView = NewView
{ manifest :: !HubCapabilityManifest
, hubs :: ![Hub]
}
instance View NewView where
html NewView { .. } = [hsx|
New Capability Manifest
A capability manifest lets a domain or shared hub declare the widget types, event types,
annotation categories, and policy scopes it owns. Create a draft, declare your types,
then activate to register them with the framework.
|]
hubOptions :: [Hub] -> [(Text, Id Hub)]
hubOptions hubs = map (\h -> (h.name <> " (" <> h.hubKind <> ")", h.id)) hubs