Skip to content

Commit

Permalink
refactor: remove patch of react qrcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed May 28, 2024
1 parent c7b5820 commit 65c4335
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 90 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@
"@lifi/[email protected]": "patches/@[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
"[email protected]": "patches/[email protected]"
}
}
}
2 changes: 1 addition & 1 deletion packages/mask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"react-highlight-words": "^0.20.0",
"react-hook-form": "7.45.2",
"react-idle-timer": "^5.7.2",
"react-qrcode-logo": "^2.10.0",
"react-qrcode-logo": "^3.0.0",
"react-router-dom": "^6.23.1",
"react-to-print": "^2.14.13",
"react-use": "^17.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"qrcode": "^1.5.3",
"react-hook-form": "^7.45.2",
"react-markdown": "^9.0.1",
"react-qrcode-logo": "^2.10.0",
"react-qrcode-logo": "^3.0.0",
"react-router-dom": "^6.23.1",
"react-use": "^17.4.0",
"rehype-external-links": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,67 @@ import { makeStyles } from '@masknet/theme'
import { QRCode } from 'react-qrcode-logo'
import { InjectedDialog, useSharedTrans } from '@masknet/shared'

const useStyles = makeStyles()((theme) => {
const isDark = theme.palette.mode === 'dark'
return {
dialog: {
[`.${dialogClasses.paper}`]: {
height: 563,
width: 600,
},
const useStyles = makeStyles()((theme) => ({
dialog: {
[`.${dialogClasses.paper}`]: {
height: 563,
width: 600,
},
container: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
},
container: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
},
halo: {
position: 'relative',
zIndex: 2,
overflow: 'hidden',
width: '100%',
'&:before': {
position: 'absolute',
left: 30,
top: 10,
zIndex: 1,
content: '""',
height: 256,
width: 256,
backgroundImage: 'radial-gradient(50% 50.00% at 50% 50.00%, #FFE9E9 0%, rgba(255, 233, 233, 0.00) 100%)',
},
halo: {
position: 'relative',
zIndex: 2,
overflow: 'hidden',
width: '100%',
'&:before': {
position: 'absolute',
left: 30,
top: 10,
zIndex: 1,
content: '""',
height: 256,
width: 256,
backgroundImage:
'radial-gradient(50% 50.00% at 50% 50.00%, #FFE9E9 0%, rgba(255, 233, 233, 0.00) 100%)',
},
'&:after': {
position: 'absolute',
right: 30,
top: 20,
zIndex: 1,
content: '""',
height: 256,
width: 256,
backgroundImage: 'radial-gradient(50% 50% at 50% 50%, #F0E9FF 0%, rgba(240, 233, 255, 0.00) 100%)',
},
'&:after': {
position: 'absolute',
right: 30,
top: 20,
zIndex: 1,
content: '""',
height: 256,
width: 256,
backgroundImage: 'radial-gradient(50% 50% at 50% 50%, #F0E9FF 0%, rgba(240, 233, 255, 0.00) 100%)',
},
grid: {
width: 393,
margin: theme.spacing(0, 'auto'),
padding: theme.spacing(2),
boxSizing: 'border-box',
backgroundColor: theme.palette.maskColor.bottom,
position: 'relative',
zIndex: 10,
},
qrcode: {
width: 361,
height: 361,
boxShadow: theme.palette.maskColor.bottomBg,
borderRadius: theme.spacing(2),
overflow: 'hidden',
},
tip: {
fontSize: 12,
marginTop: '10px',
textAlign: 'center',
},
}
})
},
grid: {
width: 393,
margin: theme.spacing(0, 'auto'),
padding: theme.spacing(2),
boxSizing: 'border-box',
backgroundColor: theme.palette.maskColor.bottom,
position: 'relative',
zIndex: 10,
},
qrcode: {
width: 361,
height: 361,
boxShadow: theme.palette.maskColor.bottomBg,
borderRadius: theme.spacing(2),
overflow: 'hidden',
},
tip: {
fontSize: 12,
marginTop: '10px',
textAlign: 'center',
},
}))
interface QRCodeDialogProps {
uri: string
open: boolean
Expand Down
1 change: 0 additions & 1 deletion patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
- react-devtools-inline: <https://github.com/facebook/react/pull/27733> and <https://github.com/facebook/react/pull/29199>
- @lifi/widget@2.10.1: Customized requirements, details can be viewed at the fork repository <https://github.com/DimensionDev/lifi-widget>
- react-use: <https://github.com/streamich/react-use/issues/1923>
- react-qrcode-logo: <https://github.com/gcoro/react-qrcode-logo/issues/55>

## CSP

Expand Down
13 changes: 0 additions & 13 deletions patches/[email protected]

This file was deleted.

17 changes: 7 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 65c4335

Please sign in to comment.