Skip to content

Commit

Permalink
fix: minor debug bar style refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
glouvigny committed Feb 26, 2019
1 parent 2e8f9de commit 2a27a75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions client/react-native/common/components/Library/DebugStateBar.js
Expand Up @@ -35,6 +35,7 @@ class DebugStateBar extends PureComponent {
daemonState: daemonStateValues.down,
peers: [],
compact: true,
collapsed: true,
}
}

Expand Down Expand Up @@ -216,11 +217,8 @@ class DebugStateBar extends PureComponent {
const count = peers.reduce((acc, cur) => cur.connection === 1 ? acc + 1 : acc, 0)

return (
<Flex.Cols size={1}>
<View style={{ marginRight: 2 }} {...this.props.panHandlers}>
<Text icon={'menu'} />
</View>
<View style={{ marginRight: 2 }}>
<Flex.Cols size={1} style={[{ backgroundColor: '#EAF0FCee', padding: 8, borderRadius: 8 }]}>
{!this.state.collapsed && <View style={{ marginRight: 2 }}>
<Text icon='berty-berty_picto' size={5} padding={5} rounded small background={bgBertyColor} color={bertyColor}>{
this.state.compact ? <Icon name={
this.state.daemonState === daemonStateValues.connected
Expand All @@ -229,15 +227,21 @@ class DebugStateBar extends PureComponent {
? 'x-circle' : 'more-horizontal'
} color={bertyColor} /> : bertyText.toLocaleUpperCase()
}</Text>
</View>
<View style={{ marginRight: 2 }}>
</View>}
{!this.state.collapsed && <View style={{ marginRight: 2 }}>
<Text icon='berty-chart-network-solid' size={5} padding={5} rounded small background={bgPeerColor} color={peerColor} onPress={() => NavigationService.navigate('network/peers')}>{count.toString()}</Text>
</View>
<View style={{ marginRight: 2 }}>
</View>}
{!this.state.collapsed && <View style={{ marginRight: 2 }}>
<Text icon='bluetooth' size={5} padding={5} rounded small background={bgBleColor} color={bleColor} onPress={() => NavigationService.navigate('network/config')}>{bleText.toLocaleUpperCase()}</Text>
</View>
<View style={{ marginRight: 2 }}>
</View>}
{!this.state.collapsed && <View style={{ marginRight: 2 }}>
<Text icon='settings' size={5} padding={5} rounded small background={colors.darkGrey} color={colors.inputGrey} onPress={() => NavigationService.navigate('settings/devtools')} />
</View>}
<View style={{ marginRight: 2 }}>
<Text icon={this.state.collapsed ? 'chevrons-left' : 'chevrons-right'} size={5} padding={5} rounded small background={colors.inputGrey} color={colors.darkGrey} onPress={() => this.setState({ collapsed: !this.state.collapsed })} />
</View>
<View style={{ marginRight: 2 }} {...this.props.panHandlers}>
<Text icon={'menu'} large padding />
</View>
</Flex.Cols>
)
Expand Down
2 changes: 1 addition & 1 deletion client/react-native/common/components/Library/Header.js
Expand Up @@ -5,7 +5,7 @@ import { colors } from '../../constants'
import { padding, borderBottom } from '../../styles'
import { isRTL } from '../../i18n'

const [defaultTextColor, defaultBackColor] = [colors.black, colors.white]
const [defaultTextColor, defaultBackColor] = [colors.fakeBlack, colors.white]

const HeaderButton = ({ icon, color, style, ...otherProps }) => {
return <Button icon={icon} large color={color} {...otherProps} />
Expand Down

0 comments on commit 2a27a75

Please sign in to comment.