animate syncing and other activity icons

This commit is contained in:
Joey Hess 2013-04-08 22:54:02 -04:00
parent 77eb11bc9c
commit 1c36af163c
6 changed files with 9 additions and 6 deletions

View file

@ -94,6 +94,7 @@ syncAlert rs = baseActivityAlert
, alertHeader = Just $ tenseWords
[Tensed "Syncing" "Synced", "with", showRemotes rs]
, alertPriority = Low
, alertIcon = Just SyncIcon
}
syncResultAlert :: [Remote] -> [Remote] -> Alert

View file

@ -50,7 +50,7 @@ data Alert = Alert
, alertButton :: Maybe AlertButton
}
data AlertIcon = ActivityIcon | SuccessIcon | ErrorIcon | InfoIcon | TheCloud
data AlertIcon = ActivityIcon | SyncIcon | SuccessIcon | ErrorIcon | InfoIcon | TheCloud
type AlertMap = M.Map AlertId Alert

View file

@ -88,8 +88,9 @@ getClickAlert i = do
redirect $ buttonUrl b
_ -> redirectBack
htmlIcon :: AlertIcon -> GWidget sub master ()
htmlIcon ActivityIcon = bootstrapIcon "refresh"
htmlIcon :: AlertIcon -> GWidget WebApp WebApp ()
htmlIcon ActivityIcon = [whamlet|<img src="@{StaticR activityicon_gif}" alt="">|]
htmlIcon SyncIcon = [whamlet|<img src="@{StaticR syncicon_gif}" alt="">|]
htmlIcon InfoIcon = bootstrapIcon "info-sign"
htmlIcon SuccessIcon = bootstrapIcon "ok"
htmlIcon ErrorIcon = bootstrapIcon "exclamation-sign"

BIN
static/activityicon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
static/syncicon.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View file

@ -36,9 +36,10 @@
$else
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}
$else
$if scanrunning
<i .icon-refresh></i> Scanning for files to transfer
<img src="@{StaticR activityicon_gif}" alt=""> #
Scanning for files to transfer
$else
$if (not transfersrunning)
<i>
(No file transfers running)