Skip to content

Commit 6f712b9

Browse files
committed
Some renaming and UI cleanup.
1 parent 912255b commit 6f712b9

File tree

19 files changed

+271
-267
lines changed

19 files changed

+271
-267
lines changed

src/components/P0rtalTopBar.js

Lines changed: 33 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,17 @@ import { observable } from 'mobx'
1414
import { observer } from 'mobx-react/native'
1515
import stores from '../stores'
1616

17+
import {
18+
Icon
19+
} from 'react-native-elements'
20+
1721
@observer
1822
export default class P0rtalTopBar extends React.Component {
1923
constructor(props) {
2024
super(props)
2125

22-
console.log('P0rtalTopBar received props', props)
23-
2426
this._closeP0rtal = this._closeP0rtal.bind(this)
2527
this._loadHelp = this._loadHelp.bind(this)
26-
this._signOut = this._signOut.bind(this)
27-
}
28-
29-
componentDidAppear() {
30-
console.log('RNN', 'CTB.componentDidAppear')
31-
}
32-
33-
componentDidDisappear() {
34-
console.log('RNN', `CTB.componentDidDisappear`)
35-
}
36-
37-
componentDidMount() {
38-
console.log('RNN', `CTB.componentDidMount`)
39-
}
40-
41-
componentWillUnmount() {
42-
console.log('RNN', `CTB.componentWillUnmount`)
4328
}
4429

4530
render() {
@@ -50,62 +35,60 @@ export default class P0rtalTopBar extends React.Component {
5035
<Text style={ styles.headingText }>{ stores.P0rtal.title }</Text>
5136
</View>
5237

53-
<View style={{ width: 100, flexDirection: 'row' }}>
54-
<TouchableOpacity style={ styles.button } onPress={ this._closeP0rtal }>
55-
<Text style={ styles.buttonText }>Close</Text>
56-
</TouchableOpacity>
57-
58-
<TouchableOpacity style={ styles.button } onPress={ this._loadHelp }>
59-
<Text style={ styles.buttonText }>Help</Text>
60-
</TouchableOpacity>
61-
62-
<TouchableOpacity style={ styles.button } onPress={ this._signOut }>
63-
<Text style={ styles.buttonText }>Sign Out</Text>
64-
</TouchableOpacity>
38+
<View style={ styles.navButtons }>
39+
<Icon
40+
reverse
41+
name='question-circle-o'
42+
type='font-awesome'
43+
color='#6f07ef'
44+
size={ 16 }
45+
onPress={ this._loadHelp } />
46+
47+
<Icon
48+
reverse
49+
name='close'
50+
type='font-awesome'
51+
color='#6f07ef'
52+
size={ 16 }
53+
onPress={ this._closeP0rtal } />
6554
</View>
6655
</View>
6756
}
6857

6958
_closeP0rtal() {
7059
Navigation.mergeOptions('zeronet.P0rtal', {
71-
sideMenu: {
72-
right: {
73-
visible: false
74-
}
75-
}
60+
sideMenu: { right: { visible: false }}
7661
})
7762
}
7863

7964
_loadHelp() {
8065
Navigation.push('zeronet.P0rtal', {
81-
component: {
82-
name: 'zeronet.P0rtal.Help'
83-
}
66+
component: { name: 'zeronet.P0rtal.Help' }
8467
})
8568
}
8669

87-
_signOut() {
88-
stores.P0rtal.exit()
89-
}
90-
9170
}
9271

9372
const styles = StyleSheet.create({
9473
container: {
95-
// padding: 10,
9674
height: 56,
97-
// flex: 1,
9875
flexDirection: 'row',
99-
// width: 350
100-
backgroundColor: 'rgba(180, 30, 30, 0.5)'
76+
backgroundColor: 'rgba(245, 245, 245, 1.0)',
77+
justifyContent: 'space-between'
10178
},
10279
heading: {
103-
width: 100,
104-
backgroundColor: 'rgba(30, 180, 30, 0.5)'
80+
width: 200,
81+
// backgroundColor: 'rgba(30, 120, 30, 0.2)',
82+
justifyContent: 'center'
10583
},
10684
headingText: {
10785
color: 'black',
108-
fontSize: 20
86+
fontSize: 26
87+
},
88+
navButtons: {
89+
width: 100,
90+
flexDirection: 'row',
91+
alignItems: 'center'
10992
},
11093
button: {
11194
margin: 5,

src/constants/Styles.js

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
StyleSheet
44
} from 'react-native'
55

6-
import Colors from './Colors'
7-
import Layout from './Layout'
6+
// import Colors from './Colors'
7+
// import Layout from './Layout'
88

99
export default StyleSheet.create({
1010
/* Containers */
@@ -27,35 +27,31 @@ export default StyleSheet.create({
2727

2828
borderRadius : 10,
2929
borderWidth : 2,
30-
borderColor : Colors.tintColor
30+
// borderColor : Colors.tintColor
3131
},
3232
scrollContainer: {
3333

3434
},
3535

3636
/* Headings */
3737
banner: {
38-
width : Layout.width,
39-
height : Layout.width * 0.25
38+
// width : Layout.width,
39+
// height : Layout.width * 0.25
4040
},
4141

4242
/* Rows */
4343
row: {
44-
// flex : 1, // NOTE: Causes problems with buttons at footer of modal
4544
flexDirection : 'row',
4645
},
4746
rowAligned: {
48-
// flex : 1, // NOTE: (MAY ALSO) Causes problems with buttons at footer of modal
4947
flexDirection : 'row',
5048
alignItems : 'center'
5149
},
5250
rowCentered: {
53-
// flex : 1, // NOTE: (MAY ALSO) Causes problems with buttons at footer of modal
5451
flexDirection : 'row',
5552
justifyContent : 'space-around'
5653
},
5754
rowJustified: {
58-
// flex : 1, // NOTE: (MAY ALSO) Causes problems with buttons at footer of modal
5955
flexDirection : 'row',
6056
justifyContent : 'space-between'
6157
},
@@ -116,7 +112,6 @@ export default StyleSheet.create({
116112
actionButtonMenu: {
117113
fontSize : 36,
118114
color : 'rgb(255, 255, 255)',
119-
// marginTop : 5
120115
},
121116
actionButtonClose: {
122117
fontSize : 36,
@@ -141,7 +136,7 @@ export default StyleSheet.create({
141136
contextHelpIcon: {
142137
marginLeft : 5,
143138
fontSize : 14,
144-
color : Colors.helpIcon
139+
// color : Colors.helpIcon
145140
},
146141
tabBarIcon: {
147142
fontSize : 22,
@@ -152,14 +147,11 @@ export default StyleSheet.create({
152147
marginRight : 12,
153148
fontSize : 32,
154149
fontWeight : 'bold',
155-
// color : Colors.tintColorFaded
156-
// color : 'rgba(120, 120, 120, 0.8)'
157-
color : Colors.tabIconSelected
150+
// color : Colors.tabIconSelected
158151
},
159152

160153

161154
walletWeb3Container: {
162-
// alignItems: 'center',
163155
marginHorizontal: 50,
164156
},
165157

@@ -169,8 +161,8 @@ export default StyleSheet.create({
169161

170162
/* Layout */
171163
header: {
172-
width : Layout.width,
173-
height : Layout.width * 0.25,
164+
// width : Layout.width,
165+
// height : Layout.width * 0.25,
174166

175167
backgroundColor : 'rgb(255, 255, 255)',
176168

@@ -192,7 +184,7 @@ export default StyleSheet.create({
192184
},
193185

194186
loading: {
195-
height : Layout.width * 0.5,
187+
// height : Layout.width * 0.5,
196188
alignItems : 'center',
197189
justifyContent : 'center'
198190
},
@@ -231,30 +223,6 @@ export default StyleSheet.create({
231223
textAlign: 'center',
232224
},
233225

234-
/* Den */
235-
denBanner: {
236-
width : parseInt(Layout.width * 0.85),
237-
height : Layout.width * 0.25,
238-
239-
backgroundColor : 'rgb(255, 255, 255)',
240-
241-
shadowColor : 'rgb(0, 0, 0)',
242-
shadowOffset : { width: 0, height: 3 },
243-
shadowOpacity : 0.50,
244-
shadowRadius : 3
245-
},
246-
denDisclaimer: {
247-
padding : 5,
248-
249-
borderTopWidth : 1,
250-
borderColor : 'rgb(180, 180, 180)'
251-
},
252-
denDisclaimerText: {
253-
textAlign : 'center',
254-
fontSize : 9,
255-
color : 'rgb(60, 60, 60)'
256-
},
257-
258226
/* Settings List */
259227
settingsHeader: {
260228
marginTop : -5
@@ -275,8 +243,7 @@ export default StyleSheet.create({
275243
backgroundColor : '#f6f6f6'
276244
},
277245
settingsHeadingText: {
278-
// color : '#009688',
279-
color : Colors.tintColor,
246+
// color : Colors.tintColor,
280247
marginBottom : 10,
281248
fontWeight : '500'
282249
},
@@ -286,7 +253,7 @@ export default StyleSheet.create({
286253
},
287254
settingsInfoText: {
288255
fontWeight: 'bold',
289-
color : Colors.tintColor
256+
// color : Colors.tintColor
290257
},
291258
settingsBetaText: {
292259
fontWeight: 'bold',
@@ -318,7 +285,7 @@ export default StyleSheet.create({
318285
marginRight : 15
319286
},
320287
cardHeaderText: {
321-
width : Layout.width - 200,
288+
// width : Layout.width - 200,
322289
color : 'rgb(230, 230, 230)',
323290
fontSize : 24,
324291
// marginTop : 5
@@ -346,7 +313,7 @@ export default StyleSheet.create({
346313
fontSize : 28,
347314
// fontWeight : 'bold',
348315
textAlign : 'center',
349-
color : Colors.tintColor
316+
// color : Colors.tintColor
350317
}
351318

352319
})

src/constants/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// @flow
2+
3+
import Styles from './Styles'
4+
5+
export {
6+
Styles
7+
}

src/frames/Canvas.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import { Navigation } from 'react-native-navigation'
1111

1212
import { Button } from 'react-native-elements'
1313

14+
import { observable } from 'mobx'
15+
import { observer } from 'mobx-react/native'
16+
import stores from '../stores'
17+
18+
@observer
1419
export default class Canvas extends React.Component {
1520
static get options() {
1621
topBar: {

0 commit comments

Comments
 (0)