animate syncing and other activity icons
This commit is contained in:
parent
77eb11bc9c
commit
1c36af163c
6 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
BIN
static/activityicon.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 529 B |
BIN
static/syncicon.gif
Normal file
BIN
static/syncicon.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 847 B |
|
@ -36,9 +36,10 @@
|
|||
$else
|
||||
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
|
||||
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}
|
||||
$if scanrunning
|
||||
<img src="@{StaticR activityicon_gif}" alt=""> #
|
||||
Scanning for files to transfer
|
||||
$else
|
||||
$if scanrunning
|
||||
<i .icon-refresh></i> Scanning for files to transfer
|
||||
$else
|
||||
$if (not transfersrunning)
|
||||
<i>
|
||||
(No file transfers running)
|
||||
|
|
Loading…
Add table
Reference in a new issue