From b2a010ca9434e4236020faaa83e62c510423fb44 Mon Sep 17 00:00:00 2001 From: mikozet Date: Fri, 28 Jun 2024 15:25:46 +0400 Subject: [PATCH] Add migration data functionality --- locales/en.json | 19 +++- package-lock.json | 37 +++++++- package.json | 2 +- src/components/Navigation.js | 4 + src/components/NavigationFloating.js | 6 ++ src/routes.js | 7 ++ src/services/core.js | 16 ++++ src/store/app/actions.js | 4 + src/store/index.js | 2 + src/store/user/actions.js | 83 +++++++++++++++++ src/store/user/reducers.js | 20 ++++ src/store/user/types.js | 3 + src/utils/constants.js | 1 + src/views/Dashboard.js | 27 +++++- src/views/Login.js | 27 +++++- src/views/MigrateYourProfile.js | 131 +++++++++++++++++++++++++++ 16 files changed, 380 insertions(+), 9 deletions(-) create mode 100644 src/store/user/actions.js create mode 100644 src/store/user/reducers.js create mode 100644 src/store/user/types.js create mode 100644 src/views/MigrateYourProfile.js diff --git a/locales/en.json b/locales/en.json index c8ec0b82..08588278 100644 --- a/locales/en.json +++ b/locales/en.json @@ -202,7 +202,23 @@ "headingLogin": "Login", "inputPlaceholder": "Start typing...", "linkSupport": "Send an email", - "successWelcome": "Successfully connected to account. Welcome!" + "successWelcome": "Successfully connected to account. Welcome!", + "migrationText1": "Circles Garden profile data is being migrated. You can read about this here:", + "migrationText2": "Please login and visit the 'profile-migrate' page to confirm your preference", + "migrationText3": "Please visit the 'profile-migrate' page to confirm your preference" + }, + "MigrateYourProfile": { + "title": "Migrate Your Profile", + "body1": "If you accept the migration of your user profile, this will mean that your data will be transferred to the new Circles team (Gnosis Chain).", + "body2": "At the end of the migration period, all the data that is not transferred will be deleted from current databases.", + "body3": "Your wallet, seed phrase, and CRC will not be deleted regardless of your choice and you will still be able to access to your wallet via circles.garden.", + "body4": "You can read about this here:", + "labelForm": "Do you consent to the migration of your profile data to the new Circles team?", + "option1": "Yes", + "option2": "no", + "buttonSubmit": "Submit", + "confirmationMsg": "You have successfully updated your migration data status", + "errorMsg": "Sorry, there was a problem with saving changes." }, "MyProfile": { "buttonCreateOrganization": "Create Shared Wallet", @@ -218,6 +234,7 @@ "buttonDoublePeople": "Trust People", "buttonSendCircles": "Send Circles", "buttonOrganization": "Create Shared Wallet", + "buttonMigration": "Migrate Your Profile", "linkAbout": "About", "linkBugReporting": "Report Bugs", "linkFAQ": "FAQ", diff --git a/package-lock.json b/package-lock.json index 9045923b..ca80b1c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.15.2", "license": "AGPL-3.0", "dependencies": { - "@circles/core": "^4.9.1", + "@circles/core": "^4.10.0", "@circles/timecircles": "^1.0.6", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", @@ -2036,9 +2036,9 @@ } }, "node_modules/@circles/core": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@circles/core/-/core-4.9.1.tgz", - "integrity": "sha512-6Dpa2PfnkoA5nRHLzr9gwB/j/zaLs7AEjCvJBZuETM5VyFdNB1q+8+ofrwBZ7qDimxwjSG5tZRD3klPwyPKOCw==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@circles/core/-/core-4.10.0.tgz", + "integrity": "sha512-BfkV27i2mcaWCtnOtMt/hDuRMar2EYSa2fO1Jzzu6cKkGZwsqOzJbRGMadPJpkE94gEQtBJHMDuiPPeUQNPzSg==", "dependencies": { "@circles/circles-contracts": "^3.3.2", "@circles/safe-contracts": "=1.0.14", @@ -14016,6 +14016,7 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.10.tgz", "integrity": "sha512-pYIQC5EcMmID74t26GCC67946mgTJFiLXOT/BYozgrd4UEY2JHEGLhWi9cMiQCt5BSqFEvKkCHNnoj82SRjiEw==", + "dev": true, "hasInstallScript": true, "inBundle": true, "license": "Apache-2.0", @@ -14030,6 +14031,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==", + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -14417,6 +14419,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -14601,6 +14604,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, "funding": [ { "type": "github", @@ -14668,6 +14672,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true, "inBundle": true, "license": "MIT" }, @@ -14763,6 +14768,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "funding": [ { "type": "github", @@ -14845,6 +14851,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -15175,6 +15182,7 @@ "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -15191,6 +15199,7 @@ "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true, "inBundle": true, "license": "MIT" }, @@ -15614,6 +15623,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -15634,6 +15644,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -15661,6 +15672,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -15717,6 +15729,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, "inBundle": true, "license": "ISC" }, @@ -15758,6 +15771,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, "funding": [ { "type": "github", @@ -16005,6 +16019,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", + "dev": true, "hasInstallScript": true, "inBundle": true, "license": "MIT", @@ -16030,6 +16045,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -16056,6 +16072,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==", + "dev": true, "inBundle": true, "license": "MIT", "engines": { @@ -16079,6 +16096,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz", "integrity": "sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==", + "dev": true, "hasInstallScript": true, "inBundle": true, "license": "MIT", @@ -16273,6 +16291,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, "inBundle": true, "license": "ISC" }, @@ -16280,6 +16299,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true, "inBundle": true, "license": "MIT" }, @@ -16371,6 +16391,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", + "dev": true, "inBundle": true, "license": "MIT" }, @@ -16384,6 +16405,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true, "inBundle": true, "license": "MIT" }, @@ -16391,6 +16413,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "dev": true, "inBundle": true, "license": "MIT", "bin": { @@ -16707,6 +16730,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -16747,6 +16771,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -16844,6 +16869,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -16891,6 +16917,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "dev": true, "hasInstallScript": true, "inBundle": true, "license": "MIT", @@ -17075,6 +17102,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -17336,6 +17364,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, "inBundle": true, "license": "MIT" }, diff --git a/package.json b/package.json index 3be6da6e..a367c3d2 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "webpack-dev-server": "^3.11.3" }, "dependencies": { - "@circles/core": "^4.9.1", + "@circles/core": "^4.10.0", "@circles/timecircles": "^1.0.6", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", diff --git a/src/components/Navigation.js b/src/components/Navigation.js index 78cb0871..e61394a7 100644 --- a/src/components/Navigation.js +++ b/src/components/Navigation.js @@ -8,6 +8,7 @@ import { generatePath } from 'react-router-dom'; import { ACTIVITIES_PATH, + MIGRATION_PATH, MY_PROFILE_PATH, ORGANIZATION_PATH, SEARCH_PATH, @@ -151,6 +152,9 @@ const NavigationMain = ({ onClick }) => { {translate('Navigation.buttonSettings')} + + {translate('Navigation.buttonMigration')} + ); }; diff --git a/src/components/NavigationFloating.js b/src/components/NavigationFloating.js index 9361007f..aa654b08 100644 --- a/src/components/NavigationFloating.js +++ b/src/components/NavigationFloating.js @@ -6,6 +6,7 @@ import { Link } from 'react-router-dom'; import { EDIT_PROFILE_PATH, + MIGRATION_PATH, MY_PROFILE_PATH, ORGANIZATION_MEMBERS_PATH, } from '~/routes'; @@ -187,6 +188,11 @@ export default function NavigationFloating(props) { }} onClose={handleClose} > + + + + + {props.isAddMembersLink && ( diff --git a/src/routes.js b/src/routes.js index 1dda999f..0dc6224f 100644 --- a/src/routes.js +++ b/src/routes.js @@ -10,6 +10,7 @@ import DashboardOrganization from '~/views/DashboardOrganization'; import EditProfile from '~/views/EditProfile'; import Error from '~/views/Error'; import Login from '~/views/Login'; +import MigrateYourProfile from '~/views/MigrateYourProfile'; import NotFound from '~/views/NotFound'; import Onboarding from '~/views/Onboarding'; import OnboardingOrganization from '~/views/OnboardingOrganization'; @@ -37,6 +38,7 @@ export const ACTIVITIES_PATH = '/activities'; export const DASHBOARD_PATH = '/'; export const EDIT_PROFILE_PATH = '/edit'; export const LOGIN_PATH = '/welcome/login'; +export const MIGRATION_PATH = '/profile-migrate'; export const ONBOARDING_PATH = '/welcome/onboarding'; export const ORGANIZATION_MEMBERS_ADD_PATH = '/sharedwallet/members/add'; export const ORGANIZATION_MEMBERS_PATH = '/sharedwallet/members'; @@ -264,6 +266,11 @@ const Routes = () => { + diff --git a/src/services/core.js b/src/services/core.js index 135b3a23..df89fc9c 100644 --- a/src/services/core.js +++ b/src/services/core.js @@ -144,6 +144,22 @@ const user = { safeAddress, }); }, + + updateProfileMigrationConsent: async ( + safeAddress, + profileMigrationConsent, + ) => { + return await requestCore('user', 'updateProfileMigrationConsent', { + safeAddress, + profileMigrationConsent, + }); + }, + + getProfileMigrationConsent: async (safeAddress) => { + return await requestCore('user', 'getProfileMigrationConsent', { + safeAddress, + }); + }, }; const avatar = { diff --git a/src/store/app/actions.js b/src/store/app/actions.js index 5535599e..cda332ef 100644 --- a/src/store/app/actions.js +++ b/src/store/app/actions.js @@ -20,6 +20,7 @@ import { initializeTutorials, resetAllTutorials, } from '~/store/tutorial/actions'; +import { initializeUser } from '~/store/user/actions'; import { burnWallet, initializeWallet } from '~/store/wallet/actions'; import { formatErrorMessage } from '~/utils/debug'; @@ -52,6 +53,9 @@ export function initializeApp() { // Check for additional states ... await dispatch(checkAppState()); + // Check for migration status + await dispatch(initializeUser()); + dispatch({ type: ActionTypes.APP_INITIALIZE_SUCCESS, }); diff --git a/src/store/index.js b/src/store/index.js index 0a4c7b1a..1699ef59 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -7,6 +7,7 @@ import safeReducer from '~/store/safe/reducers'; import tokenReducer from '~/store/token/reducers'; import trustReducer from '~/store/trust/reducers'; import tutorialReducer from '~/store/tutorial/reducers'; +import userReducer from '~/store/user/reducers'; import walletReducer from '~/store/wallet/reducers'; const rootReducer = combineReducers({ @@ -17,6 +18,7 @@ const rootReducer = combineReducers({ token: tokenReducer, trust: trustReducer, tutorial: tutorialReducer, + user: userReducer, wallet: walletReducer, }); diff --git a/src/store/user/actions.js b/src/store/user/actions.js new file mode 100644 index 00000000..c6e15039 --- /dev/null +++ b/src/store/user/actions.js @@ -0,0 +1,83 @@ +import { Typography } from '@mui/material'; +import React from 'react'; + +import core from '~/services/core'; +import translate from '~/services/locale'; +import notify, { NotificationsTypes } from '~/store/notifications/actions'; +import ActionTypes from '~/store/user/types'; +import logError from '~/utils/debug'; + +export function initializeUser() { + return async (dispatch, getState) => { + const { safe } = getState(); + + if (!safe.currentAccount) { + return; + } + + try { + const migrationStatus = await core.user.getProfileMigrationConsent( + safe.currentAccount, + ); + + dispatch({ + type: ActionTypes.USER_MIGRATION_UPDATE, + meta: { + isMigrationAccepted: + migrationStatus !== null ? migrationStatus : false, + }, + }); + } catch (error) { + logError(error); + } + }; +} + +export function updateUserMigration(isMigrateData) { + return async (dispatch, getState) => { + const { safe } = getState(); + + if (!safe.currentAccount) { + return; + } + + try { + const updateMigration = await core.user.updateProfileMigrationConsent( + safe.currentAccount, + isMigrateData, + ); + + if (updateMigration) { + dispatch({ + type: ActionTypes.USER_MIGRATION_UPDATE, + meta: { + isMigrationAccepted: isMigrateData, + }, + }); + dispatch( + notify({ + text: ( + + {translate('MigrateYourProfile.confirmationMsg')} + + ), + type: NotificationsTypes.SUCCESS, + }), + ); + /* eslint-disable no-console */ + } + } catch (error) { + logError(error); + dispatch( + notify({ + text: ( + + {translate('MigrateYourProfile.errorMsg')} + + ), + type: NotificationsTypes.ERROR, + }), + ); + } + }; +} diff --git a/src/store/user/reducers.js b/src/store/user/reducers.js new file mode 100644 index 00000000..ced40803 --- /dev/null +++ b/src/store/user/reducers.js @@ -0,0 +1,20 @@ +import update from 'immutability-helper'; + +import ActionTypes from '~/store/user/types'; + +const initialState = { + isMigrationAccepted: false, +}; + +const userReducer = (state = initialState, action) => { + switch (action.type) { + case ActionTypes.USER_MIGRATION_UPDATE: + return update(state, { + isMigrationAccepted: { $set: action.meta.isMigrationAccepted }, + }); + default: + return state; + } +}; + +export default userReducer; diff --git a/src/store/user/types.js b/src/store/user/types.js new file mode 100644 index 00000000..de69c24b --- /dev/null +++ b/src/store/user/types.js @@ -0,0 +1,3 @@ +import createTypes from 'redux-create-action-types'; + +export default createTypes('USER_MIGRATION_UPDATE'); diff --git a/src/utils/constants.js b/src/utils/constants.js index f92d65fb..ad74b540 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -17,6 +17,7 @@ export const PRIVACY_LEGAL_URL = 'https://joincircles.net/privacy-policy'; export const TELEGRAM_URL = 'https://t.me/about_circles'; export const TERMS_URL = 'https://joincircles.net/terms'; export const TWITTER_URL = 'https://twitter.com/aboutcircles'; +export const MIGRATION_INFO_URL = 'https://bit.ly/3W1il2M'; export const SAFE_LAST_VERSION = '1.3.0'; export const SAFE_CRC_VERSION = '1.1.1'; diff --git a/src/views/Dashboard.js b/src/views/Dashboard.js index 42c9cf46..c44a20ba 100644 --- a/src/views/Dashboard.js +++ b/src/views/Dashboard.js @@ -1,4 +1,4 @@ -import { Box, Container, Grid, IconButton } from '@mui/material'; +import { Box, Container, Grid, IconButton, Typography } from '@mui/material'; import makeStyles from '@mui/styles/makeStyles'; import clsx from 'clsx'; import React, { Fragment, useEffect, useState } from 'react'; @@ -15,6 +15,7 @@ import BackgroundCurved from '~/components/BackgroundCurved'; import BalanceDisplay from '~/components/BalanceDisplay'; import ButtonDouble from '~/components/ButtonDouble'; import Drawer from '~/components/Drawer'; +import ExternalLink from '~/components/ExternalLink'; import Header from '~/components/Header'; import LastInteractions from '~/components/LastInteractions'; import Navigation from '~/components/Navigation'; @@ -27,6 +28,7 @@ import { checkPendingActivities, } from '~/store/activity/actions'; import { IconMenu } from '~/styles/icons'; +import { MIGRATION_INFO_URL } from '~/utils/constants'; const transitionMixin = ({ transitions }) => ({ transition: transitions.create(['transform'], { @@ -77,6 +79,13 @@ const useStyles = makeStyles((theme) => ({ position: 'relative', top: '45px', }, + + migrationContainer: { + marginTop: '10px', + '& p': { + marginBottom: '10px', + }, + }, })); const Dashboard = () => { @@ -148,6 +157,22 @@ const Dashboard = () => { + + + {translate('Login.migrationText1')} +

+ + {MIGRATION_INFO_URL} + +
+ + {translate('Login.migrationText3')} + +
({ }, }, + migrationContainer: { + marginTop: '10px', + '& p': { + marginBottom: '10px', + }, + }, + paperContainer: { boxShadow: 'none', }, @@ -130,7 +137,7 @@ const Login = () => { - + {translate('Login.headingLogin')} @@ -171,6 +178,22 @@ const Login = () => { {translate('Login.linkSupport')} + + + {translate('Login.migrationText1')} +

+ + {MIGRATION_INFO_URL} + +
+ + {translate('Login.migrationText2')} + +