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|
← Capability Manifests

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.
{selectField #hubId (hubOptions hubs)}
{(textareaField #capabilityDescription) { fieldClass = "w-full border border-gray-300 rounded px-3 py-2 text-sm" }}
{(textField #contact) { fieldClass = "w-full border border-gray-300 rounded px-3 py-2 text-sm" }}
|] hubOptions :: [Hub] -> [(Text, Id Hub)] hubOptions hubs = map (\h -> (h.name <> " (" <> h.hubKind <> ")", h.id)) hubs