on master help sign in
Do not use unicode chars
6e40535hsloan
lib/cliapp/src/Obelisk/CliApp/Spinner.hs+10−10
@@ -72,11 +72,11 @@ withSpinner' msg mkTrail action = do
72 logMessage Output_ClearLine
72 logMessage Output_ClearLine
73 logsM <- modifyStack $ popSpinner $ case resultM of
73 logsM <- modifyStack $ popSpinner $ case resultM of
74 Nothing ->
74 Nothing ->
75− ( TerminalString_Colorized Red "✖"
75+ ( TerminalString_Colorized Red "FAILED"
76 , Just msg -- Always display final message if there was an exception.
76 , Just msg -- Always display final message if there was an exception.
77 )
77 )
78 Just result ->
78 Just result ->
79− ( TerminalString_Colorized Green "✔"
79+ ( TerminalString_Colorized Green "DONE"
80 , mkTrail <*> pure result
80 , mkTrail <*> pure result
81 )
81 )
82 -- Last message, finish off with newline.
82 -- Last message, finish off with newline.
@@ -102,7 +102,7 @@ withSpinner' msg mkTrail action = do
102 =<< fmap _cliConfig_spinnerStack getCliConfig
102 =<< fmap _cliConfig_spinnerStack getCliConfig
103 modifyStack f = liftIO . flip atomicModifyIORef' f
103 modifyStack f = liftIO . flip atomicModifyIORef' f
104 =<< fmap _cliConfig_spinnerStack getCliConfig
104 =<< fmap _cliConfig_spinnerStack getCliConfig
105− spinner = coloredSpinner defaultSpinnerTheme
105+ spinner = coloredSpinner minimalSpinnerTheme
106
106
107-- | How nested spinner logs should be displayed
107-- | How nested spinner logs should be displayed
108renderSpinnerStack
108renderSpinnerStack
@@ -114,7 +114,7 @@ renderSpinnerStack mark = L.intersperse space . go . L.reverse
114 go [] = []
114 go [] = []
115 go (x:[]) = mark : [x]
115 go (x:[]) = mark : [x]
116 go (x:xs) = arrow : x : go xs
116 go (x:xs) = arrow : x : go xs
117− arrow = TerminalString_Colorized Blue "⇾"
117+ arrow = TerminalString_Colorized Blue "->"
118 space = TerminalString_Normal " "
118 space = TerminalString_Normal " "
119
119
120-- | A spinner is simply an infinite list of strings that supplant each other in a delayed loop, creating the
120-- | A spinner is simply an infinite list of strings that supplant each other in a delayed loop, creating the
@@ -133,14 +133,14 @@ runSpinner spinner f = forM_ spinner $ f >=> const delay
133type SpinnerTheme = [Text]
133type SpinnerTheme = [Text]
134
134
135-- Find more spinners at https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json
135-- Find more spinners at https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json
136−_spinnerCircleHalves :: SpinnerTheme
136+_spinnerSticks :: SpinnerTheme
137−_spinnerCircleHalves = ["◐", "◓", "◑", "◒"]
137+_spinnerSticks = ["|", "/", "-", "\\"]
138
138
139−spinnerMoon :: SpinnerTheme
139+spinnerStick :: SpinnerTheme
140−spinnerMoon = ["🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"]
140+spinnerStick = ["|", "/", "-", "\\"]
141
141
142−defaultSpinnerTheme :: SpinnerTheme
142+minimalSpinnerTheme :: SpinnerTheme
143−defaultSpinnerTheme = spinnerMoon
143+minimalSpinnerTheme = spinnerStick
144
144
145-- | Like `bracket` but the `release` function can know whether an exception was raised
145-- | Like `bracket` but the `release` function can know whether an exception was raised
146bracket' :: MonadMask m => m a -> (a -> Maybe c -> m b) -> (a -> m c) -> m c
146bracket' :: MonadMask m => m a -> (a -> Maybe c -> m b) -> (a -> m c) -> m c