[client] Only send packets when the corresponding permission is set
This commit is contained in:
parent
ec61c4d092
commit
e6958e11cb
1 changed files with 4 additions and 2 deletions
|
|
@ -62,12 +62,14 @@ onKeyWithoutEditor cs (Vty.EvKey k _)
|
||||||
| k `elem` downKeys = onUiState cs moveFocusDown
|
| k `elem` downKeys = onUiState cs moveFocusDown
|
||||||
| k `elem` editKeys = onUiState cs editCurrentNode
|
| k `elem` editKeys = onUiState cs editCurrentNode
|
||||||
| k `elem` deleteKeys = do
|
| k `elem` deleteKeys = do
|
||||||
liftIO $ sendPacket (csConn cs) $ ClientDelete (getFocusedPath $ csUiState cs)
|
when (flagDelete $ nodeFlags $ getFocusedNode $ csUiState cs) $
|
||||||
|
liftIO $ sendPacket (csConn cs) $ ClientDelete (getFocusedPath $ csUiState cs)
|
||||||
continue cs
|
continue cs
|
||||||
| k `elem` replyKeys = onUiState cs (replyToCurrentNode . unfoldAtFocus)
|
| k `elem` replyKeys = onUiState cs (replyToCurrentNode . unfoldAtFocus)
|
||||||
| k `elem` replyKeys' = onUiState cs replyAfterCurrentNode
|
| k `elem` replyKeys' = onUiState cs replyAfterCurrentNode
|
||||||
| k `elem` actKeys = do
|
| k `elem` actKeys = do
|
||||||
liftIO $ sendPacket (csConn cs) $ ClientAct (getFocusedPath $ csUiState cs)
|
when (flagAct $ nodeFlags $ getFocusedNode $ csUiState cs) $
|
||||||
|
liftIO $ sendPacket (csConn cs) $ ClientAct (getFocusedPath $ csUiState cs)
|
||||||
continue cs
|
continue cs
|
||||||
where
|
where
|
||||||
quitKeys = [Vty.KChar 'q', Vty.KEsc]
|
quitKeys = [Vty.KChar 'q', Vty.KEsc]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue