module Web.View.HubCapabilityManifests.Edit where import Web.Types import Generated.Types import IHP.Prelude import IHP.ViewPrelude import Data.Aeson (Value(..), encode, decode) import qualified Data.Vector as V import qualified Data.ByteString.Lazy.Char8 as BL data EditView = EditView { manifest :: !HubCapabilityManifest , hub :: !Hub , widgetTypeEntries :: ![WidgetTypeRegistry] , eventTypeEntries :: ![EventTypeRegistry] , categoryEntries :: ![AnnotationCategoryRegistry] , policyScopeEntries :: ![PolicyScopeRegistry] } instance View EditView where html EditView { .. } = [hsx|
Declare the type names this hub owns. After saving, activate the manifest to register them.
{if manifest.status /= "draft" then [hsx|JSON array of type names to declare ownership of. Names that don't yet exist in the registry will be created on activation.
Registered: {intercalate ", " (map (.name) entries)}
JSON array of annotation category names.
Registered: {intercalate ", " (map (.name) entries)}
JSON array of policy scope names.
Registered: {intercalate ", " (map (.name) entries)}