fix: update some styles

index
guofei 2024-10-17 13:58:36 +08:00
parent a6196e8f7d
commit 1418128b0d
5 changed files with 79 additions and 54 deletions

View File

@ -39,3 +39,7 @@
.qrCode img { .qrCode img {
} }
#deviceFrame {
border-radius: 10px;
}

View File

@ -3,7 +3,7 @@ import androidHPng from "../../images/android-h.png";
import androidVPng from "../../images/android-v.png"; import androidVPng from "../../images/android-v.png";
import iphoneHPng from "../../images/iphone-h.png"; import iphoneHPng from "../../images/iphone-h.png";
import iphoneVPng from "../../images/iphone-v.png"; import iphoneVPng from "../../images/iphone-v.png";
import ipadHPng from "../../images/iPad-h.png"; import ipadHPng from "../../images/ipad-horizontal.png";
import ipadVPng from "../../images/iPad-v.png"; import ipadVPng from "../../images/iPad-v.png";
import copyPng from "../../images/copy.png"; import copyPng from "../../images/copy.png";
import refreshButtonPng from "../../images/refresh-button.png"; import refreshButtonPng from "../../images/refresh-button.png";
@ -31,25 +31,44 @@ var configMap = {
"iphone-h": { "iphone-h": {
bkg: iphoneVPng, bkg: iphoneVPng,
rotate: true, rotate: true,
width: "692px", width: "690px",
height: "322px", height: "325px",
styles: {
borderRadius: '13px'
}
}, },
"iphone-v": { "iphone-v": {
bkg: iphoneVPng, bkg: iphoneVPng,
width: "322px", width: "322px",
height: "693px", height: "693px",
styles: {
borderRadius: '13px'
}
}, },
"ipad-h": { "ipad-h": {
bkg: ipadHPng, bkg: ipadHPng,
width: "433px", rotate: true,
width: "458px",
height: "326px", height: "326px",
offsetv: "5px", offsetv: "5px",
imgStyle: {
transform: 'rotate(-90deg) scale(1.4)',
},
styles: {
transform: "translate(-50%, -50%) scale(1.42)",
}
}, },
"ipad-v": { "ipad-v": {
bkg: ipadVPng, bkg: ipadHPng,
width: "324px", width: "326px",
height: "433px", height: "458px",
offsetv: "5px", offsetv: "5px",
imgStyle: {
transform: 'scale(1.4)',
},
styles: {
transform: "translate(-50%, -50%) scale(1.42)",
}
}, },
}; };
@ -101,7 +120,7 @@ function DeviceFrame(props) {
</Alert> </Alert>
</Snackbar> </Snackbar>
<div> <div>
<img src={config.bkg} alt="background" style={{ position: "relative", zIndex: 100, transform: config.rotate ? "rotate(-90deg)" : "", pointerEvents: 'none' }} /> <img src={config.bkg} alt="background" style={{ position: "relative", zIndex: 100, transform: config.rotate ? "rotate(-90deg)" : "", pointerEvents: 'none', ...config.imgStyle }} />
{props.htmlUrl && ( {props.htmlUrl && (
<iframe <iframe
id="deviceFrame" id="deviceFrame"
@ -109,8 +128,9 @@ function DeviceFrame(props) {
position: "absolute", position: "absolute",
top: "50%", top: "50%",
left: "50%", left: "50%",
transform: "translate(-50%, -50%)", transform: "translate(-50%, -50%) scale(1.007)",
paddingBottom: config.offsetv, paddingBottom: config.offsetv,
...config.styles
}} }}
allow="clipboard-read; clipboard-write *" allow="clipboard-read; clipboard-write *"
title="preview" title="preview"

View File

@ -1,58 +1,58 @@
.Pane { .Pane {
width: 370px; width: 370px;
background-color: #535353; background-color: #535353;
min-height: 100vh; min-height: 100vh;
padding: 24px; padding: 24px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
} }
.modeSelect { .modeSelect {
width: 100%; width: 100%;
border: none; border: none;
} }
.deviceIcon { .deviceIcon {
width: auto; width: auto;
height: 76px; height: 76px;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 7px;
} }
.deviceText { .deviceText {
} }
.deviceContent { .deviceContent {
height: 100%; height: 100%;
color: #EEEEEE; color: #eeeeee;
} }
.deviceButtons { .deviceButtons {
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.deviceButtons img { .deviceButtons img {
cursor: pointer; cursor: pointer;
} }
.selectPager { .selectPager {
left: 0 !important; left: 25px !important;
width: 350px; width: 319px !important;
} }
.bottomLogo { .bottomLogo {
position: absolute; position: absolute;
width: 322px; width: 322px;
bottom: 24px; bottom: 24px;
text-align: center; text-align: center;
img { img {
width: 280px; width: 280px;
} }
} }
.Mui-focused .MuiOutlinedInput-notchedOutline { .Mui-focused .MuiOutlinedInput-notchedOutline {
border: none; border: none;
} }

View File

@ -19,11 +19,11 @@ import { useTranslation } from "react-i18next";
import SvgIcon from '@mui/material/SvgIcon'; import SvgIcon from '@mui/material/SvgIcon';
function CustomIcon(props) { function CustomIcon(props) {
return ( return (
<SvgIcon viewBox="0 0 24 24" {...props}> <SvgIcon viewBox="0 0 24 24" {...props}>
<path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z" fill="white" /> <path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z" fill="white" />
</SvgIcon> </SvgIcon>
); );
} }
var deviceConfigs = [ var deviceConfigs = [
@ -123,10 +123,11 @@ function Pane(props) {
) )
)} )}
</div> </div>
<List <List
sx={{ sx={{
paddingTop: '20px' paddingTop: '20px'
}} }}
> >
{deviceConfigs.map((_device) => ( {deviceConfigs.map((_device) => (
<ListItem <ListItem
@ -144,9 +145,9 @@ function Pane(props) {
marginBottom: '14px' marginBottom: '14px'
}}> }}>
<div style={{ display: "flex", flexDirection: 'column', justifyContent: 'center', alignItems: "center", width: '98px'}}> <div style={{ display: "flex", flexDirection: 'column', justifyContent: 'center', alignItems: "center", width: '98px' }}>
<img className="deviceIcon" style={{ height: _device.name === 'iPad' ? '54px' : '76px'}} src={_device.icon} alt={_device.name} /> <img className="deviceIcon" style={{ height: _device.name === 'iPad' ? '54px' : '76px' }} src={_device.icon} alt={_device.name} />
<img className="deviceText" src={_device.text} alt={_device.name} /> <img className="deviceText" src={_device.text} alt={_device.name} />
</div> </div>
<div className="deviceContent"> <div className="deviceContent">
<div className="deviceButtons"> <div className="deviceButtons">
@ -164,7 +165,7 @@ function Pane(props) {
))} ))}
</List> </List>
{!props.hideLogo && <div className="bottomLogo"><img src={logoPanePng} alt="logo" width={"100%"} /></div> } {!props.hideLogo && <div className="bottomLogo"><img src={logoPanePng} alt="logo" width={"100%"} /></div>}
</div> </div>
); );
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB