Skip to content

Commit

Permalink
Merge branch 'dev' into chrome-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthlatest committed Jul 31, 2017
2 parents 9184e7c + 0e91a1a commit 004f16a
Show file tree
Hide file tree
Showing 7 changed files with 7,081 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"extends": "airbnb",
"rules": {
"no-tabs": 0,
"one-var": 0,
"max-len": 0,
"func-names": 0,
"no-multi-assign": 0,
"no-underscore-dangle": 0,
"no-param-reassign": 0,
"newline-per-chained-call": 0,
"class-methods-use-this": 0,
"max-lines": ["error", 300],
"indent": [2, "tab", { "SwitchCase": 1 }],
"quotes": ["error", "double"],
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"comma-dangle": ["error", "never"],
"object-curly-spacing": [2, "always"],
// linebreak-style: ["error", "windows"],
"react/require-default-props": 0,
"react/require-extension": 0,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/jsx-boolean-value": 0,
"react/forbid-prop-types": 1,
"react/react-in-jsx-scope": 2,
"react/jsx-indent": [2, "tab"],
"react/jsx-indent-props": [2, "tab"],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
},
"plugins": [
"react"
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ RUN bower install --allow-root
RUN npm run build

EXPOSE 1358
CMD ["http-server","_site","-p 1358"]
CMD ["http-server", "-p 1358"]
2 changes: 1 addition & 1 deletion live/src/js/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ var HomePage = createReactClass({
}.bind(this));
},
componentWillMount: function() {
if(window.location.href.indexOf('#?input_state') !== -1 || window.location.href.indexOf('?default=true') !== -1) {
if(window.location.href.indexOf('#?input_state') !== -1 || window.location.href.indexOf('?default=true') !== -1 || window.location.href.indexOf('app=') !== -1) {
this.setState({
splash: false
});
Expand Down
3 changes: 2 additions & 1 deletion live/src/js/features/Importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class Importer extends React.Component {
};

getImporterURL = () => {
const importerFrom = localStorage.getItem("importFrom");
const search = location.search.substring(1);
const importerFrom = search.trim() ? `?${search.trim()}` : localStorage.getItem("importFrom");
localStorage.removeItem("importFrom");
return importerFrom ? importerURL+importerFrom : importerURL;
};
Expand Down
9 changes: 9 additions & 0 deletions live/src/js/helper/urlShare.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ function getUrl(cb) {
cb(decryptedData);
}
});
} else if(queryParams && queryParams.app) {
try {
data = JSON.parse(queryParams.app);
decryptedData = data;
applyDecrypt(data);
cb(data);
} catch(e) {
console.log(e);
}
}

function applyDecrypt(decryptedData) {
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"doc": "docs"
},
"scripts": {
"fix": "eslint --fix ./live/src/js/",
"webpack-server": "webpack-dev-server --hot --inline --progress --colors",
"start": "concurrently \"npm run webpack-server\" \"gulp watch\"",
"dejavubuild": "webpack -p --progress --colors --config ./webpack.production.config.js",
Expand Down Expand Up @@ -46,7 +47,14 @@
"shebang-loader": "0.0.1",
"style-loader": "^0.15.0",
"webpack": "^2.3.0",
"webpack-dev-server": "^2.4.2"
"webpack-dev-server": "^2.4.2",
"babel-eslint": "^7.1.1",
"eslint": "^3.16.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0",
"eslint-watch": "^3.0.0"
},
"dependencies": {
"appbase-js": "^0.11.1",
Expand Down
Loading

0 comments on commit 004f16a

Please sign in to comment.