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
|
, alertHeader = Just $ tenseWords
|
||||||
[Tensed "Syncing" "Synced", "with", showRemotes rs]
|
[Tensed "Syncing" "Synced", "with", showRemotes rs]
|
||||||
, alertPriority = Low
|
, alertPriority = Low
|
||||||
|
, alertIcon = Just SyncIcon
|
||||||
}
|
}
|
||||||
|
|
||||||
syncResultAlert :: [Remote] -> [Remote] -> Alert
|
syncResultAlert :: [Remote] -> [Remote] -> Alert
|
||||||
|
|
|
@ -50,7 +50,7 @@ data Alert = Alert
|
||||||
, alertButton :: Maybe AlertButton
|
, alertButton :: Maybe AlertButton
|
||||||
}
|
}
|
||||||
|
|
||||||
data AlertIcon = ActivityIcon | SuccessIcon | ErrorIcon | InfoIcon | TheCloud
|
data AlertIcon = ActivityIcon | SyncIcon | SuccessIcon | ErrorIcon | InfoIcon | TheCloud
|
||||||
|
|
||||||
type AlertMap = M.Map AlertId Alert
|
type AlertMap = M.Map AlertId Alert
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,9 @@ getClickAlert i = do
|
||||||
redirect $ buttonUrl b
|
redirect $ buttonUrl b
|
||||||
_ -> redirectBack
|
_ -> redirectBack
|
||||||
|
|
||||||
htmlIcon :: AlertIcon -> GWidget sub master ()
|
htmlIcon :: AlertIcon -> GWidget WebApp WebApp ()
|
||||||
htmlIcon ActivityIcon = bootstrapIcon "refresh"
|
htmlIcon ActivityIcon = [whamlet|<img src="@{StaticR activityicon_gif}" alt="">|]
|
||||||
|
htmlIcon SyncIcon = [whamlet|<img src="@{StaticR syncicon_gif}" alt="">|]
|
||||||
htmlIcon InfoIcon = bootstrapIcon "info-sign"
|
htmlIcon InfoIcon = bootstrapIcon "info-sign"
|
||||||
htmlIcon SuccessIcon = bootstrapIcon "ok"
|
htmlIcon SuccessIcon = bootstrapIcon "ok"
|
||||||
htmlIcon ErrorIcon = bootstrapIcon "exclamation-sign"
|
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
|
$else
|
||||||
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
|
^{actionButton (StartTransferR transfer) Nothing (Just "continue") "btn" "icon-play"}
|
||||||
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}
|
^{actionButton (CancelTransferR transfer) Nothing (Just "cancel") "btn" "icon-remove"}
|
||||||
|
$if scanrunning
|
||||||
|
<img src="@{StaticR activityicon_gif}" alt=""> #
|
||||||
|
Scanning for files to transfer
|
||||||
$else
|
$else
|
||||||
$if scanrunning
|
$if (not transfersrunning)
|
||||||
<i .icon-refresh></i> Scanning for files to transfer
|
|
||||||
$else
|
|
||||||
<i>
|
<i>
|
||||||
(No file transfers running)
|
(No file transfers running)
|
||||||
|
|
Loading…
Add table
Reference in a new issue