From c3c641b6bae81610dfaab04c7e53df83c5784bf4 Mon Sep 17 00:00:00 2001 From: zeppi Date: Fri, 15 Jul 2022 16:49:24 -0400 Subject: [PATCH] feature: wallet sync export button --- ui/component/settingAccount/index.js | 2 + ui/component/settingAccount/view.jsx | 18 ++++++- ui/component/walletExport/index.js | 9 ++++ ui/component/walletExport/view.jsx | 75 ++++++++++++++++++++++++++++ ui/constants/modal_types.js | 1 + ui/modal/modalRouter/view.jsx | 1 + ui/modal/modalWalletExport/index.js | 9 ++++ ui/modal/modalWalletExport/view.jsx | 18 +++++++ 8 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 ui/component/walletExport/index.js create mode 100644 ui/component/walletExport/view.jsx create mode 100644 ui/modal/modalWalletExport/index.js create mode 100644 ui/modal/modalWalletExport/view.jsx diff --git a/ui/component/settingAccount/index.js b/ui/component/settingAccount/index.js index 38e30f9b4..62fcf566a 100644 --- a/ui/component/settingAccount/index.js +++ b/ui/component/settingAccount/index.js @@ -3,6 +3,7 @@ import { selectHasChannels } from 'redux/selectors/claims'; import { selectWalletIsEncrypted } from 'redux/selectors/wallet'; import { doWalletStatus } from 'redux/actions/wallet'; import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user'; +import { doOpenModal } from 'redux/actions/app'; import SettingAccount from './view'; @@ -14,6 +15,7 @@ const select = (state) => ({ }); const perform = (dispatch) => ({ + openModal: (modal, props) => dispatch(doOpenModal(modal, props)), doWalletStatus: () => dispatch(doWalletStatus()), }); diff --git a/ui/component/settingAccount/view.jsx b/ui/component/settingAccount/view.jsx index fa10a2c9f..589fa53ac 100644 --- a/ui/component/settingAccount/view.jsx +++ b/ui/component/settingAccount/view.jsx @@ -1,6 +1,7 @@ // @flow import * as ICONS from 'constants/icons'; import * as PAGES from 'constants/pages'; +import * as MODALS from 'constants/modal_types'; import { SETTINGS_GRP } from 'constants/settings'; import React from 'react'; import Button from 'component/button'; @@ -17,10 +18,11 @@ type Props = { user: User, hasChannels: boolean, doWalletStatus: () => void, + openModal: (string, any) => void, }; export default function SettingAccount(props: Props) { - const { isAuthenticated, walletEncrypted, user, hasChannels, doWalletStatus } = props; + const { isAuthenticated, walletEncrypted, user, hasChannels, doWalletStatus, openModal } = props; const [storedPassword, setStoredPassword] = React.useState(false); // Determine if password is stored. @@ -107,6 +109,20 @@ export default function SettingAccount(props: Props) {