diff options
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/login.jsx | 5 | ||||
-rw-r--r-- | web/react/components/signup_team_complete.jsx | 11 | ||||
-rw-r--r-- | web/react/components/signup_user_complete.jsx | 6 |
3 files changed, 12 insertions, 10 deletions
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 3b6f96c2d..74c7d4065 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -7,6 +7,7 @@ var utils = require('../utils/utils.jsx'); var client = require('../utils/client.jsx'); var UserStore = require('../stores/user_store.jsx'); +var BrowserStore = require('../stores/browser_store.jsx'); var FindTeamDomain = React.createClass({ @@ -21,7 +22,7 @@ var FindTeamDomain = React.createClass({ return; } - if (!utils.isLocalStorageSupported()) { + if (!BrowserStore.isLocalStorageSupported()) { state.server_error = "This service requires local storage to be enabled. Please enable it or exit private browsing."; this.setState(state); return; @@ -114,7 +115,7 @@ module.exports = React.createClass({ return; } - if (!utils.isLocalStorageSupported()) { + if (!BrowserStore.isLocalStorageSupported()) { state.server_error = "This service requires local storage to be enabled. Please enable it or exit private browsing."; this.setState(state); return; diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 587d8cb82..500ee231e 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -5,11 +5,12 @@ var utils = require('../utils/utils.jsx'); var client = require('../utils/client.jsx'); var UserStore = require('../stores/user_store.jsx'); -var constants = require('../utils/constants.jsx') +var BrowserStore = require('../stores/browser_store.jsx'); +var constants = require('../utils/constants.jsx'); WelcomePage = React.createClass({ submitNext: function (e) { - if (!utils.isLocalStorageSupported()) { + if (!BrowserStore.isLocalStorageSupported()) { this.setState({ storage_error: "This service requires local storage to be enabled. Please enable it or exit private browsing."} ); return; } @@ -32,7 +33,7 @@ WelcomePage = React.createClass({ this.setState(state); return; } - else if (!utils.isLocalStorageSupported()) { + else if (!BrowserStore.isLocalStorageSupported()) { state.email_error = "This service requires local storage to be enabled. Please enable it or exit private browsing."; this.setState(state); return; @@ -595,7 +596,7 @@ PasswordPage = React.createClass({ module.exports = React.createClass({ updateParent: function(state, skipSet) { - localStorage.setItem(this.props.hash, JSON.stringify(state)); + BrowserStore.setGlobalItem(this.props.hash, JSON.stringify(state)); if (!skipSet) { this.setState(state); @@ -604,7 +605,7 @@ module.exports = React.createClass({ getInitialState: function() { var props = null; try { - props = JSON.parse(localStorage.getItem(this.props.hash)); + props = JSON.parse(BrowserStore.getGlobalItem(this.props.hash)); } catch(parse_error) { } diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index b9f32f0bc..124e617bd 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -5,7 +5,7 @@ var utils = require('../utils/utils.jsx'); var client = require('../utils/client.jsx'); var UserStore = require('../stores/user_store.jsx'); - +var BrowserStore = require('../stores/browser_store.jsx'); module.exports = React.createClass({ handleSubmit: function(e) { @@ -53,7 +53,7 @@ module.exports = React.createClass({ UserStore.setLastEmail(this.state.user.email); UserStore.setCurrentUser(data); if (this.props.hash > 0) - localStorage.setItem(this.props.hash, JSON.stringify({wizard: "finished"})); + BrowserStore.setGlobalItem(this.props.hash, JSON.stringify({wizard: "finished"})); window.location.href = '/channels/town-square'; }.bind(this), function(err) { @@ -75,7 +75,7 @@ module.exports = React.createClass({ getInitialState: function() { var props = null; try { - props = JSON.parse(localStorage.getItem(this.props.hash)); + props = JSON.parse(BrowserStore.getGlobalItem(this.props.hash)); } catch(parse_error) { } |