better word wrapping
This commit is contained in:
parent
dd97273fb7
commit
9e8e1ee1ba
3 changed files with 5 additions and 14 deletions
|
@ -26,7 +26,6 @@ import qualified Git
|
|||
import Text.Hamlet
|
||||
import qualified Data.Map as M
|
||||
import Control.Concurrent
|
||||
import qualified Data.Text as T
|
||||
|
||||
{- A display of currently running and queued transfers.
|
||||
-
|
||||
|
@ -48,16 +47,6 @@ transfersDisplay warnNoScript = do
|
|||
isrunning info = not $
|
||||
transferPaused info || isNothing (startedTime info)
|
||||
|
||||
{- Long filenames can mess up the transfer display, due to the
|
||||
- browser not word-wrapping them because it thinks this_is/all_one_word.
|
||||
-
|
||||
- To deal with this, insert zero-width spaces every 10 characters.
|
||||
-}
|
||||
segmentFilePath :: FilePath -> T.Text
|
||||
segmentFilePath = T.intercalate zspace . T.chunksOf 10 . T.pack
|
||||
where
|
||||
zspace = T.singleton '\8203'
|
||||
|
||||
{- Simplifies a list of transfers, avoiding display of redundant
|
||||
- equivilant transfers. -}
|
||||
simplifyTransfers :: [(Transfer, TransferInfo)] -> [(Transfer, TransferInfo)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue