Browse Source

146 - Add Decode hexagon image to Home screen

Elisa Cutrin 1 year ago
parent
commit
545c4aa8a3

BIN
apps/wallet/assets/images/decode-hexagon.png


+ 2 - 2
apps/wallet/screens/Home.js

@@ -14,7 +14,7 @@ import Button from '../application/components/Button/Button';
14 14
 
15 15
 import styles from './styles';
16 16
 
17
-const decodeLogo = require('../assets/images/decode_logo.jpg');
17
+const decodeLogo = require('../assets/images/decode-hexagon.png');
18 18
 
19 19
 class Home extends React.Component {
20 20
   constructor(props) {
@@ -46,11 +46,11 @@ class Home extends React.Component {
46 46
         <Image
47 47
           style={styles.homeLogo}
48 48
           source={decodeLogo}
49
+          resizeMode="center"
49 50
         />
50 51
         <View style={styles.homeTextInput}>
51 52
           <TextInput
52 53
             style={styles.homePassword}
53
-            placeholder="Password"
54 54
             secureTextEntry
55 55
             underlineColorAndroid="rgb(0,163,158)"
56 56
             onChangeText={pin => this.props.updatePin(pin)}

+ 3 - 4
apps/wallet/screens/styles.js

@@ -57,10 +57,8 @@ const styles = StyleSheet.create({
57 57
     flex: 1,
58 58
   },
59 59
   homeLogo: {
60
-    height: 150,
61
-    marginTop: 75,
62
-    marginBottom: 50,
63
-    width: 300,
60
+    marginTop: 30,
61
+    flex: 2,
64 62
   },
65 63
   homePassword: {
66 64
     height: Platform.OS === 'ios' ? 30 : 40,
@@ -70,6 +68,7 @@ const styles = StyleSheet.create({
70 68
     borderBottomWidth: Platform.OS === 'ios' ? 1 : 0,
71 69
     borderColor: TURQUOISE,
72 70
     marginBottom: 20,
71
+    flex: 1,
73 72
   },
74 73
   petitionDescription: {
75 74
     color: 'rgba(0, 0, 0, 0.87)',

+ 16 - 84
apps/wallet/test/snapshot/__snapshots__/Home.test.js.snap

@@ -27,34 +27,21 @@ ShallowWrapper {
27 27
     "props": Object {
28 28
       "children": Array [
29 29
         <Image
30
+          resizeMode="center"
30 31
           source={1}
31 32
           style={
32 33
             Object {
33
-              "height": 150,
34
-              "marginBottom": 50,
35
-              "marginTop": 75,
36
-              "width": 300,
34
+              "flex": 2,
35
+              "marginTop": 30,
37 36
             }
38 37
           }
39 38
         />,
40
-        <Text
41
-          accessible={true}
42
-          allowFontScaling={true}
43
-          ellipsizeMode="tail"
44
-          style={
45
-            Object {
46
-              "fontSize": 18,
47
-              "marginBottom": 30,
48
-            }
49
-          }
50
-        >
51
-          Welcome, Jane Doe
52
-        </Text>,
53 39
         <View
54 40
           style={
55 41
             Object {
56 42
               "borderBottomWidth": 1,
57 43
               "borderColor": "rgb(73,162,153)",
44
+              "flex": 1,
58 45
               "marginBottom": 20,
59 46
             }
60 47
           }
@@ -62,7 +49,6 @@ ShallowWrapper {
62 49
           <TextInput
63 50
             allowFontScaling={true}
64 51
             onChangeText={[Function]}
65
-            placeholder="Password"
66 52
             secureTextEntry={true}
67 53
             style={
68 54
               Object {
@@ -94,12 +80,11 @@ ShallowWrapper {
94 80
         "key": undefined,
95 81
         "nodeType": "class",
96 82
         "props": Object {
83
+          "resizeMode": "center",
97 84
           "source": 1,
98 85
           "style": Object {
99
-            "height": 150,
100
-            "marginBottom": 50,
101
-            "marginTop": 75,
102
-            "width": 300,
86
+            "flex": 2,
87
+            "marginTop": 30,
103 88
           },
104 89
         },
105 90
         "ref": null,
@@ -111,28 +96,9 @@ ShallowWrapper {
111 96
         "key": undefined,
112 97
         "nodeType": "class",
113 98
         "props": Object {
114
-          "accessible": true,
115
-          "allowFontScaling": true,
116
-          "children": "Welcome, Jane Doe",
117
-          "ellipsizeMode": "tail",
118
-          "style": Object {
119
-            "fontSize": 18,
120
-            "marginBottom": 30,
121
-          },
122
-        },
123
-        "ref": null,
124
-        "rendered": "Welcome, Jane Doe",
125
-        "type": [Function],
126
-      },
127
-      Object {
128
-        "instance": null,
129
-        "key": undefined,
130
-        "nodeType": "class",
131
-        "props": Object {
132 99
           "children": <TextInput
133 100
             allowFontScaling={true}
134 101
             onChangeText={[Function]}
135
-            placeholder="Password"
136 102
             secureTextEntry={true}
137 103
             style={
138 104
               Object {
@@ -146,6 +112,7 @@ ShallowWrapper {
146 112
           "style": Object {
147 113
             "borderBottomWidth": 1,
148 114
             "borderColor": "rgb(73,162,153)",
115
+            "flex": 1,
149 116
             "marginBottom": 20,
150 117
           },
151 118
         },
@@ -157,7 +124,6 @@ ShallowWrapper {
157 124
           "props": Object {
158 125
             "allowFontScaling": true,
159 126
             "onChangeText": [Function],
160
-            "placeholder": "Password",
161 127
             "secureTextEntry": true,
162 128
             "style": Object {
163 129
               "height": 30,
@@ -197,34 +163,21 @@ ShallowWrapper {
197 163
       "props": Object {
198 164
         "children": Array [
199 165
           <Image
166
+            resizeMode="center"
200 167
             source={1}
201 168
             style={
202 169
               Object {
203
-                "height": 150,
204
-                "marginBottom": 50,
205
-                "marginTop": 75,
206
-                "width": 300,
170
+                "flex": 2,
171
+                "marginTop": 30,
207 172
               }
208 173
             }
209 174
           />,
210
-          <Text
211
-            accessible={true}
212
-            allowFontScaling={true}
213
-            ellipsizeMode="tail"
214
-            style={
215
-              Object {
216
-                "fontSize": 18,
217
-                "marginBottom": 30,
218
-              }
219
-            }
220
-          >
221
-            Welcome, Jane Doe
222
-          </Text>,
223 175
           <View
224 176
             style={
225 177
               Object {
226 178
                 "borderBottomWidth": 1,
227 179
                 "borderColor": "rgb(73,162,153)",
180
+                "flex": 1,
228 181
                 "marginBottom": 20,
229 182
               }
230 183
             }
@@ -232,7 +185,6 @@ ShallowWrapper {
232 185
             <TextInput
233 186
               allowFontScaling={true}
234 187
               onChangeText={[Function]}
235
-              placeholder="Password"
236 188
               secureTextEntry={true}
237 189
               style={
238 190
                 Object {
@@ -264,12 +216,11 @@ ShallowWrapper {
264 216
           "key": undefined,
265 217
           "nodeType": "class",
266 218
           "props": Object {
219
+            "resizeMode": "center",
267 220
             "source": 1,
268 221
             "style": Object {
269
-              "height": 150,
270
-              "marginBottom": 50,
271
-              "marginTop": 75,
272
-              "width": 300,
222
+              "flex": 2,
223
+              "marginTop": 30,
273 224
             },
274 225
           },
275 226
           "ref": null,
@@ -281,28 +232,9 @@ ShallowWrapper {
281 232
           "key": undefined,
282 233
           "nodeType": "class",
283 234
           "props": Object {
284
-            "accessible": true,
285
-            "allowFontScaling": true,
286
-            "children": "Welcome, Jane Doe",
287
-            "ellipsizeMode": "tail",
288
-            "style": Object {
289
-              "fontSize": 18,
290
-              "marginBottom": 30,
291
-            },
292
-          },
293
-          "ref": null,
294
-          "rendered": "Welcome, Jane Doe",
295
-          "type": [Function],
296
-        },
297
-        Object {
298
-          "instance": null,
299
-          "key": undefined,
300
-          "nodeType": "class",
301
-          "props": Object {
302 235
             "children": <TextInput
303 236
               allowFontScaling={true}
304 237
               onChangeText={[Function]}
305
-              placeholder="Password"
306 238
               secureTextEntry={true}
307 239
               style={
308 240
                 Object {
@@ -316,6 +248,7 @@ ShallowWrapper {
316 248
             "style": Object {
317 249
               "borderBottomWidth": 1,
318 250
               "borderColor": "rgb(73,162,153)",
251
+              "flex": 1,
319 252
               "marginBottom": 20,
320 253
             },
321 254
           },
@@ -327,7 +260,6 @@ ShallowWrapper {
327 260
             "props": Object {
328 261
               "allowFontScaling": true,
329 262
               "onChangeText": [Function],
330
-              "placeholder": "Password",
331 263
               "secureTextEntry": true,
332 264
               "style": Object {
333 265
                 "height": 30,