detect when unwanted remote is empty and remove it
Needs fixes to build when the webapp is disabled.
This commit is contained in:
parent
8a5b397ac4
commit
9a5f421768
13 changed files with 157 additions and 42 deletions
|
@ -34,6 +34,7 @@ data AlertName
|
|||
| WarningAlert String
|
||||
| PairAlert String
|
||||
| XMPPNeededAlert
|
||||
| RemoteRemovalAlert String
|
||||
| CloudRepoNeededAlert
|
||||
| SyncAlert
|
||||
deriving (Eq)
|
||||
|
@ -351,6 +352,23 @@ cloudRepoNeededAlert friendname button = Alert
|
|||
, alertData = []
|
||||
}
|
||||
|
||||
remoteRemovalAlert :: String -> AlertButton -> Alert
|
||||
remoteRemovalAlert desc button = Alert
|
||||
{ alertHeader = Just $ fromString $
|
||||
"The repository \"" ++ desc ++
|
||||
"\" has been emptied, and can now be removed."
|
||||
, alertIcon = Just InfoIcon
|
||||
, alertPriority = High
|
||||
, alertButton = Just button
|
||||
, alertClosable = True
|
||||
, alertClass = Message
|
||||
, alertMessageRender = tenseWords
|
||||
, alertBlockDisplay = True
|
||||
, alertName = Just $ RemoteRemovalAlert desc
|
||||
, alertCombiner = Just $ dataCombiner $ \_old new -> new
|
||||
, alertData = []
|
||||
}
|
||||
|
||||
fileAlert :: TenseChunk -> FilePath -> Alert
|
||||
fileAlert msg file = (activityAlert Nothing [f])
|
||||
{ alertName = Just $ FileAlert msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue