add git fsck to cronner, and UI for repository repair (not yet wired up)

This commit is contained in:
Joey Hess 2013-10-22 16:02:52 -04:00
parent 44bb9a808f
commit d345e5b52f
12 changed files with 163 additions and 18 deletions

View file

@ -79,6 +79,22 @@ warningAlert name msg = Alert
, alertButton = Nothing
}
errorAlert :: String -> AlertButton -> Alert
errorAlert msg button = Alert
{ alertClass = Error
, alertHeader = Just $ tenseWords ["error"]
, alertMessageRender = renderData
, alertData = [UnTensed $ T.pack msg]
, alertCounter = 0
, alertBlockDisplay = True
, alertClosable = True
, alertPriority = Pinned
, alertIcon = Just ErrorIcon
, alertCombiner = Nothing
, alertName = Nothing
, alertButton = Just button
}
activityAlert :: Maybe TenseText -> [TenseChunk] -> Alert
activityAlert header dat = baseActivityAlert
{ alertHeader = header
@ -158,6 +174,9 @@ fsckAlert button n = baseActivityAlert
, alertButton = Just button
}
brokenRepositoryAlert :: AlertButton -> Alert
brokenRepositoryAlert = errorAlert "Your repository needs repairs."
pairingAlert :: AlertButton -> Alert
pairingAlert button = baseActivityAlert
{ alertData = [ UnTensed "Pairing in progress" ]