Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/UnisonShare/Page/ProjectSettingsPage.elm
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,12 @@ viewWebhooks session model =
divider =
Divider.divider |> Divider.small |> Divider.view

{-
examplesButton =
Button.iconThenLabel ShowWebhookExamplesModal Icon.docs "Webhook example docs"
|> Button.small
|> Button.subdued
|> Button.view
-}
examplesButton =
Button.iconThenLabel ShowWebhookExamplesModal Icon.docs "Webhook example docs"
|> Button.small
|> Button.subdued
|> Button.view

addButton =
Button.iconThenLabel ShowAddWebhookModal Icon.plus "Add a webhook"
|> Button.small
Expand All @@ -591,15 +590,15 @@ viewWebhooks session model =
case model.webhooks of
Success webhooks ->
if List.isEmpty webhooks then
[ header [ class "project-settings_card_header" ] [ h2 [] [ text "Webhooks" ], div [ class "webhook-buttons" ] [ addButton ] ]
[ header [ class "project-settings_card_header" ] [ h2 [] [ text "Webhooks" ], div [ class "webhook-buttons" ] [ examplesButton, addButton ] ]
, div [ class "list_empty-state" ]
[ div [ class "list_empty-state_text" ]
[ Icon.view Icon.wireframeGlobe, text "You haven't set up any webhooks yet" ]
]
]

else
[ header [ class "project-settings_card_header" ] [ h2 [] [ text "Webhooks" ], div [ class "webhook-buttons" ] [ addButton ] ]
[ header [ class "project-settings_card_header" ] [ h2 [] [ text "Webhooks" ], div [ class "webhook-buttons" ] [ examplesButton, addButton ] ]
, div [ class "webhooks" ] (webhooks |> List.map viewWebhook |> List.intersperse divider)
]

Expand Down
Loading