Fix build of assistant without yesod.
This commit is contained in:
parent
b74bebc563
commit
c9d58a6590
4 changed files with 14 additions and 14 deletions
|
@ -18,7 +18,6 @@ import qualified Data.Text as T
|
|||
import Data.Text (Text)
|
||||
import qualified Data.Map as M
|
||||
import Data.String
|
||||
import Yesod
|
||||
|
||||
{- Different classes of alerts are displayed differently. -}
|
||||
data AlertClass = Success | Message | Activity | Warning | Error
|
||||
|
@ -57,17 +56,6 @@ data Alert = Alert
|
|||
|
||||
data AlertIcon = ActivityIcon | SuccessIcon | ErrorIcon | InfoIcon | TheCloud
|
||||
|
||||
htmlIcon :: AlertIcon -> GWidget sub master ()
|
||||
htmlIcon ActivityIcon = bootStrapIcon "refresh"
|
||||
htmlIcon InfoIcon = bootStrapIcon "info-sign"
|
||||
htmlIcon SuccessIcon = bootStrapIcon "ok"
|
||||
htmlIcon ErrorIcon = bootStrapIcon "exclamation-sign"
|
||||
-- utf-8 umbrella (utf-8 cloud looks too stormy)
|
||||
htmlIcon TheCloud = [whamlet|☂|]
|
||||
|
||||
bootStrapIcon :: Text -> GWidget sub master ()
|
||||
bootStrapIcon name = [whamlet|<i .icon-#{name}></i>|]
|
||||
|
||||
{- 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. -}
|
||||
|
|
|
@ -9,7 +9,6 @@ module Assistant.NetMessager where
|
|||
|
||||
import Assistant.Common
|
||||
import Assistant.Types.NetMessager
|
||||
import qualified Types.Remote as Remote
|
||||
import qualified Git
|
||||
|
||||
import Control.Concurrent
|
||||
|
@ -17,7 +16,6 @@ import Control.Concurrent.STM
|
|||
import Control.Concurrent.MSampleVar
|
||||
import Control.Exception as E
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Text as T
|
||||
|
||||
sendNetMessage :: NetMessage -> Assistant ()
|
||||
sendNetMessage m =
|
||||
|
@ -95,3 +93,4 @@ queueNetPushMessage _ = return False
|
|||
waitNetPushMessage :: PushSide -> Assistant (NetMessage)
|
||||
waitNetPushMessage side = (atomically . readTChan)
|
||||
<<~ (getSide side . netMessagesPush . netMessager)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ module Assistant.WebApp where
|
|||
|
||||
import Assistant.WebApp.Types
|
||||
import Assistant.Common
|
||||
import Assistant.Alert
|
||||
import Utility.NotificationBroadcaster
|
||||
import Utility.Yesod
|
||||
import Locations.UserConfig
|
||||
|
@ -153,3 +154,14 @@ listOtherRepos = do
|
|||
dirs <- nub <$> ifM (doesFileExist f) ( lines <$> readFile f, return [])
|
||||
names <- mapM relHome dirs
|
||||
return $ sort $ zip names dirs
|
||||
|
||||
htmlIcon :: AlertIcon -> GWidget sub master ()
|
||||
htmlIcon ActivityIcon = bootStrapIcon "refresh"
|
||||
htmlIcon InfoIcon = bootStrapIcon "info-sign"
|
||||
htmlIcon SuccessIcon = bootStrapIcon "ok"
|
||||
htmlIcon ErrorIcon = bootStrapIcon "exclamation-sign"
|
||||
-- utf-8 umbrella (utf-8 cloud looks too stormy)
|
||||
htmlIcon TheCloud = [whamlet|☂|]
|
||||
|
||||
bootStrapIcon :: Text -> GWidget sub master ()
|
||||
bootStrapIcon name = [whamlet|<i .icon-#{name}></i>|]
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
|||
git-annex (3.20121113) UNRELEASED; urgency=low
|
||||
|
||||
* Show error message to user when testing XMPP creds.
|
||||
* Fix build of assistant without yesod.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Tue, 13 Nov 2012 13:17:07 -0400
|
||||
|
||||
|
|
Loading…
Reference in a new issue