mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-29 16:44:27 +03:00
Merge pull request #76 from esteemapp/pin-code
Completed pin code feature, added root component
This commit is contained in:
commit
ea2cb9f3be
84
package-lock.json
generated
84
package-lock.json
generated
@ -1507,7 +1507,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-styles": "^2.2.1",
|
"ansi-styles": "^2.2.1",
|
||||||
@ -1700,7 +1700,7 @@
|
|||||||
},
|
},
|
||||||
"babel-plugin-istanbul": {
|
"babel-plugin-istanbul": {
|
||||||
"version": "4.1.6",
|
"version": "4.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
|
"resolved": "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
|
||||||
"integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==",
|
"integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -1733,7 +1733,7 @@
|
|||||||
},
|
},
|
||||||
"babel-plugin-syntax-object-rest-spread": {
|
"babel-plugin-syntax-object-rest-spread": {
|
||||||
"version": "6.13.0",
|
"version": "6.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
|
"resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
|
||||||
"integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U="
|
"integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U="
|
||||||
},
|
},
|
||||||
"babel-plugin-syntax-trailing-function-commas": {
|
"babel-plugin-syntax-trailing-function-commas": {
|
||||||
@ -2286,7 +2286,7 @@
|
|||||||
},
|
},
|
||||||
"browserify-aes": {
|
"browserify-aes": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
|
"resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
|
||||||
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
|
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer-xor": "^1.0.3",
|
"buffer-xor": "^1.0.3",
|
||||||
@ -2530,7 +2530,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"slice-ansi": {
|
"slice-ansi": {
|
||||||
"version": "0.0.4",
|
"version": "0.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
|
"resolved": "http://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
|
||||||
"integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=",
|
"integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -2595,7 +2595,7 @@
|
|||||||
},
|
},
|
||||||
"color": {
|
"color": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz",
|
"resolved": "http://registry.npmjs.org/color/-/color-1.0.3.tgz",
|
||||||
"integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=",
|
"integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"color-convert": "^1.8.2",
|
"color-convert": "^1.8.2",
|
||||||
@ -2743,7 +2743,7 @@
|
|||||||
},
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "1.2.7",
|
"version": "1.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
"resolved": "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
|
||||||
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
|
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
@ -2774,7 +2774,7 @@
|
|||||||
},
|
},
|
||||||
"create-hash": {
|
"create-hash": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
|
"resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
|
||||||
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
|
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cipher-base": "^1.0.1",
|
"cipher-base": "^1.0.1",
|
||||||
@ -2786,7 +2786,7 @@
|
|||||||
},
|
},
|
||||||
"create-hmac": {
|
"create-hmac": {
|
||||||
"version": "1.1.7",
|
"version": "1.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
|
"resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
|
||||||
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cipher-base": "^1.0.3",
|
"cipher-base": "^1.0.3",
|
||||||
@ -3188,7 +3188,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"domelementtype": {
|
"domelementtype": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
"resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
||||||
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
|
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3200,7 +3200,7 @@
|
|||||||
},
|
},
|
||||||
"domelementtype": {
|
"domelementtype": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
|
"resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
|
||||||
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
|
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
|
||||||
},
|
},
|
||||||
"domexception": {
|
"domexception": {
|
||||||
@ -3851,7 +3851,7 @@
|
|||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
"resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
||||||
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
|
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
|
||||||
},
|
},
|
||||||
"evp_bytestokey": {
|
"evp_bytestokey": {
|
||||||
@ -3953,7 +3953,7 @@
|
|||||||
},
|
},
|
||||||
"external-editor": {
|
"external-editor": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
|
"resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
|
||||||
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
|
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"chardet": "^0.4.0",
|
"chardet": "^0.4.0",
|
||||||
@ -3986,7 +3986,7 @@
|
|||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
||||||
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
||||||
},
|
},
|
||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
@ -4829,7 +4829,7 @@
|
|||||||
},
|
},
|
||||||
"get-stream": {
|
"get-stream": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
|
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
|
||||||
},
|
},
|
||||||
"get-value": {
|
"get-value": {
|
||||||
@ -5345,7 +5345,7 @@
|
|||||||
},
|
},
|
||||||
"is-builtin-module": {
|
"is-builtin-module": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
"resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
||||||
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
|
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"builtin-modules": "^1.0.0"
|
"builtin-modules": "^1.0.0"
|
||||||
@ -5490,7 +5490,7 @@
|
|||||||
},
|
},
|
||||||
"is-obj": {
|
"is-obj": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
|
"resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
|
||||||
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -6138,7 +6138,7 @@
|
|||||||
},
|
},
|
||||||
"jest-get-type": {
|
"jest-get-type": {
|
||||||
"version": "22.4.3",
|
"version": "22.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
|
"resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
|
||||||
"integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
|
"integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -6978,12 +6978,12 @@
|
|||||||
},
|
},
|
||||||
"json5": {
|
"json5": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
"resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
||||||
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
|
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
|
||||||
},
|
},
|
||||||
"jsonfile": {
|
"jsonfile": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.6"
|
"graceful-fs": "^4.1.6"
|
||||||
@ -7533,7 +7533,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -7579,7 +7579,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -7629,7 +7629,7 @@
|
|||||||
},
|
},
|
||||||
"load-json-file": {
|
"load-json-file": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
||||||
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.2",
|
"graceful-fs": "^4.1.2",
|
||||||
@ -8400,7 +8400,7 @@
|
|||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
@ -8448,7 +8448,7 @@
|
|||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
@ -8456,7 +8456,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8574,7 +8574,7 @@
|
|||||||
},
|
},
|
||||||
"react-native-keyboard-aware-scroll-view": {
|
"react-native-keyboard-aware-scroll-view": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.5.0.tgz",
|
"resolved": "http://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.5.0.tgz",
|
||||||
"integrity": "sha512-nGXsACZBCiWuwRrZy+UjiSJqb4tZ/6ePHUSY8M+09g4VfNm/ogvvWpwBa6B999NZ6DwhZTKBjVWeZxX9XG8bbQ==",
|
"integrity": "sha512-nGXsACZBCiWuwRrZy+UjiSJqb4tZ/6ePHUSY8M+09g4VfNm/ogvvWpwBa6B999NZ6DwhZTKBjVWeZxX9XG8bbQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"prop-types": "^15.6.0",
|
"prop-types": "^15.6.0",
|
||||||
@ -8978,7 +8978,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.10",
|
"version": "0.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
||||||
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
|
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
|
||||||
},
|
},
|
||||||
"wordwrap": {
|
"wordwrap": {
|
||||||
@ -9169,7 +9169,7 @@
|
|||||||
},
|
},
|
||||||
"pify": {
|
"pify": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
||||||
},
|
},
|
||||||
"pinkie": {
|
"pinkie": {
|
||||||
@ -9393,7 +9393,7 @@
|
|||||||
},
|
},
|
||||||
"espree": {
|
"espree": {
|
||||||
"version": "3.5.4",
|
"version": "3.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz",
|
"resolved": "http://registry.npmjs.org/espree/-/espree-3.5.4.tgz",
|
||||||
"integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==",
|
"integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -9431,7 +9431,7 @@
|
|||||||
},
|
},
|
||||||
"regexpp": {
|
"regexpp": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz",
|
||||||
"integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==",
|
"integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -9978,7 +9978,7 @@
|
|||||||
},
|
},
|
||||||
"react-native-vector-icons": {
|
"react-native-vector-icons": {
|
||||||
"version": "4.6.0",
|
"version": "4.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-4.6.0.tgz",
|
"resolved": "http://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-4.6.0.tgz",
|
||||||
"integrity": "sha512-rpfhfPiXCK2PX1nrNhdxSMrEGB/Gw/SvKoPM0G2wAkSoqynnes19K0VYI+Up7DqR1rFIpE4hP2erpT1tNx2tfg==",
|
"integrity": "sha512-rpfhfPiXCK2PX1nrNhdxSMrEGB/Gw/SvKoPM0G2wAkSoqynnes19K0VYI+Up7DqR1rFIpE4hP2erpT1tNx2tfg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash": "^4.0.0",
|
"lodash": "^4.0.0",
|
||||||
@ -10152,7 +10152,7 @@
|
|||||||
},
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "2.3.6",
|
"version": "2.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
@ -10603,7 +10603,7 @@
|
|||||||
},
|
},
|
||||||
"safe-regex": {
|
"safe-regex": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
|
||||||
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
|
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ret": "~0.1.10"
|
"ret": "~0.1.10"
|
||||||
@ -11043,7 +11043,7 @@
|
|||||||
},
|
},
|
||||||
"sha.js": {
|
"sha.js": {
|
||||||
"version": "2.4.11",
|
"version": "2.4.11",
|
||||||
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
"resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
||||||
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.1",
|
"inherits": "^2.0.1",
|
||||||
@ -11558,7 +11558,7 @@
|
|||||||
},
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
@ -11579,7 +11579,7 @@
|
|||||||
},
|
},
|
||||||
"strip-eof": {
|
"strip-eof": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
"resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||||
},
|
},
|
||||||
"strip-json-comments": {
|
"strip-json-comments": {
|
||||||
@ -11758,7 +11758,7 @@
|
|||||||
},
|
},
|
||||||
"load-json-file": {
|
"load-json-file": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||||
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -11873,7 +11873,7 @@
|
|||||||
},
|
},
|
||||||
"through": {
|
"through": {
|
||||||
"version": "2.3.8",
|
"version": "2.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||||
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
||||||
},
|
},
|
||||||
"through2": {
|
"through2": {
|
||||||
@ -12157,7 +12157,7 @@
|
|||||||
},
|
},
|
||||||
"underscore.string": {
|
"underscore.string": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
|
"resolved": "http://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
|
||||||
"integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs="
|
"integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs="
|
||||||
},
|
},
|
||||||
"unicode-canonical-property-names-ecmascript": {
|
"unicode-canonical-property-names-ecmascript": {
|
||||||
@ -12399,7 +12399,7 @@
|
|||||||
},
|
},
|
||||||
"espree": {
|
"espree": {
|
||||||
"version": "3.5.4",
|
"version": "3.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz",
|
"resolved": "http://registry.npmjs.org/espree/-/espree-3.5.4.tgz",
|
||||||
"integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==",
|
"integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -12506,7 +12506,7 @@
|
|||||||
},
|
},
|
||||||
"wrap-ansi": {
|
"wrap-ansi": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||||
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"string-width": "^1.0.1",
|
"string-width": "^1.0.1",
|
||||||
|
@ -64,8 +64,8 @@ class HeaderView extends Component {
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<View style={styles.titleWrapper}>
|
<View style={styles.titleWrapper}>
|
||||||
{name && <Text style={styles.title}>{name}</Text>}
|
{name && <Text style={styles.title}>{name}</Text>}
|
||||||
{userName
|
{userName !== undefined
|
||||||
&& reputation && (
|
&& reputation !== undefined && (
|
||||||
<Text style={styles.subTitle}>
|
<Text style={styles.subTitle}>
|
||||||
@
|
@
|
||||||
{userName}
|
{userName}
|
||||||
|
@ -8,6 +8,7 @@ import { CircularButton, TextButton, IconButton } from './buttons';
|
|||||||
import { NumericKeyboard } from './numericKeyboard';
|
import { NumericKeyboard } from './numericKeyboard';
|
||||||
import { PinAnimatedInput } from './pinAnimatedInput';
|
import { PinAnimatedInput } from './pinAnimatedInput';
|
||||||
import { SideMenu } from './sideMenu';
|
import { SideMenu } from './sideMenu';
|
||||||
|
import Modal from './modal';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Logo,
|
Logo,
|
||||||
@ -22,4 +23,5 @@ export {
|
|||||||
NumericKeyboard,
|
NumericKeyboard,
|
||||||
PinAnimatedInput,
|
PinAnimatedInput,
|
||||||
SideMenu,
|
SideMenu,
|
||||||
|
Modal,
|
||||||
};
|
};
|
||||||
|
3
src/components/modal/index.js
Normal file
3
src/components/modal/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import ModalView from './view/modalView';
|
||||||
|
|
||||||
|
export default ModalView;
|
18
src/components/modal/view/modalStyles.js
Normal file
18
src/components/modal/view/modalStyles.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
|
|
||||||
|
export default EStyleSheet.create({
|
||||||
|
centerModal: {
|
||||||
|
height: 175,
|
||||||
|
width: 275,
|
||||||
|
borderRadius: 20,
|
||||||
|
},
|
||||||
|
fullModal: {
|
||||||
|
height: '$deviceHeight',
|
||||||
|
width: '$deviceWidth',
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
borderTopRadius: {
|
||||||
|
borderTopLeftRadius: 10,
|
||||||
|
borderTopRightRadius: 10,
|
||||||
|
},
|
||||||
|
});
|
53
src/components/modal/view/modalView.js
Normal file
53
src/components/modal/view/modalView.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import React, { Component } from 'react';
|
||||||
|
import { Modal as ModalBox } from 'react-native';
|
||||||
|
|
||||||
|
import styles from './modalStyles';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Props Name Description Value
|
||||||
|
*@props --> fullModal For modal size all screen or quick modal Boolean
|
||||||
|
*@props --> isOpen For modal is open or not Boolean
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default class Modal extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
_handleOnOpen = () => {
|
||||||
|
const { handleOnModalOpen } = this.props;
|
||||||
|
if (handleOnModalOpen) {
|
||||||
|
handleOnModalOpen();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_handleOnClose = () => {
|
||||||
|
const { handleOnModalClose } = this.props;
|
||||||
|
if (handleOnModalClose) {
|
||||||
|
handleOnModalClose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
isFullScreen, isOpen, children, isRadius,
|
||||||
|
} = this.props;
|
||||||
|
return (
|
||||||
|
<ModalBox
|
||||||
|
style={[
|
||||||
|
isRadius && styles.borderTopRadius,
|
||||||
|
isFullScreen ? styles.fullModal : styles.centerModal,
|
||||||
|
]}
|
||||||
|
animationType="fade"
|
||||||
|
visible={isOpen}
|
||||||
|
onRequestClose={() => this._handleOnClose(this)}
|
||||||
|
onShow={() => this._handleOnOpen(this)}
|
||||||
|
{...this.props}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</ModalBox>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import {
|
import {
|
||||||
FlatList, View, ActivityIndicator, AppState,
|
FlatList, View, ActivityIndicator,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
// import Placeholder from 'rn-placeholder';
|
// import Placeholder from 'rn-placeholder';
|
||||||
@ -28,13 +28,11 @@ class PostsView extends Component {
|
|||||||
startPermlink: '',
|
startPermlink: '',
|
||||||
refreshing: false,
|
refreshing: false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
appState: AppState.currentState,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this._loadPosts(this.state.user);
|
this._loadPosts(this.state.user);
|
||||||
AppState.addEventListener('change', this._handleAppStateChange);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
@ -47,16 +45,6 @@ class PostsView extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
AppState.removeEventListener('change', this._handleAppStateChange);
|
|
||||||
}
|
|
||||||
|
|
||||||
_handleAppStateChange = (nextAppState) => {
|
|
||||||
if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') {
|
|
||||||
alert('App has come to the foreground!');
|
|
||||||
}
|
|
||||||
this.setState({ appState: nextAppState });
|
|
||||||
};
|
|
||||||
|
|
||||||
_loadPosts = (user, _tag = null) => {
|
_loadPosts = (user, _tag = null) => {
|
||||||
const { getFor, tag } = this.props;
|
const { getFor, tag } = this.props;
|
||||||
|
@ -4,7 +4,7 @@ import { default as ROUTES } from '../constants/routeNames';
|
|||||||
|
|
||||||
// Screens
|
// Screens
|
||||||
import {
|
import {
|
||||||
Splash, Login, PinCode, SteemConnect, Editor, Profile,
|
Splash, Login, PinCode, SteemConnect, Editor, Profile, RootComponent,
|
||||||
} from '../screens';
|
} from '../screens';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
@ -51,9 +51,11 @@ const stackNavigatior = createStackNavigator(
|
|||||||
);
|
);
|
||||||
|
|
||||||
export default SwitchNavigator({
|
export default SwitchNavigator({
|
||||||
stackNavigatior,
|
[ROUTES.DRAWER.MAIN]: mainNavigation,
|
||||||
[ROUTES.SCREENS.LOGIN]: { screen: Login },
|
[ROUTES.SCREENS.LOGIN]: { screen: RootComponent()(Login) },
|
||||||
[ROUTES.SCREENS.PINCODE]: { screen: PinCode },
|
[ROUTES.SCREENS.EDITOR]: { screen: RootComponent()(Editor) },
|
||||||
[ROUTES.SCREENS.SPLASH]: { screen: Splash },
|
[ROUTES.SCREENS.PINCODE]: { screen: RootComponent()(PinCode) },
|
||||||
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: SteemConnect },
|
[ROUTES.SCREENS.PROFILE]: { screen: RootComponent()(Profile) },
|
||||||
|
[ROUTES.SCREENS.SPLASH]: { screen: RootComponent()(Splash) },
|
||||||
|
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: RootComponent()(SteemConnect) },
|
||||||
});
|
});
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { createBottomTabNavigator } from 'react-navigation';
|
import { createBottomTabNavigator } from 'react-navigation';
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome';
|
import Icon from 'react-native-vector-icons/FontAwesome';
|
||||||
import { Home, Notification, Profile } from '../screens';
|
import {
|
||||||
|
Home, Notification, Profile, RootComponent,
|
||||||
|
} from '../screens';
|
||||||
|
|
||||||
import { PostButton } from '../components/postButton';
|
import { PostButton } from '../components/postButton';
|
||||||
|
|
||||||
const BaseNavigator = createBottomTabNavigator(
|
const BaseNavigator = createBottomTabNavigator(
|
||||||
{
|
{
|
||||||
Home: {
|
Home: {
|
||||||
screen: Home,
|
screen: RootComponent()(Home),
|
||||||
navigationOptions: () => ({
|
navigationOptions: () => ({
|
||||||
tabBarIcon: ({ tintColor }) => <Icon name="list" color={tintColor} size={18} />,
|
tabBarIcon: ({ tintColor }) => <Icon name="list" color={tintColor} size={18} />,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
Notification: {
|
Notification: {
|
||||||
screen: Notification,
|
screen: RootComponent()(Notification),
|
||||||
navigationOptions: () => ({
|
navigationOptions: () => ({
|
||||||
tabBarIcon: ({ tintColor }) => <Icon name="bell-o" color={tintColor} size={18} />,
|
tabBarIcon: ({ tintColor }) => <Icon name="bell-o" color={tintColor} size={18} />,
|
||||||
}),
|
}),
|
||||||
@ -26,13 +28,13 @@ const BaseNavigator = createBottomTabNavigator(
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
AuthorProfile: {
|
AuthorProfile: {
|
||||||
screen: Profile,
|
screen: RootComponent()(Profile),
|
||||||
navigationOptions: () => ({
|
navigationOptions: () => ({
|
||||||
tabBarIcon: ({ tintColor }) => <Icon name="envelope-o" color={tintColor} size={18} />,
|
tabBarIcon: ({ tintColor }) => <Icon name="envelope-o" color={tintColor} size={18} />,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
Profile: {
|
Profile: {
|
||||||
screen: Profile,
|
screen: RootComponent()(Profile),
|
||||||
navigationOptions: () => ({
|
navigationOptions: () => ({
|
||||||
tabBarIcon: ({ tintColor }) => <Icon name="credit-card" color={tintColor} size={18} />,
|
tabBarIcon: ({ tintColor }) => <Icon name="credit-card" color={tintColor} size={18} />,
|
||||||
}),
|
}),
|
||||||
|
@ -199,9 +199,16 @@ export const verifyPinCode = async (data) => {
|
|||||||
const authData = {
|
const authData = {
|
||||||
isLoggedIn: true,
|
isLoggedIn: true,
|
||||||
};
|
};
|
||||||
|
const response = {
|
||||||
|
accessToken: decryptKey(userData.accessToken, data.pinCode),
|
||||||
|
postingKey: decryptKey(userData.postingKey, data.pinCode),
|
||||||
|
masterKey: decryptKey(userData.masterKey, data.pinCode),
|
||||||
|
activeKey: decryptKey(userData.activeKey, data.pinCode),
|
||||||
|
memoKey: decryptKey(userData.memoKey, data.pinCode),
|
||||||
|
};
|
||||||
setAuthStatus(authData)
|
setAuthStatus(authData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
resolve();
|
resolve(response);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
// TODO: create function for throw error
|
// TODO: create function for throw error
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { LOGIN, LOGOUT } from '../constants/constants';
|
import {
|
||||||
|
LOGIN, LOGOUT, OPEN_PIN_CODE_MODAL, CLOSE_PIN_CODE_MODAL,
|
||||||
|
} from '../constants/constants';
|
||||||
|
|
||||||
export const login = () => ({
|
export const login = () => ({
|
||||||
type: LOGIN,
|
type: LOGIN,
|
||||||
@ -7,3 +9,11 @@ export const login = () => ({
|
|||||||
export const logout = () => ({
|
export const logout = () => ({
|
||||||
type: LOGOUT,
|
type: LOGOUT,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const openPinCodeModal = () => ({
|
||||||
|
type: OPEN_PIN_CODE_MODAL,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const closePinCodeModal = () => ({
|
||||||
|
type: CLOSE_PIN_CODE_MODAL,
|
||||||
|
});
|
||||||
|
@ -15,3 +15,5 @@ export const FETCHING_ACCOUNT = 'FETCHING_ACCOUNT';
|
|||||||
export const FETCH_ACCOUNT_FAIL = 'FETCH_ACCOUNT_FAIL';
|
export const FETCH_ACCOUNT_FAIL = 'FETCH_ACCOUNT_FAIL';
|
||||||
|
|
||||||
export const IS_LOGGED_IN = 'IS_LOGGED_IN';
|
export const IS_LOGGED_IN = 'IS_LOGGED_IN';
|
||||||
|
export const OPEN_PIN_CODE_MODAL = 'OPEN_PIN_CODE_MODAL';
|
||||||
|
export const CLOSE_PIN_CODE_MODAL = 'CLOSE_PIN_CODE_MODAL';
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import { LOGIN, LOGOUT } from '../constants/constants';
|
import {
|
||||||
|
LOGIN, LOGOUT, OPEN_PIN_CODE_MODAL, CLOSE_PIN_CODE_MODAL,
|
||||||
|
} from '../constants/constants';
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
isLoggedIn: false, // Has any logged in user.
|
isLoggedIn: false, // Has any logged in user.
|
||||||
loading: false, // It is lock to all screen and shows loading animation.
|
loading: false, // It is lock to all screen and shows loading animation.
|
||||||
|
isPinCodeReqiure: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function (state = initialState, action) {
|
export default function (state = initialState, action) {
|
||||||
@ -17,7 +20,16 @@ export default function (state = initialState, action) {
|
|||||||
...state,
|
...state,
|
||||||
isLoggedIn: false,
|
isLoggedIn: false,
|
||||||
};
|
};
|
||||||
|
case OPEN_PIN_CODE_MODAL:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
isPinCodeReqiure: true,
|
||||||
|
};
|
||||||
|
case CLOSE_PIN_CODE_MODAL:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
isPinCodeReqiure: false,
|
||||||
|
};
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import { Login } from './login';
|
|||||||
import { Notification } from './notification';
|
import { Notification } from './notification';
|
||||||
import SteemConnect from './steem-connect/steemConnect';
|
import SteemConnect from './steem-connect/steemConnect';
|
||||||
import { Profile } from './profile';
|
import { Profile } from './profile';
|
||||||
|
import RootComponent from './root';
|
||||||
|
|
||||||
// import Author from './authorProfile';
|
// import Author from './authorProfile';
|
||||||
// import SideMenu from './sideMenuScreen';
|
// import SideMenu from './sideMenuScreen';
|
||||||
@ -28,6 +29,7 @@ export {
|
|||||||
Profile,
|
Profile,
|
||||||
SteemConnect,
|
SteemConnect,
|
||||||
Splash,
|
Splash,
|
||||||
|
RootComponent,
|
||||||
// Author,
|
// Author,
|
||||||
// SideMenu,
|
// SideMenu,
|
||||||
// Hot,
|
// Hot,
|
||||||
|
@ -4,11 +4,12 @@ import {
|
|||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
import ScrollableTabView from '@esteemapp/react-native-scrollable-tab-view';
|
import ScrollableTabView from '@esteemapp/react-native-scrollable-tab-view';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
import { addPassiveAccount, failedAccount } from '../../../redux/actions/accountAction';
|
import { addPassiveAccount, failedAccount } from '../../../redux/actions/accountAction';
|
||||||
import {
|
import {
|
||||||
login as loginAction,
|
login as loginAction, openPinCodeModal,
|
||||||
} from '../../../redux/actions/applicationActions';
|
} from '../../../redux/actions/applicationActions';
|
||||||
|
|
||||||
// Internal Components
|
// Internal Components
|
||||||
@ -42,7 +43,7 @@ class LoginScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_handleOnPressLogin = () => {
|
_handleOnPressLogin = () => {
|
||||||
const { dispatch, navigation } = this.props;
|
const { dispatch, setPinCodeState } = this.props;
|
||||||
const { password, username } = this.state;
|
const { password, username } = this.state;
|
||||||
|
|
||||||
this.setState({ isLoading: true });
|
this.setState({ isLoading: true });
|
||||||
@ -52,7 +53,8 @@ class LoginScreen extends Component {
|
|||||||
if (result) {
|
if (result) {
|
||||||
dispatch(addPassiveAccount(result));
|
dispatch(addPassiveAccount(result));
|
||||||
dispatch(loginAction());
|
dispatch(loginAction());
|
||||||
navigation.navigate(ROUTES.SCREENS.PINCODE);
|
dispatch(openPinCodeModal());
|
||||||
|
setPinCodeState({ navigateTo: ROUTES.DRAWER.MAIN });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@ -180,4 +182,4 @@ class LoginScreen extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LoginScreen;
|
export default connect()(LoginScreen);
|
||||||
|
@ -4,9 +4,11 @@ import { connect } from 'react-redux';
|
|||||||
|
|
||||||
import { setUserDataWithPinCode, verifyPinCode } from '../../../providers/steem/auth';
|
import { setUserDataWithPinCode, verifyPinCode } from '../../../providers/steem/auth';
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
import { closePinCodeModal } from '../../../redux/actions/applicationActions';
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { default as INITIAL } from '../../../constants/initial';
|
import { default as INITIAL } from '../../../constants/initial';
|
||||||
import { default as ROUTES } from '../../../constants/routeNames';
|
|
||||||
|
|
||||||
import { PinCodeScreen } from '..';
|
import { PinCodeScreen } from '..';
|
||||||
|
|
||||||
@ -49,7 +51,11 @@ class PinCodeContainer extends Component {
|
|||||||
|
|
||||||
_setPinCode = pin => new Promise((resolve, reject) => {
|
_setPinCode = pin => new Promise((resolve, reject) => {
|
||||||
const {
|
const {
|
||||||
currentAccount: { password, name },
|
currentAccount,
|
||||||
|
dispatch,
|
||||||
|
accessToken,
|
||||||
|
setWrappedComponentState,
|
||||||
|
navigateTo,
|
||||||
navigation,
|
navigation,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { isExistUser, pinCode } = this.state;
|
const { isExistUser, pinCode } = this.state;
|
||||||
@ -57,14 +63,17 @@ class PinCodeContainer extends Component {
|
|||||||
// If the user is exist, we are just checking to pin and navigating to home screen
|
// If the user is exist, we are just checking to pin and navigating to home screen
|
||||||
const pinData = {
|
const pinData = {
|
||||||
pinCode: pin,
|
pinCode: pin,
|
||||||
password,
|
password: currentAccount ? currentAccount.password : '',
|
||||||
username: name,
|
username: currentAccount ? currentAccount.name : '',
|
||||||
accessToken: navigation.getParam('accessToken', ''),
|
accessToken,
|
||||||
};
|
};
|
||||||
verifyPinCode(pinData)
|
verifyPinCode(pinData)
|
||||||
.then(() => {
|
.then((res) => {
|
||||||
// TODO: make global route
|
setWrappedComponentState(res);
|
||||||
navigation.navigate(ROUTES.DRAWER.MAIN);
|
dispatch(closePinCodeModal());
|
||||||
|
if (navigateTo) {
|
||||||
|
navigation.navigate(navigateTo);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
alert(err);
|
alert(err);
|
||||||
@ -80,12 +89,15 @@ class PinCodeContainer extends Component {
|
|||||||
} else if (pinCode === pin) {
|
} else if (pinCode === pin) {
|
||||||
const pinData = {
|
const pinData = {
|
||||||
pinCode: pin,
|
pinCode: pin,
|
||||||
password,
|
password: currentAccount.password,
|
||||||
username: name,
|
username: currentAccount.name,
|
||||||
};
|
};
|
||||||
setUserDataWithPinCode(pinData).then(() => {
|
setUserDataWithPinCode(pinData).then(() => {
|
||||||
AsyncStorage.setItem(INITIAL.IS_EXIST_USER, JSON.stringify(true), () => {
|
AsyncStorage.setItem(INITIAL.IS_EXIST_USER, JSON.stringify(true), () => {
|
||||||
navigation.navigate(ROUTES.DRAWER.MAIN);
|
dispatch(closePinCodeModal());
|
||||||
|
if (navigateTo) {
|
||||||
|
navigation.navigate(navigateTo);
|
||||||
|
}
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
82
src/screens/root/container/rootContainer.js
Normal file
82
src/screens/root/container/rootContainer.js
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
import React, { Component, Fragment } from 'react';
|
||||||
|
import { AppState } from 'react-native';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
import { openPinCodeModal } from '../../../redux/actions/applicationActions';
|
||||||
|
|
||||||
|
// Components
|
||||||
|
import { Modal } from '../../../components';
|
||||||
|
import { PinCode } from '../..';
|
||||||
|
|
||||||
|
const RootContainer = () => (WrappedComponent) => {
|
||||||
|
class RootComponent extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
pinCodeStates: null,
|
||||||
|
wrappedComponentStates: null,
|
||||||
|
appState: AppState.currentState,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
AppState.addEventListener('change', this._handleAppStateChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
AppState.removeEventListener('change', this._handleAppStateChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
_handleAppStateChange = (nextAppState) => {
|
||||||
|
const { appState } = this.state;
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
|
||||||
|
if (appState.match(/inactive|background/) && nextAppState === 'active') {
|
||||||
|
dispatch(openPinCodeModal());
|
||||||
|
}
|
||||||
|
this.setState({ appState: nextAppState });
|
||||||
|
};
|
||||||
|
|
||||||
|
_setPinCodeState = (data) => {
|
||||||
|
this.setState({ pinCodeStates: { ...data } });
|
||||||
|
};
|
||||||
|
|
||||||
|
_setWrappedComponentState = (data) => {
|
||||||
|
this.setState({ wrappedComponentStates: { ...data } });
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { isPinCodeReqiure, navigation } = this.props;
|
||||||
|
const { pinCodeStates, wrappedComponentStates } = this.state;
|
||||||
|
return (
|
||||||
|
<Fragment>
|
||||||
|
<Modal
|
||||||
|
isOpen={isPinCodeReqiure}
|
||||||
|
isFullScreen
|
||||||
|
swipeToClose={false}
|
||||||
|
backButtonClose={false}
|
||||||
|
>
|
||||||
|
<PinCode
|
||||||
|
{...pinCodeStates}
|
||||||
|
setWrappedComponentState={this._setWrappedComponentState}
|
||||||
|
navigation={navigation}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
<WrappedComponent
|
||||||
|
{...this.props}
|
||||||
|
{...wrappedComponentStates}
|
||||||
|
setPinCodeState={this._setPinCodeState}
|
||||||
|
/>
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const mapStateToProps = state => ({
|
||||||
|
isPinCodeReqiure: state.application.isPinCodeReqiure,
|
||||||
|
});
|
||||||
|
|
||||||
|
return connect(mapStateToProps)(RootComponent);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RootContainer;
|
3
src/screens/root/index.js
Normal file
3
src/screens/root/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import RootContainer from './container/rootContainer';
|
||||||
|
|
||||||
|
export default RootContainer;
|
@ -7,7 +7,7 @@ import { steemConnectOptions } from './config';
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
import { addPassiveAccount } from '../../redux/actions/accountAction';
|
import { addPassiveAccount } from '../../redux/actions/accountAction';
|
||||||
import { login as loginAction } from '../../redux/actions/applicationActions';
|
import { login as loginAction, openPinCodeModal } from '../../redux/actions/applicationActions';
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { default as ROUTES } from '../../constants/routeNames';
|
import { default as ROUTES } from '../../constants/routeNames';
|
||||||
@ -22,7 +22,7 @@ class SteemConnect extends Component {
|
|||||||
|
|
||||||
onNavigationStateChange(event) {
|
onNavigationStateChange(event) {
|
||||||
let accessToken;
|
let accessToken;
|
||||||
const { navigation, dispatch } = this.props;
|
const { dispatch, setPinCodeState } = this.props;
|
||||||
const { isLoading } = this.state;
|
const { isLoading } = this.state;
|
||||||
|
|
||||||
if (event.url.indexOf('?access_token=') > -1) {
|
if (event.url.indexOf('?access_token=') > -1) {
|
||||||
@ -39,7 +39,8 @@ class SteemConnect extends Component {
|
|||||||
if (result) {
|
if (result) {
|
||||||
dispatch(addPassiveAccount(result));
|
dispatch(addPassiveAccount(result));
|
||||||
dispatch(loginAction());
|
dispatch(loginAction());
|
||||||
navigation.navigate(ROUTES.SCREENS.PINCODE, { accessToken });
|
dispatch(openPinCodeModal());
|
||||||
|
setPinCodeState({ accessToken, navigateTo: ROUTES.DRAWER.MAIN });
|
||||||
} else {
|
} else {
|
||||||
// TODO: Error alert (Toast Message)
|
// TODO: Error alert (Toast Message)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user