diff options
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r-- | Assistant/Alert.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs index 9e248571d..108bbdf26 100644 --- a/Assistant/Alert.hs +++ b/Assistant/Alert.hs @@ -19,6 +19,7 @@ import Git.Remote (RemoteName) import Data.String import qualified Data.Text as T +import qualified Control.Exception as E #ifdef WITH_WEBAPP import Assistant.Monad @@ -174,6 +175,17 @@ fsckAlert button n = baseActivityAlert , alertButton = Just button } +showFscking :: UrlRenderer -> Maybe RemoteName -> IO (Either E.SomeException a) -> Assistant a +showFscking urlrenderer remotename a = do +#ifdef WITH_WEBAPP + button <- mkAlertButton False (T.pack "Configure") urlrenderer ConfigFsckR + r <- alertDuring (fsckAlert button remotename) $ + liftIO a + either (liftIO . E.throwIO) return r +#else + a +#endif + brokenRepositoryAlert :: AlertButton -> Alert brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!" |