diff --git a/app/App.jsx b/app/App.jsx index 2ebef05d5c..5523f5ac75 100644 --- a/app/App.jsx +++ b/app/App.jsx @@ -19,6 +19,7 @@ import TransactionConfirm from "./components/Blockchain/TransactionConfirm"; import WalletUnlockModal from "./components/Wallet/WalletUnlockModal"; import BrowserSupportModal from "./components/Modal/BrowserSupportModal"; import Footer from "./components/Layout/Footer"; +import Deprecate from "./Deprecate"; // import Incognito from "./components/Layout/Incognito"; // import { isIncognito } from "feature_detect"; @@ -153,6 +154,7 @@ class App extends React.Component { render() { let {isMobile, theme } = this.state; + let content = null; let showFooter = 1; @@ -171,6 +173,8 @@ class App extends React.Component { ; } else if (this.props.location.pathname === "/init-error") { content =
{this.props.children}
; + } else if (__DEPRECATED__) { + content = ; } else { content = (
diff --git a/app/Deprecate.jsx b/app/Deprecate.jsx new file mode 100644 index 0000000000..2e812bcc34 --- /dev/null +++ b/app/Deprecate.jsx @@ -0,0 +1,47 @@ +import React from "react"; +import WalletDb from "stores/WalletDb"; +import Settings from "./components/Settings/SettingsContainer"; +import Translate from "react-translate-component"; + +export default class Deprecate extends React.Component { + hasWallet() { + return !!WalletDb.getWallet(); + } + + renderForWallet() { + return ( +
+ + + + + + + +
+ ); + } + + renderForCloud() { + return ( +
+ +
+ ); + } + + render() { + return ( +
+
+
+ + +

https://wallet.bitshares.org

+ {this.hasWallet() ? this.renderForWallet() : this.renderForCloud()} +
+
+
+ ); + } +}; diff --git a/app/assets/locales/locale-en.json b/app/assets/locales/locale-en.json index 3b8b3a920d..122d33134b 100644 --- a/app/assets/locales/locale-en.json +++ b/app/assets/locales/locale-en.json @@ -1384,5 +1384,12 @@ }, "trx_error": { "expire": "Your transaction has expired without being confirmed, please try again later." + }, + "migration": { + "title": "Notice", + "announcement_1": "In an effort to provide enhanced security for the web-based wallet, we are migrating it, effective immediately to the address below. Please be sure to update any bookmarks you may have.", + "text_1": "Local wallet detected", + "text_2": "Please backup your wallet now and restore the backup file to https://wallet.bitshares.org, which will be your new address for the web wallet. Thanks for your continued support.", + "text_3": "Please use https://wallet.bitshares.org from now on, your existing credentials will let you login there as well." } } diff --git a/app/components/Settings/Settings.jsx b/app/components/Settings/Settings.jsx index 1ac41ce838..d8f113726f 100644 --- a/app/components/Settings/Settings.jsx +++ b/app/components/Settings/Settings.jsx @@ -22,6 +22,7 @@ class Settings extends React.Component { if (activeSetting > (menuEntries.length - 1)) { activeSetting = 0; } + if (props.deprecated) activeSetting = 1; this.state = { apiServer: props.settings.get("apiServer"), @@ -58,6 +59,12 @@ class Settings extends React.Component { } _getMenuEntries(props) { + if (props.deprecated) { + return [ + "wallet", + "backup" + ]; + } let menuEntries = [ "general", "wallet", @@ -185,7 +192,7 @@ class Settings extends React.Component { break; case "wallet": - entries = ; + entries = ; break; case "password": @@ -223,7 +230,7 @@ class Settings extends React.Component { } return ( -
+
diff --git a/app/components/Settings/SettingsContainer.jsx b/app/components/Settings/SettingsContainer.jsx index 9aad41937c..df594752d6 100644 --- a/app/components/Settings/SettingsContainer.jsx +++ b/app/components/Settings/SettingsContainer.jsx @@ -29,7 +29,7 @@ class SettingsContainer extends React.Component { } }} > - + ); } diff --git a/app/components/Settings/WalletSettings.jsx b/app/components/Settings/WalletSettings.jsx index 982eab88a7..dbfc45a0f3 100644 --- a/app/components/Settings/WalletSettings.jsx +++ b/app/components/Settings/WalletSettings.jsx @@ -31,12 +31,23 @@ export default class WalletSettings extends React.Component { render() { let {lookupActive} = this.state; + let {deprecated} = this.props; + + if (deprecated) { + return ( +
+ + +
+ ); + } return (
+
:
diff --git a/package.json b/package.json index d7fc0ce32f..2f5b905e9f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "build": "cross-env NODE_ENV=production webpack --env.prod", "build-hash": "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.baseUrl=''", "build-hash-nougly": "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.noUgly --env.baseUrl=''", - "build-github": "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.baseUrl='/wallet/'", + "build-github": "cross-env NODE_ENV=production webpack --env.prod --env.hash env.deprecated --env.baseUrl='/wallet/'", "build-electron": "cross-env NODE_ENV=production webpack --env.prod --env.electron --env.hash", "build-electron-nougly": "cross-env NODE_ENV=production webpack --env.prod --env.electron --env.noUgly --env.hash --progress --display-error-details --colors", "prepare-electron": "copyfiles -f resources/*.js build/electron/", diff --git a/webpack.config.js b/webpack.config.js index 617fcd1535..6088c38a7c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -60,7 +60,8 @@ module.exports = function(env) { __HASH_HISTORY__: !!env.hash, __BASE_URL__: JSON.stringify(baseUrl), __UI_API__: JSON.stringify(env.apiUrl || "https://ui.bitshares.eu/api"), - __TESTNET__: !!env.testnet + __TESTNET__: !!env.testnet, + __DEPRECATED__: !!env.deprecated }) ];