Skip to content

Commit

Permalink
fix: mf-2986 add background gradient for opera wallet (#8269)
Browse files Browse the repository at this point in the history
* fix: adjust file service dialog padding bottom

* fix: mf-2986 add background gradient for opera wallet

fallback to default background if it's missed
  • Loading branch information
UncleBill committed Dec 14, 2022
1 parent 31431da commit b1f0faf
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/mask/src/components/shared/WalletStatusBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
useWeb3Connection,
useBalance,
useChainIdValid,
useNetworkContext,
} from '@masknet/web3-hooks-base'
import { FormattedAddress, useSnackbarCallback, WalletIcon } from '@masknet/shared'
import { ProviderType } from '@masknet/web3-shared-evm'
Expand Down Expand Up @@ -113,7 +112,7 @@ export function WalletStatusBox(props: WalletStatusBox) {
const providerDescriptor = useProviderDescriptor<'all'>()
const theme = useTheme()
const { classes, cx } = useStyles({
contentBackground: providerDescriptor?.backgroundGradient,
contentBackground: providerDescriptor?.backgroundGradient ?? theme.palette.maskColor.publicBg,
disableChange: props.disableChange,
withinRiskWarningDialog: props.withinRiskWarningDialog,
textColor:
Expand All @@ -123,8 +122,7 @@ export function WalletStatusBox(props: WalletStatusBox) {
})

const connection = useWeb3Connection()
const { pluginID } = useNetworkContext()
const { account, chainId, ...rest } = useChainContext()
const { account, chainId } = useChainContext()

const chainIdValid = useChainIdValid()
const wallet = useWallet()
Expand Down
1 change: 0 additions & 1 deletion packages/plugins/FileService/src/SNSAdaptor/MainDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const useStyles = makeStyles()((theme) => ({
},
content: {
padding: 0,
paddingBottom: theme.spacing(2),
overflow: 'auto',
boxSizing: 'border-box',
'&::-webkit-scrollbar': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const useStyles = makeStyles()((theme) => ({
flexDirection: 'column',
overflow: 'auto',
boxSizing: 'border-box',
paddingBottom: theme.spacing(2),
'&::-webkit-scrollbar': {
display: 'none',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const useStyles = makeStyles()((theme) => ({
flexDirection: 'column',
overflow: 'auto',
height: '100%',
paddingBottom: theme.spacing(2),
boxSizing: 'border-box',
},
uploadArea: {
display: 'flex',
Expand Down
2 changes: 2 additions & 0 deletions packages/web3-shared/evm/src/constants/descriptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ export const PROVIDER_DESCRIPTORS: Array<ProviderDescriptor<ChainId, ProviderTyp
homeLink: 'https://www.opera.com/crypto/next',
shortenLink: 'opera.com',
downloadLink: 'https://www.opera.com/crypto/next',
backgroundGradient:
'linear-gradient(90deg, rgba(98, 152, 234, 0.2) 1.03%, rgba(98, 152, 234, 0.2) 1.04%, rgba(98, 126, 234, 0.2) 100%), linear-gradient(0deg, #FFFFFF, #FFFFFF)',
},
{
ID: `${PLUGIN_ID}_clover`,
Expand Down

0 comments on commit b1f0faf

Please sign in to comment.