diff --git a/public/locales/en.json b/public/locales/en.json index 176cc48..72c8489 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -164,6 +164,9 @@ "walletCount_plural": "{{count, number}} wallets", "walletCountEmpty": "No wallets", + "noWalletsHint": "No wallets yet", + "noWalletsText": "Add or create a wallet by clicking the <1 /> menu in the top right!", + "actionsViewAddress": "View address", "actionsEditTooltip": "Edit wallet", "actionsSendTransaction": "Send Krist", diff --git a/src/pages/wallets/NoWalletsMobileResult.tsx b/src/pages/wallets/NoWalletsMobileResult.tsx new file mode 100644 index 0000000..c3a397b --- /dev/null +++ b/src/pages/wallets/NoWalletsMobileResult.tsx @@ -0,0 +1,22 @@ +// Copyright (c) 2020-2021 Drew Lemmy +// This file is part of KristWeb 2 under AGPL-3.0. +// Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt +import { MoreOutlined } from "@ant-design/icons"; + +import { Trans } from "react-i18next"; +import { useTFns } from "@utils/i18n"; + +import { SmallResult } from "@comp/results/SmallResult"; + +export function NoWalletsMobileResult(): JSX.Element { + const { tStr, tKey } = useTFns("myWallets."); + + return + Add or create a wallet by clicking the menu in the + top right! + } + />; +} diff --git a/src/pages/wallets/WalletsTable.tsx b/src/pages/wallets/WalletsTable.tsx index 0cc5e3e..fb27823 100644 --- a/src/pages/wallets/WalletsTable.tsx +++ b/src/pages/wallets/WalletsTable.tsx @@ -14,6 +14,7 @@ import { useWallets, useWalletCategories, Wallet } from "@wallets"; import { WalletActions } from "./WalletActions"; import { WalletMobileItem } from "./WalletMobileItem"; +import { NoWalletsMobileResult } from "./NoWalletsMobileResult"; import { OpenEditWalletFn } from "./WalletEditButton"; import { OpenSendTxFn } from "@comp/transactions/SendTransactionModalLink"; @@ -135,6 +136,8 @@ openSendTx, openWalletInfo }: Props): JSX.Element { + const { tStr } = useTFns("myWallets."); + const { wallets } = useWallets(); const walletValues = Object.values(wallets); @@ -152,7 +155,9 @@ ); return isMobile && list - ? list + ? (walletValues.length > 0 + ? list // Show some help text for creating wallets on mobile: + : ) :