diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index da17ab65b9bd..a20fbbab7549 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -25,6 +25,7 @@ "@masknet/web3-providers": "workspace:*", "@masknet/web3-shared-base": "workspace:*", "@masknet/web3-shared-evm": "workspace:*", + "@masknet/web3-providers":"workspace:*", "@msgpack/msgpack": "^2.7.2", "@servie/events": "^3.0.0", "@types/color": "^3.0.3", diff --git a/packages/dashboard/src/locales/en-US.json b/packages/dashboard/src/locales/en-US.json index 8275fa3c151f..b96f971ae427 100644 --- a/packages/dashboard/src/locales/en-US.json +++ b/packages/dashboard/src/locales/en-US.json @@ -219,8 +219,9 @@ "personas_add_persona": "Add Persona", "personas_back_up": "Back Up", "personas_connect_to": "Connect to {{internalName}}", - "personas_disconnect": "Disconnect", - "personas_disconnect_warning": "Are you sure you want to disconnect the {{network}} account of {{userId}}? After disconnection, this account will no longer be able to decrypt and encrypt any information with Mask Network.", + "personas_disconnect": "Delete Persona Verification", + "personas_disconnect_raw": "Disconnect", + "personas_disconnect_warning": "Are you sure you want to delete persona verification? Your mask friends can no longer send decrypted message to you by this persona or check your Web 3 products related with this persona.", "personas_logout_warning": "After logging out, your associated social accounts can no longer decrypt past encrypted messages. If you need to reuse your account, you can use your private key for recovery.", "personas_add": "Add", "personas_upload_avatar": "Upload an avatar", diff --git a/packages/dashboard/src/pages/Personas/components/DisconnectProfileDialog/index.tsx b/packages/dashboard/src/pages/Personas/components/DisconnectProfileDialog/index.tsx index 65bfcd47b6e3..895750ea549a 100644 --- a/packages/dashboard/src/pages/Personas/components/DisconnectProfileDialog/index.tsx +++ b/packages/dashboard/src/pages/Personas/components/DisconnectProfileDialog/index.tsx @@ -2,7 +2,7 @@ import { getMaskColor, makeStyles, MaskColorVar, MaskDialog } from '@masknet/the import { Box, Button, DialogContent, Link, Stack, Typography } from '@mui/material' import { useDashboardI18N } from '../../../../locales' import { SOCIAL_MEDIA_ICON_MAPPING } from '@masknet/shared' -import type { ProfileIdentifier } from '@masknet/shared-base' +import type { PersonaIdentifier, ProfileIdentifier } from '@masknet/shared-base' import { useState } from 'react' import { WarningIcon } from '@masknet/icons' @@ -12,6 +12,10 @@ const useStyles = makeStyles()((theme) => ({ fill: getMaskColor(theme).orangeMain, }, }, + personaTextZone: { + margin: `${theme.spacing(4)} 0`, + fontSize: '13px', + }, })) interface DisconnectProfileDialogProps { @@ -20,6 +24,7 @@ interface DisconnectProfileDialogProps { onClose(): void onDisconnect: (identifier: ProfileIdentifier) => void profileIdentifiers: ProfileIdentifier[] + personaIdentifier: PersonaIdentifier } enum steps { @@ -33,16 +38,15 @@ export const DisconnectProfileDialog = ({ networkIdentifier, profileIdentifiers, onDisconnect, + personaIdentifier, }: DisconnectProfileDialogProps) => { const t = useDashboardI18N() const { classes } = useStyles() - const [currentStep, setCurrentStep] = useState(steps.selection) const [profileIdentifier, setProfileIdentifier] = useState() - return ( - + {currentStep === steps.selection && ( {profileIdentifiers.map((x) => ( @@ -70,7 +74,7 @@ export const DisconnectProfileDialog = ({ setProfileIdentifier(x) setCurrentStep(steps.action) }}> - {t.personas_disconnect()} + {t.personas_disconnect_raw()} @@ -83,11 +87,9 @@ export const DisconnectProfileDialog = ({ - {t.personas_disconnect_warning({ - userId: profileIdentifier?.userId ?? '', - network: networkIdentifier, - })} + {t.personas_disconnect_warning()} +
persona: {personaIdentifier.compressedPoint}