summaryrefslogtreecommitdiff
path: root/Assistant/Alert.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r--Assistant/Alert.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs
index 57674e2f3..f67de2402 100644
--- a/Assistant/Alert.hs
+++ b/Assistant/Alert.hs
@@ -53,9 +53,13 @@ data Alert = Alert
, alertButton :: Maybe AlertButton
}
+{- When clicked, a button always redirects to a URL
+ - It may also run an IO action in the background, which is useful
+ - to make the button close or otherwise change the alert. -}
data AlertButton = AlertButton
- { buttonUrl :: Text
- , buttonLabel :: Text
+ { buttonLabel :: Text
+ , buttonUrl :: Text
+ , buttonAction :: Maybe (AlertId -> IO ())
}
type AlertPair = (AlertId, Alert)