Skip to content

Commit c6025d1

Browse files
authored
Merge pull request #1935 from oasisprotocol/mz/roflSecretTooltip
Add tooltip to ROFL app secrets row
2 parents 5731de2 + a563d8c commit c6025d1

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.changelog/1935.trivial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add tooltip to ROFL app secrets row

src/app/pages/RoflAppDetailsPage/index.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { FC, ReactNode } from 'react'
22
import { useHref, useParams } from 'react-router-dom'
33
import { useTranslation } from 'react-i18next'
4+
import Box from '@mui/material/Box'
45
import Grid from '@mui/material/Grid'
56
import Skeleton from '@mui/material/Skeleton'
7+
import Tooltip from '@mui/material/Tooltip'
68
import Typography from '@mui/material/Typography'
9+
import InfoIcon from '@mui/icons-material/Info'
710
import { styled } from '@mui/material/styles'
811
import {
912
Layer,
@@ -16,6 +19,7 @@ import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'
1619
import { AppErrors } from '../../../types/errors'
1720
import { useRequiredScopeParam } from '../../hooks/useScopeParam'
1821
import { useTypedSearchParam } from '../../hooks/useTypedSearchParam'
22+
import { COLORS } from '../../../styles/theme/colors'
1923
import { useScreenSize } from '../../hooks/useScreensize'
2024
import { PageLayout } from '../../components/PageLayout'
2125
import { SubPageCard } from '../../components/SubPageCard'
@@ -145,7 +149,16 @@ export const RoflAppDetailsView: FC<{
145149
<DetailsRow title={t('rofl.endorsement')}>
146150
<Endorsement policy={app.policy} />
147151
</DetailsRow>
148-
<DetailsRow title={t('rofl.secrets')}>
152+
<DetailsRow
153+
title={
154+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
155+
{t('rofl.secrets')}
156+
<Tooltip title={t('rofl.secretsTooltip')} placement="top">
157+
<InfoIcon htmlColor={COLORS.brandDark} fontSize="small" />
158+
</Tooltip>
159+
</Box>
160+
}
161+
>
149162
<Secrets secrets={app.secrets} />
150163
</DetailsRow>
151164
</StyledDescriptionList>
@@ -319,7 +332,7 @@ const LastActivityRow: FC<{
319332

320333
const DetailsRow: FC<{
321334
children: ReactNode
322-
title: string
335+
title: ReactNode
323336
}> = ({ children, title }) => {
324337
return (
325338
<>

src/locales/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@
719719
"stakedAmount": "Staked amount",
720720
"endorsement": "Endorsement",
721721
"secrets": "Secrets",
722+
"secretsTooltip": "These secrets are end-to-end encrypted and can only be read by the ROFL app.",
722723
"updates": "Updates",
723724
"secretLength": "[{{value}} bytes]",
724725
"expired": "Expired",

0 commit comments

Comments
 (0)