Skip to content

Commit

Permalink
Update staging and preview build banner text
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed May 11, 2023
1 parent a53a8ef commit c891f0f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
42 changes: 25 additions & 17 deletions src/app/components/BuildBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ import { Box } from 'grommet/es6/components/Box'
import { AlertBox } from 'app/components/AlertBox'
import { buildBannerZIndex } from '../../../styles/theme/elementSizes'
import { AnchorLink } from '../AnchorLink'
import styled from 'styled-components'

const StickyBanner = styled(Box)`
position: sticky;
top: 0;
z-index: ${buildBannerZIndex};
`

export const BuildBanner = () => {
const { t } = useTranslation()

if (window.location.host === 'wallet.oasis.io') {
return (
<Box
style={{
position: 'sticky',
top: 0,
zIndex: buildBannerZIndex,
}}
>
<StickyBanner>
<AlertBox status="ok" center icon={<Info size="20px" color="currentColor" />}>
<Trans
i18nKey="banner.domainMoved"
Expand All @@ -30,24 +31,31 @@ export const BuildBanner = () => {
defaults="Oasis Wallet has a new home at <NewLink />."
/>
</AlertBox>
</Box>
</StickyBanner>
)
}

if (window.location.host === 'wallet.stg.oasis.io') {
return (
<StickyBanner>
<AlertBox status="warning" center icon={<Alert size="20px" color="currentColor" />}>
{t(
'banner.buildStaging',
'Please note this is the staging deployment of Oasis Wallet. ONLY USE IT FOR TESTING.',
)}
</AlertBox>
</StickyBanner>
)
}

return (
<Box
style={{
position: 'sticky',
top: 0,
zIndex: buildBannerZIndex,
}}
>
<StickyBanner>
<AlertBox status="warning" center icon={<Alert size="20px" color="currentColor" />}>
{t(
'banner.buildPreview',
'Please note this is an experimental build of Oasis Wallet and that data that is shown might be incorrect.',
'Please note this is an experimental build of Oasis Wallet and your secrets are not safe. ONLY USE IT FOR TESTING.',
)}
</AlertBox>
</Box>
</StickyBanner>
)
}
3 changes: 2 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
"oasisscan": "Oasis Scan API"
},
"banner": {
"buildPreview": "Please note this is an experimental build of Oasis Wallet and that data that is shown might be incorrect.",
"buildPreview": "Please note this is an experimental build of Oasis Wallet and your secrets are not safe. ONLY USE IT FOR TESTING.",
"buildStaging": "Please note this is the staging deployment of Oasis Wallet. ONLY USE IT FOR TESTING.",
"domainMoved": "Oasis Wallet has a new home at <NewLink />."
},
"common": {
Expand Down

0 comments on commit c891f0f

Please sign in to comment.