From 7371c026f7a6019fd85d3a0cad2d78ec43c99bea Mon Sep 17 00:00:00 2001
From: kf <7kfpun@gmail.com>
Date: Fri, 10 Jun 2016 01:18:27 +0800
Subject: [PATCH] Rewrite with react-native 0.26.3
---
.buckconfig | 6 +
.eslintrc | 8 +-
.flowconfig | 52 ++++-
.gitignore | 9 +-
App/Utils/Property/actions.js | 8 -
App/Utils/Property/store.js | 14 --
App/Utils/Stock/actions.js | 12 --
App/Utils/Stock/store.js | 112 ----------
App/Views/AddNew/Elements/StockCell/index.js | 54 -----
App/Views/AddNew/Elements/StockCell/style.js | 83 -------
App/Views/AddNew/index.js | 93 --------
App/Views/AddNew/style.js | 55 -----
App/Views/Main/Elements/ChartsPage/index.js | 121 -----------
App/Views/Main/Elements/ChartsPage/style.js | 39 ----
App/Views/Main/Elements/DetailsPage/style.js | 64 ------
App/Views/Main/Elements/NewsPage/index.js | 21 --
App/Views/Main/Elements/StockCell/index.js | 135 ------------
App/Views/Main/Elements/StockCell/style.js | 69 ------
App/Views/Main/index.js | 194 -----------------
App/Views/Main/style.js | 65 ------
.../Settings/Elements/StockCell/index.js | 114 ----------
.../Settings/Elements/StockCell/style.js | 73 -------
App/Views/Settings/index.js | 161 --------------
App/Views/Settings/style.js | 83 -------
App/Views/web.js | 66 ------
Finance.js | 49 ++---
README.md | 45 ++--
android/app/BUCK | 66 ++++++
android/app/build.gradle | 65 +++++-
android/app/proguard-rules.pro | 13 +-
android/app/react.gradle | 87 --------
android/app/src/main/AndroidManifest.xml | 9 +-
.../app/src/main/assets/fonts/EvilIcons.ttf | Bin 13028 -> 13128 bytes
.../app/src/main/assets/fonts/FontAwesome.ttf | Bin 142072 -> 152796 bytes
.../app/src/main/assets/fonts/Ionicons.ttf | Bin 188508 -> 143936 bytes
.../src/main/assets/fonts/MaterialIcons.ttf | Bin 122640 -> 128180 bytes
.../app/src/main/assets/fonts/Octicons.ttf | Bin 31740 -> 30680 bytes
.../main/java/com/finance/MainActivity.java | 15 +-
android/build.gradle | 4 +
android/keystores/BUCK | 8 +
android/keystores/debug.keystore.properties | 4 +
app-store.png | Bin 0 -> 5596 bytes
app/actions/stock-action.js | 25 +++
app/alt.js | 2 +
app/stores/stock-store.js | 107 +++++++++
{App/Utils => app/utils}/data.js | 0
{App/Utils => app/utils}/finance.js | 0
{App/Utils => app/utils}/functions.js | 0
app/views/add/elements/stock-cell.js | 95 ++++++++
app/views/add/index.js | 159 ++++++++++++++
app/views/main/elements/chart-page.js | 106 +++++++++
.../views/main/elements/details-page.js | 80 +++++--
app/views/main/elements/stock-cell.js | 157 ++++++++++++++
app/views/main/index.js | 195 +++++++++++++++++
app/views/settings/elements/stock-cell.js | 124 +++++++++++
app/views/settings/index.js | 204 ++++++++++++++++++
google-play.png | Bin 10625 -> 6223 bytes
index.android.js | 18 +-
index.ios.js | 13 +-
ios/Finance.xcodeproj/project.pbxproj | 126 ++++++-----
ios/Finance/AppDelegate.m | 13 +-
ios/FinanceTests/FinanceTests.m | 2 +-
package.json | 29 +--
63 files changed, 1608 insertions(+), 1923 deletions(-)
create mode 100644 .buckconfig
delete mode 100644 App/Utils/Property/actions.js
delete mode 100644 App/Utils/Property/store.js
delete mode 100644 App/Utils/Stock/actions.js
delete mode 100644 App/Utils/Stock/store.js
delete mode 100644 App/Views/AddNew/Elements/StockCell/index.js
delete mode 100644 App/Views/AddNew/Elements/StockCell/style.js
delete mode 100644 App/Views/AddNew/index.js
delete mode 100644 App/Views/AddNew/style.js
delete mode 100644 App/Views/Main/Elements/ChartsPage/index.js
delete mode 100644 App/Views/Main/Elements/ChartsPage/style.js
delete mode 100644 App/Views/Main/Elements/DetailsPage/style.js
delete mode 100644 App/Views/Main/Elements/NewsPage/index.js
delete mode 100644 App/Views/Main/Elements/StockCell/index.js
delete mode 100644 App/Views/Main/Elements/StockCell/style.js
delete mode 100644 App/Views/Main/index.js
delete mode 100644 App/Views/Main/style.js
delete mode 100644 App/Views/Settings/Elements/StockCell/index.js
delete mode 100644 App/Views/Settings/Elements/StockCell/style.js
delete mode 100644 App/Views/Settings/index.js
delete mode 100644 App/Views/Settings/style.js
delete mode 100644 App/Views/web.js
create mode 100644 android/app/BUCK
delete mode 100644 android/app/react.gradle
create mode 100644 android/keystores/BUCK
create mode 100644 android/keystores/debug.keystore.properties
create mode 100644 app-store.png
create mode 100644 app/actions/stock-action.js
create mode 100644 app/alt.js
create mode 100644 app/stores/stock-store.js
rename {App/Utils => app/utils}/data.js (100%)
rename {App/Utils => app/utils}/finance.js (100%)
rename {App/Utils => app/utils}/functions.js (100%)
create mode 100644 app/views/add/elements/stock-cell.js
create mode 100644 app/views/add/index.js
create mode 100644 app/views/main/elements/chart-page.js
rename App/Views/Main/Elements/DetailsPage/index.js => app/views/main/elements/details-page.js (79%)
create mode 100644 app/views/main/elements/stock-cell.js
create mode 100644 app/views/main/index.js
create mode 100644 app/views/settings/elements/stock-cell.js
create mode 100644 app/views/settings/index.js
diff --git a/.buckconfig b/.buckconfig
new file mode 100644
index 0000000..934256c
--- /dev/null
+++ b/.buckconfig
@@ -0,0 +1,6 @@
+
+[android]
+ target = Google Inc.:Google APIs:23
+
+[maven_repositories]
+ central = https://repo1.maven.org/maven2
diff --git a/.eslintrc b/.eslintrc
index 32713e2..aa94a6b 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -87,7 +87,6 @@
"no-caller": 1, // disallow use of arguments.caller or arguments.callee
"no-div-regex": 1, // disallow division operators explicitly at beginning of regular expression (off by default)
"no-else-return": 0, // disallow else after a return in an if (off by default)
- "no-empty-label": 1, // disallow use of labels for anything other then loops and switches
"no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default)
"no-eval": 1, // disallow use of eval()
"no-extend-native": 1, // disallow adding to native types
@@ -125,7 +124,7 @@
// Strict Mode
// These rules relate to using strict mode.
- "strict": [2, "global"], // require or disallow the "use strict" pragma in the global scope (off by default in the node environment)
+ "strict": [2, "never"], // require or disallow the "use strict" pragma in the global scope (off by default in the node environment)
// Variables
// These rules have to do with variable declarations.
@@ -156,6 +155,7 @@
// These rules are purely matters of style and are quite subjective.
"key-spacing": 0,
+ "keyword-spacing": 1, // require a space after certain keywords (off by default)
"comma-spacing": 0,
"no-multi-spaces": 0,
"brace-style": 0, // enforce one true brace style (off by default)
@@ -179,11 +179,9 @@
"quote-props": 0, // require quotes around object literal property names (off by default)
"semi": 1, // require or disallow use of semicolons instead of ASI
"sort-vars": 0, // sort variables within the same declaration block (off by default)
- "space-after-keywords": 1, // require a space after certain keywords (off by default)
"space-in-brackets": 0, // require or disallow spaces inside brackets (off by default)
"space-in-parens": 0, // require or disallow spaces inside parentheses (off by default)
"space-infix-ops": 1, // require spaces around operators
- "space-return-throw-case": 1, // require a space after return, throw, and case
"space-unary-ops": [1, { "words": true, "nonwords": false }], // require or disallow spaces before/after unary operators (words on by default, nonwords off by default)
"max-nested-callbacks": 0, // specify the maximum depth callbacks can be nested (off by default)
"one-var": 0, // allow just one var statement per function (off by default)
@@ -201,7 +199,7 @@
"react/display-name": 0,
"react/jsx-boolean-value": 0,
- "react/jsx-quotes": [1, "double", "avoid-escape"],
+ "jsx-quotes": [2, "prefer-double"],
"react/jsx-no-undef": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 0,
diff --git a/.flowconfig b/.flowconfig
index 53bfd25..45fd3cc 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -15,11 +15,6 @@
# Ignore react and fbjs where there are overlaps, but don't ignore
# anything that react-native relies on
.*/node_modules/fbjs/lib/Map.js
-.*/node_modules/fbjs/lib/Promise.js
-.*/node_modules/fbjs/lib/fetch.js
-.*/node_modules/fbjs/lib/ExecutionEnvironment.js
-.*/node_modules/fbjs/lib/isEmpty.js
-.*/node_modules/fbjs/lib/crc32.js
.*/node_modules/fbjs/lib/ErrorUtils.js
# Flow has a built-in definition for the 'react' module which we prefer to use
@@ -28,6 +23,11 @@
.*/node_modules/react/lib/React.js
.*/node_modules/react/lib/ReactDOM.js
+.*/__mocks__/.*
+.*/__tests__/.*
+
+.*/commoner/test/source/widget/share.js
+
# Ignore commoner tests
.*/node_modules/commoner/test/.*
@@ -40,26 +40,58 @@
# Ignore Website
.*/website/.*
+# Ignore generators
+.*/local-cli/generator.*
+
+# Ignore BUCK generated folders
+.*\.buckd/
+
+# Ignore RNPM
+.*/local-cli/rnpm/.*
+
+.*/node_modules/is-my-json-valid/test/.*\.json
+.*/node_modules/iconv-lite/encodings/tables/.*\.json
+.*/node_modules/y18n/test/.*\.json
+.*/node_modules/spdx-license-ids/spdx-license-ids.json
+.*/node_modules/spdx-exceptions/index.json
+.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json
+.*/node_modules/resolve/lib/core.json
+.*/node_modules/jsonparse/samplejson/.*\.json
+.*/node_modules/json5/test/.*\.json
+.*/node_modules/ua-parser-js/test/.*\.json
+.*/node_modules/builtin-modules/builtin-modules.json
+.*/node_modules/binary-extensions/binary-extensions.json
+.*/node_modules/url-regex/tlds.json
+.*/node_modules/joi/.*\.json
+.*/node_modules/isemail/.*\.json
+.*/node_modules/tr46/.*\.json
+
+
[include]
[libs]
-Libraries/react-native/react-native-interface.js
+node_modules/react-native/Libraries/react-native/react-native-interface.js
+node_modules/react-native/flow
+flow/
[options]
module.system=haste
+esproposal.class_static_fields=enable
+esproposal.class_instance_fields=enable
+
munge_underscores=true
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
-module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'
+module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-5]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-5]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
[version]
-0.20.1
+^0.25.0
diff --git a/.gitignore b/.gitignore
index 110f2c9..dc0fdd8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,7 +33,10 @@ local.properties
node_modules/
npm-debug.log
-# App
-index.android.bundle
-main.jsbundle
+# BUCK
+buck-out/
+\.buckd/
+android/app/libs
+android/keystores/debug.keystore
+*.jsbundle
*.keystore
diff --git a/App/Utils/Property/actions.js b/App/Utils/Property/actions.js
deleted file mode 100644
index 54483dc..0000000
--- a/App/Utils/Property/actions.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* @flow */
-var Reflux = require('reflux');
-
-var Actions = Reflux.createActions([
- 'changeShowingProperty',
-]);
-
-module.exports = Actions;
diff --git a/App/Utils/Property/store.js b/App/Utils/Property/store.js
deleted file mode 100644
index 1dab26c..0000000
--- a/App/Utils/Property/store.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* @flow */
-var Reflux = require('reflux');
-var Actions = require('./actions');
-
-var Store = Reflux.createStore({
- listenables: Actions,
-
- onChangeShowingProperty: function(item) {
- console.log('onChangeShowingProperty');
- this.trigger(item);
- },
-});
-
-module.exports = Store;
diff --git a/App/Utils/Stock/actions.js b/App/Utils/Stock/actions.js
deleted file mode 100644
index 6252f26..0000000
--- a/App/Utils/Stock/actions.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* @flow */
-var Reflux = require('reflux');
-
-var Actions = Reflux.createActions([
- 'addStock',
- 'deleteStock',
- 'moveUpStock',
- 'moveDownStock',
- 'updateStocks',
-]);
-
-module.exports = Actions;
diff --git a/App/Utils/Stock/store.js b/App/Utils/Stock/store.js
deleted file mode 100644
index 1bab6bf..0000000
--- a/App/Utils/Stock/store.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* @flow */
-var Reflux = require('reflux');
-var store = require('react-native-simple-store');
-
-// Flux
-var Actions = require('./actions');
-
-// Utils
-var UtilFuncs = require('../functions');
-var finance = require('../../Utils/finance');
-
-var Store = Reflux.createStore({
- listenables: Actions,
-
- onAddStock: function(symbol) {
- store.get('watchlist').then((result) => {
- var symbols = result.map((item) => item.symbol.toUpperCase());
-
- if (symbols.indexOf(symbol.toUpperCase()) === -1) {
- result.push({symbol: symbol.toUpperCase(), share: 100});
- // result.sort(UtilFuncs.dynamicSort('symbol'));
- console.log('onAddStock', result, symbol);
- store.save('watchlist', result).then(() => {
- this.onUpdateStocks();
- });
- }
- });
- },
-
- onMoveUpStock: function(symbol) {
- store.get('watchlist').then((result) => {
- var symbols = result.map((item) => item.symbol.toUpperCase());
-
- if (symbols.indexOf(symbol.toUpperCase()) !== -1) {
- UtilFuncs.moveObjectinArray(result, symbol, -1);
- console.log('onMoveUpStock', result, symbol);
- store.save('watchlist', result).then(() => {
- this.onUpdateStocks();
- });
- }
- });
- },
-
- onMoveDownStock: function(symbol) {
- store.get('watchlist').then((result) => {
- var symbols = result.map((item) => item.symbol.toUpperCase());
-
- if (symbols.indexOf(symbol.toUpperCase()) !== -1) {
- UtilFuncs.moveObjectinArray(result, symbol, 1);
- console.log('onMoveUpStock', result, symbol);
- store.save('watchlist', result).then(() => {
- this.onUpdateStocks();
- });
- }
- });
- },
-
- onDeleteStock: function(symbol) {
- store.get('watchlist').then((result) => {
- console.log('onDeleteStock', result, symbol);
- return UtilFuncs.removeObjectfromArray(result, 'symbol', symbol);
- }).then((result) => {
- store.save('watchlist', result);
- return result;
- }).then((result) => {
- console.log('onDeleteStock trigger');
- // this.trigger(result);
- this.onUpdateStocks();
- });
- },
-
- onUpdateStocks: function() {
- console.log('onUpdateStocks');
- store.get('watchlist').then((watchlist) => {
- if (!Array.isArray(watchlist) || watchlist.length === 0) {
- watchlist = [
- {symbol: 'AAPL', share: 100},
- {symbol: 'GOOG', share: 100},
- ];
- store.save('watchlist', watchlist);
- }
-
- var symbols = watchlist.map((item) => item.symbol.toUpperCase());
-
- finance.getStock({stock: symbols}, 'quotes')
- .then(function(response) {
- return response.json();
- }).then(function(json) {
- var quotes = json.query.results.quote;
- quotes = Array.isArray(quotes) ? quotes : [quotes];
-
- var watchlistResult = {};
- quotes.forEach((quote) => {
- watchlistResult[quote.symbol] = quote;
- });
- store.save('watchlistResult', watchlistResult);
- return watchlistResult;
- }).then((result) => {
- console.log('onUpdateStocks trigger');
- this.trigger(watchlist, result);
- }).catch((error) => {
- console.log('Request failed', error);
- store.get('watchlistResult').then((result) => {
- this.trigger(watchlist, result);
- });
-
- });
- });
- },
-});
-
-module.exports = Store;
diff --git a/App/Views/AddNew/Elements/StockCell/index.js b/App/Views/AddNew/Elements/StockCell/index.js
deleted file mode 100644
index 9a173d9..0000000
--- a/App/Views/AddNew/Elements/StockCell/index.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* @flow */
-'use strict';
-
-import React, {
- Text,
- TouchableHighlight,
- View,
-} from 'react-native';
-
-// 3rd party libraries
-import { Actions } from 'react-native-router-flux';
-
-// Flux
-import StockActions from '../../../../Utils/Stock/actions';
-
-// Styles
-import styles from './style';
-
-var StockCell = React.createClass({
- _onPressAdd: function(symbol: Object) {
- console.log('_onPressAdd', symbol);
- StockActions.addStock(symbol);
- Actions.pop();
- },
-
- render: function() {
- return (
- this._onPressAdd(this.props.stock.symbol)} underlayColor="#202020">
-
-
-
-
-
- {this.props.stock.symbol}
-
-
- {this.props.stock.exchDisp}
-
-
-
-
- {this.props.stock.name}
-
-
-
-
-
-
-
- );
- }
-});
-
-module.exports = StockCell;
diff --git a/App/Views/AddNew/Elements/StockCell/style.js b/App/Views/AddNew/Elements/StockCell/style.js
deleted file mode 100644
index 43a77cb..0000000
--- a/App/Views/AddNew/Elements/StockCell/style.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-
-var React = require('react-native');
-
-var {
- PixelRatio,
- StyleSheet,
-} = React;
-
-module.exports = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: 'black',
- flexDirection: 'column',
- },
- element: {
- flex: 1,
- flexDirection: 'row',
- height: 65,
- backgroundColor: 'black',
- },
- delete: {
- flex: 1,
- },
- deleteText: {
- fontSize: 15,
- color: '#FC3D39',
- textAlign: 'left',
- marginTop: 20,
- marginBottom: 10,
- marginRight: 10,
- },
- stock: {
- flex: 8,
- flexDirection: 'column',
- },
- symbol: {
- flex: 1,
- flexDirection: 'row',
- },
- symbolText: {
- fontSize: 15,
- color: 'white',
- textAlign: 'left',
- marginTop: 10,
- marginBottom: 5,
- marginRight: 10,
- },
- marketText: {
- fontSize: 15,
- color: '#A6A6A6',
- textAlign: 'left',
- marginTop: 10,
- marginBottom: 5,
- marginRight: 10,
- },
- name: {
- flex: 1,
- },
- nameText: {
- fontSize: 10,
- color: 'white',
- textAlign: 'left',
- marginTop: 5,
- marginBottom: 5,
- marginRight: 10,
- },
- move: {
- flex: 1,
- },
- moveText: {
- fontSize: 15,
- color: 'white',
- textAlign: 'left',
- marginTop: 20,
- marginBottom: 10,
- marginRight: 10,
- },
- separator: {
- height: 1.5 / PixelRatio.get(),
- backgroundColor: '#CCCCCC',
- },
-});
diff --git a/App/Views/AddNew/index.js b/App/Views/AddNew/index.js
deleted file mode 100644
index 90dfb3b..0000000
--- a/App/Views/AddNew/index.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/* @flow */
-'use strict';
-
-import React, {
- ListView,
- Text,
- TouchableHighlight,
- View,
- TextInput,
-} from 'react-native';
-
-// 3rd party libraries
-import { Actions } from 'react-native-router-flux';
-
-// Elements
-import StockCell from './Elements/StockCell';
-
-// Utils
-import finance from '../../Utils/finance';
-
-// Styles
-import styles from './style';
-
-var AddNewView = React.createClass({
- getInitialState() {
- return {
- dataSource: new ListView.DataSource({rowHasChanged: (row1, row2) => row1 !== row2}),
- loaded: false,
- text: null,
- helpText: 'Type a company name or stock symbol.',
- };
- },
-
- _onTyping: function(text: Object) {
- this.setState({
- text: text.text,
- helpText: 'Validating symbol...',
- });
-
- var that = this;
- finance.symbolSuggest(text.text)
- .then((response) => response.text())
- .then((result) => {
- result = result.replace(/(YAHOO\.util\.ScriptNodeDataSource\.callbacks\()(.*)(\);)/g, '$2');
- console.log(result);
- return JSON.parse(result);
- }).then((json) => {
- that.setState({
- dataSource: that.state.dataSource.cloneWithRows(json.ResultSet.Result),
- loaded: true,
- helpText: 'Type a company name or stock symbol.',
- });
- }).catch((error) => {
- console.log('Request failed', error);
- });
- },
-
- render: function() {
- return (
-
-
- {this.state.helpText}
-
-
- this._onTyping({text})}
- value={this.state.text}
- />
- Actions.pop()}>
-
- Cancel
-
-
-
-
- }
- />
-
-
- );
- }
-});
-
-module.exports = AddNewView;
diff --git a/App/Views/AddNew/style.js b/App/Views/AddNew/style.js
deleted file mode 100644
index 9e7890b..0000000
--- a/App/Views/AddNew/style.js
+++ /dev/null
@@ -1,55 +0,0 @@
-'use strict';
-
-import {
- PixelRatio,
- Platform,
- StyleSheet,
-} from 'react-native';
-
-module.exports = StyleSheet.create({
- container: {
- flex: 1,
- marginTop: Platform.OS === 'ios' ? 20 : 0,
- flexDirection: 'column',
- backgroundColor: 'black',
- paddingLeft: 15,
- paddingRight: 15,
- },
- searchBar: {
- flexDirection: 'row',
- },
- searchBarInput: {
- flex: 4,
- flexDirection: 'column',
- height: 40,
- borderColor: 'gray',
- borderWidth: 1 / PixelRatio.get(),
- backgroundColor: '#202020',
- borderRadius: 4,
- color: 'white',
- paddingLeft: 10,
- },
- helpText: {
- color: 'white',
- fontSize: 12,
- alignSelf: 'center',
- marginTop: 5,
- marginBottom: 5,
- },
- cancelButtonText: {
- fontSize: 16,
- color: '#3CABDA',
- alignSelf: 'center'
- },
- cancelButton: {
- flex: 1,
- height: 40,
- marginLeft: 4,
- marginBottom: 10,
- alignSelf: 'stretch',
- justifyContent: 'center'
- },
- suggestion: {
- flex: 10,
- },
-});
diff --git a/App/Views/Main/Elements/ChartsPage/index.js b/App/Views/Main/Elements/ChartsPage/index.js
deleted file mode 100644
index 31c7837..0000000
--- a/App/Views/Main/Elements/ChartsPage/index.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/* @flow */
-'use strict';
-
-import React, {
- Image,
- Text,
- TouchableHighlight,
- View,
-} from 'react-native';
-
-// Styles
-import styles from './style';
-
-var ChartsPage = React.createClass({
-
- getInitialState: function() {
- return {
- timeSpan: '1D',
- };
- },
-
- render: function() {
- return (
-
-
- this.setState({timeSpan: '1D'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '1D') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>1D
-
- this.setState({timeSpan: '5D'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '5D') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>1W
-
- this.setState({timeSpan: '1M'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '1M') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>1M
-
- this.setState({timeSpan: '3M'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '3M') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>3M
-
- this.setState({timeSpan: '6M'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '6M') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>6M
-
- this.setState({timeSpan: '1Y'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '1Y') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>1Y
-
- this.setState({timeSpan: '2Y'})}
- underlayColor="#202020">
- {
- switch (this.state.timeSpan === '2Y') {
- case true: return styles.timeSpanSelectedText;
- case false: return styles.timeSpanText;
- default: return styles.timeSpanText;
- }
- })()}>2Y
-
-
-
-
-
-
- );
- }
-});
-
-module.exports = ChartsPage;
diff --git a/App/Views/Main/Elements/ChartsPage/style.js b/App/Views/Main/Elements/ChartsPage/style.js
deleted file mode 100644
index 63563b9..0000000
--- a/App/Views/Main/Elements/ChartsPage/style.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-import {
- StyleSheet,
-} from 'react-native';
-
-module.exports = StyleSheet.create({
- container: {
- flex: 1,
- paddingLeft: 10,
- paddingRight: 10,
- },
- timeSpanGroup: {
- flex: 1,
- flexDirection: 'row',
- },
- timeSpan: {
- flex: 1,
- alignItems: 'center',
- justifyContent: 'center',
- },
- timeSpanText: {
- fontSize: 12,
- color: 'white',
- marginTop: 10,
- },
- timeSpanSelectedText: {
- fontSize: 12,
- color: 'white',
- fontWeight: 'bold',
- marginTop: 10,
- },
- chart: {
- flex: 4,
- },
- image: {
- flex: 1,
- },
-});
diff --git a/App/Views/Main/Elements/DetailsPage/style.js b/App/Views/Main/Elements/DetailsPage/style.js
deleted file mode 100644
index 67f119a..0000000
--- a/App/Views/Main/Elements/DetailsPage/style.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-import {
- PixelRatio,
- StyleSheet,
-} from 'react-native';
-
-module.exports = StyleSheet.create({
- container: {
- flex: 1,
- paddingLeft: 10,
- paddingRight: 10,
- },
- nameBlock: {
- flex: 1,
- paddingTop: 4,
- justifyContent: 'center',
- alignItems: 'center',
- },
- nameText: {
- fontWeight: 'bold',
- fontSize: 12,
- color: 'white',
- },
- details: {
- flex: 5,
- flexDirection: 'column',
- borderTopWidth: 2 / PixelRatio.get(),
- borderBottomWidth: 2 / PixelRatio.get(),
- borderColor: 'white',
- },
- detailsRow: {
- flex: 1,
- flexDirection: 'row',
- alignItems: 'center',
- justifyContent: 'space-between',
- },
- detailsRowColumn: {
- flex: 1,
- flexDirection: 'row',
- alignItems: 'center',
- justifyContent: 'space-between',
- paddingLeft: 5,
- paddingRight: 5,
- },
- separator: {
- height: 2 / PixelRatio.get(),
- backgroundColor: 'white',
- },
- separatorThin: {
- height: 1 / PixelRatio.get(),
- backgroundColor: '#A6A6A6',
- },
- propertyText: {
- fontSize: 12,
- color: '#A6A6A6',
- textAlign: 'left',
- },
- valueText: {
- fontSize: 15,
- color: 'white',
- textAlign: 'right',
- },
-});
diff --git a/App/Views/Main/Elements/NewsPage/index.js b/App/Views/Main/Elements/NewsPage/index.js
deleted file mode 100644
index ec8695d..0000000
--- a/App/Views/Main/Elements/NewsPage/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* @flow */
-'use strict';
-
-import React, {
- Text,
- View,
-} from 'react-native';
-
-var NewsPage = React.createClass({
- render: function() {
- return (
-
-
- Under construction (Stock: {this.props.stock.symbol})
-
-
- );
- },
-});
-
-module.exports = NewsPage;
diff --git a/App/Views/Main/Elements/StockCell/index.js b/App/Views/Main/Elements/StockCell/index.js
deleted file mode 100644
index 948c682..0000000
--- a/App/Views/Main/Elements/StockCell/index.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/* @flow */
-'use strict';
-
-import React, {
- Text,
- TouchableHighlight,
- View,
-} from 'react-native';
-
-// 3rd party libraries
-import store from 'react-native-simple-store';
-
-// Flux
-import Reflux from 'reflux';
-import PropertyActions from '../../../../Utils/Property/actions';
-import PropertyStore from '../../../../Utils/Property/store';
-import StockStore from '../../../../Utils/Stock/store';
-
-// Styles
-import styles from './style';
-
-var StockCell = React.createClass({
- mixins: [Reflux.ListenerMixin],
-
- onChangeShowingProperty: function(data: string) {
- this.setState({
- showingProperty: data,
- });
- },
-
- onUpdateStocks: function(watchlist: Array