add a alert at the top of the main part of the webapp, above the transfers display

Based on feedback that it was too sparse to be clear what it's doing.
This commit is contained in:
Joey Hess 2012-09-28 13:30:29 -04:00
parent af8b65cf24
commit 1087fac544
2 changed files with 7 additions and 1 deletions

View file

@ -44,7 +44,6 @@ transfersDisplay warnNoScript = do
webapp <- lift getYesod webapp <- lift getYesod
current <- lift $ M.toList <$> getCurrentTransfers current <- lift $ M.toList <$> getCurrentTransfers
queued <- liftIO $ getTransferQueue $ transferQueue webapp queued <- liftIO $ getTransferQueue $ transferQueue webapp
let ident = "transfers"
autoUpdate ident NotifierTransfersR (10 :: Int) (10 :: Int) autoUpdate ident NotifierTransfersR (10 :: Int) (10 :: Int)
let transfers = simplifyTransfers $ current ++ queued let transfers = simplifyTransfers $ current ++ queued
if null transfers if null transfers
@ -54,6 +53,7 @@ transfersDisplay warnNoScript = do
) )
else $(widgetFile "dashboard/transfers") else $(widgetFile "dashboard/transfers")
where where
ident = "transfers"
isrunning info = not $ isrunning info = not $
transferPaused info || isNothing (startedTime info) transferPaused info || isNothing (startedTime info)

View file

@ -1,4 +1,10 @@
<div .span9 ##{ident}> <div .span9 ##{ident}>
$maybe reldir <- relDir webapp
<div .alert .alert-info>
<p>
git-annex is watching over your files in #
<small><tt>#{reldir}</tt></small>, #
and keeping them in sync with other repositories.
$if null transfers $if null transfers
$else $else
<h2>Transfers <h2>Transfers