Skip to content

Commit 8666a82

Browse files
authored
fix: mf-6352 adjust check security dialog (#11926)
* fix: mf-6352 adjust check security dialog * fix: mf-5983 add missing i18n
1 parent 93be10d commit 8666a82

File tree

15 files changed

+45
-19
lines changed

15 files changed

+45
-19
lines changed

packages/mask/dashboard/pages/CreateMaskWallet/Recovery/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,13 @@ export const Component = memo(function Recovery() {
236236
<TabContext value={currentTab}>
237237
<div className={classes.tabList}>
238238
<MaskTabList variant="base" onChange={onTabChange} aria-label="Recovery Methods">
239-
<Tab className={classes.tab} label="Mnemonic" value={tabs.mnemonic} />
240-
<Tab className={classes.tab} label="Private Key" value={tabs.privateKey} />
241-
<Tab className={classes.tab} label="Keystore" value={tabs.local} />
239+
<Tab className={classes.tab} label={<Trans>Mnemonic</Trans>} value={tabs.mnemonic} />
240+
<Tab
241+
className={classes.tab}
242+
label={<Trans>Private Key</Trans>}
243+
value={tabs.privateKey}
244+
/>
245+
<Tab className={classes.tab} label={<Trans>Keystore</Trans>} value={tabs.local} />
242246
</MaskTabList>
243247
</div>
244248
<div className={classes.panelContainer}>

packages/mask/shared-ui/locale/en-US.po

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mask/shared-ui/locale/ja-JP.po

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mask/shared-ui/locale/ko-KR.po

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mask/shared-ui/locale/zh-CN.po

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/mask/shared-ui/locale/zh-TW.po

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/plugins/GoPlusSecurity/src/SiteAdaptor/CheckSecurityDialog.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const useStyles = makeStyles()((theme) => ({
2727
flexDirection: 'column',
2828
},
2929
footer: {
30+
height: 56,
31+
boxSizing: 'border-box',
3032
boxShadow:
3133
theme.palette.mode === 'light' ?
3234
'0px 0px 20px rgba(0, 0, 0, 0.05)'

packages/plugins/GoPlusSecurity/src/SiteAdaptor/components/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { Trans } from '@lingui/macro'
12
import { Box, Link, Stack, Typography } from '@mui/material'
2-
import { GoPlusLabLogo } from '../icons/Logo.js'
33
import { PLUGIN_OFFICIAL_WEBSITE } from '../../constants.js'
4-
import { Trans } from '@lingui/macro'
4+
import { GoPlusLabLogo } from '../icons/Logo.js'
55

66
export function Footer() {
77
return (

packages/plugins/GoPlusSecurity/src/SiteAdaptor/components/SearchBox.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { Trans, t } from '@lingui/macro'
2-
import { Icons } from '@masknet/icons'
32
import { WalletIcon, useMenuConfig } from '@masknet/shared'
43
import { MaskTextField, makeStyles } from '@masknet/theme'
54
import { EVMChainResolver } from '@masknet/web3-providers'
65
import type { SecurityAPI } from '@masknet/web3-providers/types'
76
import { ChainId } from '@masknet/web3-shared-evm'
87
import { KeyboardArrowDown as KeyboardArrowDownIcon } from '@mui/icons-material'
9-
import { Box, Button, InputAdornment, MenuItem, Stack, Typography } from '@mui/material'
8+
import { Box, Button, MenuItem, Stack, Typography } from '@mui/material'
109
import { memo, useState } from 'react'
1110
import { useSupportedChains } from '../hooks/useSupportedChains.js'
1211

@@ -53,7 +52,7 @@ function getChainName(chain?: SecurityAPI.SupportedChain<ChainId>) {
5352
return EVMChainResolver.chainName(chain.chainId) ?? chain.name
5453
}
5554

56-
export const SearchBox = memo<SearchBoxProps>(({ onSearch }) => {
55+
export const SearchBox = memo<SearchBoxProps>(function SearchBox({ onSearch }) {
5756
const { classes } = useStyles()
5857
const [selectedChain, setSelectedChain] = useState<
5958
SecurityAPI.SupportedChain<ChainId> & {
@@ -120,11 +119,6 @@ export const SearchBox = memo<SearchBoxProps>(({ onSearch }) => {
120119
onChange={(e) => setSearchSearchContent(e.target.value)}
121120
InputProps={{
122121
classes: { root: classes.search },
123-
startAdornment: (
124-
<InputAdornment position="start">
125-
<Icons.Search />
126-
</InputAdornment>
127-
),
128122
}}
129123
/>
130124
</Box>

packages/shared/src/UI/modals/ConfirmDialog/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useState, type ReactNode, memo } from 'react'
44
import type { SingletonModalProps } from '@masknet/shared-base'
55
import { useSingletonModal } from '@masknet/shared-base-ui'
66
import { InjectedDialog } from '@masknet/shared'
7+
import { Trans } from '@lingui/macro'
78

89
const useStyles = makeStyles()((theme) => ({
910
paper: {
@@ -55,8 +56,8 @@ interface ConfirmDialogProps extends Omit<DialogProps, 'title' | 'onSubmit' | 'o
5556
title?: ReactNode
5657
message?: ReactNode | string
5758
description?: ReactNode | string
58-
confirmLabel?: string
59-
cancelLabel?: string
59+
confirmLabel?: ReactNode
60+
cancelLabel?: ReactNode
6061
/** Change color of confirm button */
6162
confirmVariant?: 'error' | 'warning'
6263
onConfirm(): void
@@ -68,8 +69,8 @@ const Dialog = memo(function Dialog({
6869
title,
6970
message,
7071
description,
71-
confirmLabel = 'Confirm',
72-
cancelLabel = 'Cancel',
72+
confirmLabel,
73+
cancelLabel,
7374
confirmVariant = 'error',
7475
onConfirm,
7576
onClose,
@@ -91,14 +92,14 @@ const Dialog = memo(function Dialog({
9192
</Typography>
9293
<Box className={classes.buttonGroup}>
9394
<ActionButton fullWidth variant="roundedOutlined" onClick={() => onClose?.()}>
94-
{cancelLabel}
95+
{cancelLabel ?? <Trans>Cancel</Trans>}
9596
</ActionButton>
9697
<ActionButton
9798
fullWidth
9899
variant="roundedContained"
99100
color={confirmVariant}
100101
onClick={() => onConfirm()}>
101-
{confirmLabel}
102+
{confirmLabel ?? <Trans>Confirm</Trans>}
102103
</ActionButton>
103104
</Box>
104105
</DialogContent>

0 commit comments

Comments
 (0)