diff --git a/public/locales/en.json b/public/locales/en.json index e2387fd..2c7967e 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -125,6 +125,8 @@ "myWallets": { "title": "Wallets", "manageBackups": "Manage backups", + "importBackup": "Import wallets", + "exportBackup": "Export wallets", "createWallet": "Create wallet", "addExistingWallet": "Add existing wallet", "searchPlaceholder": "Search wallets...", @@ -749,6 +751,16 @@ } }, + "export": { + "modalTitle": "Export backup", + + "description": "This secret code contains your wallets and address book contacts. You can use it to import them in another browser, or to back them up. You will still need your master password to import the wallets in the future. <1>Do not share this code with anyone.", + "size": "Size: <1 />", + + "buttonSave": "Save to file", + "buttonCopy": "Copy to clipboard" + }, + "walletLimitMessage": "You have more wallets stored than KristWeb supports. This was either caused by a bug, or you bypassed it intentionally. Expect issues with syncing.", "optionalFieldUnset": "(unset)", diff --git a/src/layout/nav/Brand.tsx b/src/layout/nav/Brand.tsx index ad45201..8c7e720 100644 --- a/src/layout/nav/Brand.tsx +++ b/src/layout/nav/Brand.tsx @@ -1,7 +1,6 @@ // Copyright (c) 2020-2021 Drew Lemmy // This file is part of KristWeb 2 under GPL-3.0. // Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt -import { useDebugValue } from "react"; import { Tag } from "antd"; import { useTranslation } from "react-i18next"; diff --git a/src/pages/dev/DevPage.tsx b/src/pages/dev/DevPage.tsx index 5ebcee6..a2df974 100644 --- a/src/pages/dev/DevPage.tsx +++ b/src/pages/dev/DevPage.tsx @@ -1,46 +1,21 @@ // Copyright (c) 2020-2021 Drew Lemmy // This file is part of KristWeb 2 under GPL-3.0. // Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt -import { useState } from "react"; -import { Button, Alert } from "antd"; +import { Button } from "antd"; import { PageLayout } from "@layout/PageLayout"; -import { ImportBackupModal } from "../backup/ImportBackupModal"; -import { AuthorisedAction } from "@comp/auth/AuthorisedAction"; - import { useWallets, deleteWallet } from "@wallets"; import Debug from "debug"; const debug = Debug("kristweb:dev-page"); export function DevPage(): JSX.Element { - const [importVisible, setImportVisible] = useState(false); const { wallets } = useWallets(); return - - - - - - - -
- - {/* Open import backup modal */} - setImportVisible(true)} - > - - - - -

- {/* Delete all wallets with zero balance */} + + + + ; +} diff --git a/src/pages/wallets/WalletsPage.tsx b/src/pages/wallets/WalletsPage.tsx index 6a171aa..b164833 100644 --- a/src/pages/wallets/WalletsPage.tsx +++ b/src/pages/wallets/WalletsPage.tsx @@ -3,17 +3,19 @@ // Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt import { useState } from "react"; import { Button } from "antd"; -import { DatabaseOutlined, PlusOutlined } from "@ant-design/icons"; +import { PlusOutlined } from "@ant-design/icons"; import { useTranslation } from "react-i18next"; import { PageLayout } from "@layout/PageLayout"; import { AuthorisedAction } from "@comp/auth/AuthorisedAction"; -import { AddWalletModal } from "./AddWalletModal"; -import { WalletsTable } from "./WalletsTable"; import { useWallets } from "@wallets"; +import { ManageBackupsDropdown } from "./ManageBackupsDropdown"; +import { AddWalletModal } from "./AddWalletModal"; +import { WalletsTable } from "./WalletsTable"; + /** Extract the subtitle into its own component to avoid re-rendering the * entire page when a wallet is added. */ function WalletsPageSubtitle(): JSX.Element { @@ -34,10 +36,10 @@ const [addWalletVisible, setAddWalletVisible] = useState(false); return <> - + {/* Manage backups */} + + {/* Create wallet */} setCreateWalletVisible(true)}>