Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fixes #122

Merged
merged 2 commits into from
Aug 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/reactotron-cli/src/ui/drawing.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ export default (layout, config) => {

const drawStateActionComplete = payload => {
const {name, ms, action} = payload
const msText = ms && Number(ms).toFixed(0)
const msSuffix = ms && 'ms'
const time = timeStamp()
layout.stateActionBox.log(`${time} {cyan-fg}${name}{/}{|}{white-fg}${ms}{/}ms`)
layout.stateActionBox.log(`${time} {cyan-fg}${name}{/}{|}{white-fg}${msText}{/}${msSuffix}`)
if (config.stateActionLoggingStyle === 'full') {
layout.stateActionBox.log(action)
layout.stateActionBox.log('')
Expand Down
4 changes: 2 additions & 2 deletions packages/reactotron-cli/src/ui/reactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default (context) => {

// when clients come & go
observe(server.connections, ({added, removed}) => {
R.forEach(ui.drawConnection, added)
R.forEach(ui.drawDisconnection, removed)
})

Expand All @@ -24,7 +23,8 @@ export default (context) => {
{ command: 'state.action.complete', handler: ui.drawStateActionComplete },
{ command: 'state.keys.response', handler: ui.drawStateKeysResponse },
{ command: 'state.values.response', handler: ui.drawStateValuesResponse },
{ command: 'state.values.change', handler: ui.drawStateValuesChange }
{ command: 'state.values.change', handler: ui.drawStateValuesChange },
{ command: 'client.intro', handler: ui.drawConnection }
]

// how we hook that up
Expand Down