diff --git a/public/locales/en.json b/public/locales/en.json index c26c176..9c33f13 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -140,6 +140,7 @@ "walletCount_plural": "{{count, number}} wallets", "actionsEditTooltip": "Edit wallet", + "actionsSendTransaction": "Send Krist", "actionsWalletInfo": "Wallet info", "actionsDelete": "Delete wallet", "actionsDeleteConfirm": "Are you sure you want to delete this wallet?", diff --git a/src/pages/wallets/WalletActions.tsx b/src/pages/wallets/WalletActions.tsx index f72983f..20b79a7 100644 --- a/src/pages/wallets/WalletActions.tsx +++ b/src/pages/wallets/WalletActions.tsx @@ -5,7 +5,8 @@ import { Modal, Tooltip, Dropdown, Menu } from "antd"; import { MenuClickEventHandler } from "rc-menu/lib/interface"; import { - EditOutlined, DeleteOutlined, InfoCircleOutlined, ExclamationCircleOutlined + EditOutlined, DeleteOutlined, InfoCircleOutlined, ExclamationCircleOutlined, + SendOutlined } from "@ant-design/icons"; import { useTranslation } from "react-i18next"; @@ -13,6 +14,7 @@ import { WalletEditButton } from "./WalletEditButton"; import { AddWalletModal } from "./AddWalletModal"; import { WalletInfoModal } from "./info/WalletInfoModal"; +import { SendTransactionModalLink } from "@comp/transactions/SendTransactionModalLink"; import { Wallet, deleteWallet } from "@wallets"; @@ -35,17 +37,15 @@ }); } - const onMenuClick: MenuClickEventHandler = (e) => { + const onMenuClick: MenuClickEventHandler = e => { switch (e.key) { // "Wallet info" button - case "1": - setWalletInfoVisible(true); - break; + case "2": + return setWalletInfoVisible(true); // "Delete wallet" button - case "2": - showWalletDeleteConfirm(); - break; + case "3": + return showWalletDeleteConfirm(); } }; @@ -69,15 +69,22 @@ overlay={( - {/* Wallet info button */} + {/* Send tx button */} + +
{t("myWallets.actionsSendTransaction")}
+
+
+ + {/* Wallet info button */} + {t("myWallets.actionsWalletInfo")} {/* Delete button */} - + {t("myWallets.actionsDelete")}
diff --git a/src/style/components.less b/src/style/components.less index 73b1c93..9f5e678 100644 --- a/src/style/components.less +++ b/src/style/components.less @@ -214,3 +214,12 @@ height: 100%; } + +// Make all icons in menu consistent (sometimes the icon may not be a direct +// descendent of the menu item) +.ant-dropdown-menu-item .anticon:first-child { + min-width: 12px; + margin-right: 8px; + font-size: @font-size-sm; + vertical-align: -0.1em; +}