diff --git a/web/public/locales/en/common.json b/web/public/locales/en/common.json index 2e4f3a8..43ab321 100644 --- a/web/public/locales/en/common.json +++ b/web/public/locales/en/common.json @@ -2,6 +2,7 @@ "cancel": "Cancel", "edit": "Edit", "edit-defaults": "Edit defaults", + "download-fwd-history": "Download forwarding history (json)", "max-hourly-rate": "Max hourly rate", "max-pending": "Max pending", "mode": "Mode", diff --git a/web/src/views/Home/parts/Header.tsx b/web/src/views/Home/parts/Header.tsx index 44f3feb..d6f5f3a 100644 --- a/web/src/views/Home/parts/Header.tsx +++ b/web/src/views/Home/parts/Header.tsx @@ -1,14 +1,23 @@ -import { Box, Typography } from '@mui/material'; +import { Box, Typography, Tooltip, IconButton } from '@mui/material'; +import DownloadIcon from '@mui/icons-material/Download'; import Image from 'next/image'; import { HEADER_HEIGHT_DESKTOP, HEADER_HEIGHT_MOBILE } from 'constant'; import { useInfo } from 'hooks'; +import { useTranslation } from 'react-i18next'; import NodeInfo from './NodeInfo'; import DefaultLimits from './DefaultLimits'; + const Header = () => { const { info } = useInfo(); + const { t } = useTranslation(); + + const openFwdHistory = () => { + const url = '/api/forwarding_history'; + window.location.href = url; + }; return ( { }} /> + + {t('download-fwd-history')}} + > + + + + diff --git a/webui-build/404.html b/webui-build/404.html index 1d2b0bb..f8f4c2a 100644 --- a/webui-build/404.html +++ b/webui-build/404.html @@ -13,7 +13,7 @@ transition: opacity 250ms ease-in-out 0ms; opacity: 1; } -
loader
loader
loader
\ No newline at end of file +
loader
\ No newline at end of file diff --git a/webui-build/locales/en/common.json b/webui-build/locales/en/common.json index 2e4f3a8..43ab321 100644 --- a/webui-build/locales/en/common.json +++ b/webui-build/locales/en/common.json @@ -2,6 +2,7 @@ "cancel": "Cancel", "edit": "Edit", "edit-defaults": "Edit defaults", + "download-fwd-history": "Download forwarding history (json)", "max-hourly-rate": "Max hourly rate", "max-pending": "Max pending", "mode": "Mode",