webapp: Show a network signal icon next to ssh remotes that it's currently connected with.
This commit is contained in:
parent
356eec08a6
commit
33b8cff433
8 changed files with 51 additions and 20 deletions
|
@ -26,6 +26,7 @@ import Data.Time.Clock.POSIX
|
|||
import Data.Time
|
||||
import System.Locale
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Text as T
|
||||
|
||||
getDaemonStatus :: Assistant DaemonStatus
|
||||
|
@ -78,6 +79,15 @@ updateSyncRemotes = do
|
|||
M.filter $ \alert ->
|
||||
alertName alert /= Just CloudRepoNeededAlert
|
||||
|
||||
changeCurrentlyConnected :: (S.Set UUID -> S.Set UUID) -> Assistant ()
|
||||
changeCurrentlyConnected sm = do
|
||||
modifyDaemonStatus_ $ \ds -> ds
|
||||
{ currentlyConnectedRemotes = sm (currentlyConnectedRemotes ds)
|
||||
}
|
||||
v <- currentlyConnectedRemotes <$> getDaemonStatus
|
||||
debug [show v]
|
||||
liftIO . sendNotification =<< syncRemotesNotifier <$> getDaemonStatus
|
||||
|
||||
updateScheduleLog :: Assistant ()
|
||||
updateScheduleLog =
|
||||
liftIO . sendNotification =<< scheduleLogNotifier <$> getDaemonStatus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue