feat: 首页ui改版
37
src/App.css
|
@ -48,20 +48,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.pane-btn {
|
.pane-btn {
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
border: 0;
|
border: 3px solid #494949;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 30px;
|
height: 62px;
|
||||||
line-height: 30px;
|
line-height: 62px;
|
||||||
width: 150px;
|
width: 62px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
background: #494949;
|
||||||
|
color: #eee;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pane-btn.checked {
|
.pane-btn.checked {
|
||||||
background-color: #02b564;
|
border: 3px solid #00DE7A;
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pane-btn + .pane-btn {
|
.pane-btn + .pane-btn {
|
||||||
|
@ -85,17 +87,16 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 40px;
|
right: 24px;
|
||||||
top: 30px;
|
top: 24px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.language-select-container .language-select {
|
.language-select-container .language-select {
|
||||||
margin-left: 10px;
|
width: 156px;
|
||||||
width: 135px;
|
height: 42px;
|
||||||
height: 35px;
|
background-color: #36383A;
|
||||||
background-color: #eef1f6;
|
color: #EEEEEE;
|
||||||
color: #333333;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -103,12 +104,16 @@
|
||||||
|
|
||||||
.language-select-warpper {
|
.language-select-warpper {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #36383A;
|
||||||
|
border: 1px solid #5B5B5B;
|
||||||
|
box-shadow: 0px 3px 0px 0px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.language-select-warpper .language-icon {
|
.language-select-warpper .language-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 18px;
|
left: 14px;
|
||||||
top: 8px;
|
top: 11px;
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ import queryString from "query-string";
|
||||||
import { withTranslation } from "react-i18next";
|
import { withTranslation } from "react-i18next";
|
||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
import languageImg from "./images/language.png";
|
import languageImg from "./images/language.png";
|
||||||
|
import Arrow from './images/arrow.svg'
|
||||||
|
|
||||||
|
|
||||||
class App extends React.Component {
|
class App extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
|
@ -1,33 +1,42 @@
|
||||||
.deviceFrameContainer {
|
.deviceFrameContainer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100vh;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background: #36383A;
|
||||||
}
|
}
|
||||||
|
|
||||||
.refreshButton {
|
.refreshButton {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 30px;
|
right: 24px;
|
||||||
bottom: 30px;
|
bottom: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrCode {
|
.qrCode {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 40px;
|
right: 24px;
|
||||||
top: 100px;
|
top: 82px;
|
||||||
|
background: #DBDBDB;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-top: 14px;
|
||||||
|
padding-left: 14px;
|
||||||
|
padding-right: 14px;
|
||||||
|
padding-bottom: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrCode p {
|
.qrCode p {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 23px;
|
padding-left: 22px;
|
||||||
|
color: #666666;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrCode img {
|
.qrCode img {
|
||||||
margin-left: 6px;
|
margin-left: 8px;
|
||||||
}
|
}
|
|
@ -75,13 +75,14 @@ function DeviceFrame(props) {
|
||||||
<img src={refreshButtonPng} alt="refresh" onClick={() => refresh()} className="refreshButton" />
|
<img src={refreshButtonPng} alt="refresh" onClick={() => refresh()} className="refreshButton" />
|
||||||
{props.qrDataUrl && (
|
{props.qrDataUrl && (
|
||||||
<div className="qrCode">
|
<div className="qrCode">
|
||||||
<p style={{ margin: "0" }}>
|
<img src={props.qrDataUrl} alt="qr code" />
|
||||||
|
<p style={{ margin: "0", }}>
|
||||||
{t("scan")}
|
{t("scan")}
|
||||||
<CopyToClipboard text={absoluteUrl} onCopy={() => setOpenPopup(true)}>
|
<CopyToClipboard text={absoluteUrl} onCopy={() => setOpenPopup(true)}>
|
||||||
<img style={{ cursor: "pointer", width: "20px", height: "20px" }} src={copyPng} alt="复制链接" />
|
<img style={{ cursor: "pointer", width: "20px", height: "20px" }} src={copyPng} alt="复制链接" />
|
||||||
</CopyToClipboard>
|
</CopyToClipboard>
|
||||||
</p>
|
</p>
|
||||||
<img src={props.qrDataUrl} alt="qr code" />
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Snackbar
|
<Snackbar
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
.Pane {
|
.Pane {
|
||||||
width: 350px;
|
width: 370px;
|
||||||
background-color: rgb(52, 90, 176);
|
background-color: #535353;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
padding: 24px;
|
||||||
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modeSelect {
|
.modeSelect {
|
||||||
|
@ -13,18 +16,20 @@
|
||||||
|
|
||||||
.deviceIcon {
|
.deviceIcon {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 80px;
|
height: 76px;
|
||||||
margin-right: 10px;
|
margin-bottom: 10px;
|
||||||
margin-bottom: -24px;
|
}
|
||||||
|
.deviceText {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.deviceContent {
|
.deviceContent {
|
||||||
text-align: left;
|
height: 100%;
|
||||||
color: white;
|
color: #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deviceButtons {
|
.deviceButtons {
|
||||||
width: 160px;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
@ -39,5 +44,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottomLogo {
|
.bottomLogo {
|
||||||
margin-top: auto;
|
position: absolute;
|
||||||
}
|
width: 280px;
|
||||||
|
bottom: 24px;
|
||||||
|
left: 68px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.MuiSelect-select.MuiSelect-select::after {
|
||||||
|
content: '';
|
||||||
|
background-image: url('../../images/arrow.png'); /* 使用你的自定义图标 */
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
color: green; /* 改变箭头颜色 */
|
||||||
|
}
|
|
@ -4,8 +4,11 @@ import MenuItem from "@mui/material/MenuItem";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { CircularProgress, List, ListItem } from "@mui/material";
|
import { CircularProgress, List, ListItem } from "@mui/material";
|
||||||
import ipadPng from "../../images/ipad.png";
|
import ipadPng from "../../images/ipad.png";
|
||||||
|
import ipadTextPng from "../../images/ipad-text.png";
|
||||||
import iphonePng from "../../images/iphone.png";
|
import iphonePng from "../../images/iphone.png";
|
||||||
|
import iphoneTextPng from '../../images/iphone-text.png'
|
||||||
import androidPng from "../../images/android.png";
|
import androidPng from "../../images/android.png";
|
||||||
|
import androidTextPng from '../../images/android-text.png'
|
||||||
import logoPanePng from "../../images/logo-pane.png";
|
import logoPanePng from "../../images/logo-pane.png";
|
||||||
import horizentalChecked from "../../images/horizental-button-checked.png";
|
import horizentalChecked from "../../images/horizental-button-checked.png";
|
||||||
import horizentalButton from "../../images/horizental-button.png";
|
import horizentalButton from "../../images/horizental-button.png";
|
||||||
|
@ -18,18 +21,21 @@ var deviceConfigs = [
|
||||||
{
|
{
|
||||||
name: "iPhone",
|
name: "iPhone",
|
||||||
icon: iphonePng,
|
icon: iphonePng,
|
||||||
|
text: iphoneTextPng,
|
||||||
vertical: "iphone-v",
|
vertical: "iphone-v",
|
||||||
horizental: "iphone-h",
|
horizental: "iphone-h",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Android Phone",
|
name: "Android Phone",
|
||||||
icon: androidPng,
|
icon: androidPng,
|
||||||
|
text: androidTextPng,
|
||||||
vertical: "android-v",
|
vertical: "android-v",
|
||||||
horizental: "android-h",
|
horizental: "android-h",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "iPad",
|
name: "iPad",
|
||||||
icon: ipadPng,
|
icon: ipadPng,
|
||||||
|
text: ipadTextPng,
|
||||||
vertical: "ipad-v",
|
vertical: "ipad-v",
|
||||||
horizental: "ipad-h",
|
horizental: "ipad-h",
|
||||||
},
|
},
|
||||||
|
@ -68,13 +74,23 @@ function Pane(props) {
|
||||||
id="mode-select"
|
id="mode-select"
|
||||||
value={mode}
|
value={mode}
|
||||||
onChange={(e) => modeChange(e)}
|
onChange={(e) => modeChange(e)}
|
||||||
startAdornment={<img src={modeSelectPng} height={"30px"} alt="selected" />}
|
|
||||||
sx={{
|
sx={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
border: "none",
|
height: '42px',
|
||||||
background: "rgb(69, 115, 191)",
|
border: "1px solid #757575",
|
||||||
|
background: "#535353",
|
||||||
|
borderRadius: '5px',
|
||||||
color: "white",
|
color: "white",
|
||||||
fontWeight: "bold",
|
boxShadow: '0px 3px 0px 0px rgba(0, 0, 0, 0.3)',
|
||||||
|
// '&.MuiOutlinedInput-notchedOutline': {
|
||||||
|
// borderColor: '#757575', // 设置焦点时的边框颜色为红色
|
||||||
|
// },
|
||||||
|
'&.Mui-focused': {
|
||||||
|
borderColor: '#757575',
|
||||||
|
'&.MuiOutlinedInput-notchedOutline': {
|
||||||
|
borderColor: '#757575',
|
||||||
|
},
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
MenuProps={{
|
MenuProps={{
|
||||||
classes: {
|
classes: {
|
||||||
|
@ -84,19 +100,34 @@ function Pane(props) {
|
||||||
<MenuItem value={"normal"}>Normal Preview</MenuItem>
|
<MenuItem value={"normal"}>Normal Preview</MenuItem>
|
||||||
<MenuItem value={"dynamic"}>Dynamic Preview</MenuItem>
|
<MenuItem value={"dynamic"}>Dynamic Preview</MenuItem>
|
||||||
</Select>
|
</Select>
|
||||||
<List>
|
<List
|
||||||
|
sx={{
|
||||||
|
paddingTop: '20px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
{deviceConfigs.map((_device) => (
|
{deviceConfigs.map((_device) => (
|
||||||
<ListItem
|
<ListItem
|
||||||
key={_device.name}
|
key={_device.name}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
borderRadius: '5px',
|
||||||
|
background: '#535353',
|
||||||
|
border: '1px solid #757575',
|
||||||
|
boxShadow: '0px 3px 0px 0px rgba(0, 0, 0, 0.3)',
|
||||||
|
paddingLeft: '52px',
|
||||||
|
paddingTop: '16px',
|
||||||
|
paddingBottom: '8px',
|
||||||
|
paddingRight: '20px',
|
||||||
|
marginBottom: '14px'
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
<div style={{ width: "120px", alignItems: "center" }}>
|
<div style={{ display: "flex", flexDirection: 'column', justifyContent: 'center', alignItems: "center", width: '98px' }}>
|
||||||
<img className="deviceIcon" 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} />
|
||||||
</div>
|
</div>
|
||||||
<div className="deviceContent">
|
<div className="deviceContent">
|
||||||
<p style={{ margin: "14px 0" }}>{_device.name}</p>
|
|
||||||
<div className="deviceButtons">
|
<div className="deviceButtons">
|
||||||
<button className={`pane-btn ${device === _device.horizental ? "checked" : ""}`} onClick={() => deviceChange(_device.horizental)}>
|
<button className={`pane-btn ${device === _device.horizental ? "checked" : ""}`} onClick={() => deviceChange(_device.horizental)}>
|
||||||
{t("horizontal")}
|
{t("horizontal")}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
var BaseUrl = "https://api.soyootech.com/";
|
// var BaseUrl = "https://api.soyootech.com/";
|
||||||
|
var BaseUrl = "api/";
|
||||||
export async function UserLogin(loginForm) {
|
export async function UserLogin(loginForm) {
|
||||||
try {
|
try {
|
||||||
var response = await fetch(BaseUrl + "SoyooUser/previewlogin", {
|
var response = await fetch(BaseUrl + "SoyooUser/previewlogin", {
|
||||||
|
|
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 912 B |
After Width: | Height: | Size: 201 B |
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="13.435028612613678" height="13.435028612613678" viewBox="0 0 13.435028612613678 13.435028612613678"><g transform="matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-4.335786265016024,2.9675144346638707)"><path d="M0.41421353816986084,15.217514306306839L8.91421353816986,15.217514306306839L8.91421353816986,13.217514306306839L2.414213538169861,13.217514306306839L2.414213538169861,6.717514306306839L0.41421353816986084,6.717514306306839L0.41421353816986084,15.217514306306839Z" fill-rule="evenodd" fill="#D8D8D8" fill-opacity="1"/></g></svg>
|
After Width: | Height: | Size: 690 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 671 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 474 B |
After Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 821 B |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -1,12 +1,12 @@
|
||||||
const { createProxyMiddleware } = require("http-proxy-middleware");
|
const { createProxyMiddleware } = require("http-proxy-middleware");
|
||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
// app.use(
|
app.use(
|
||||||
// "/api",
|
"/api",
|
||||||
// createProxyMiddleware({
|
createProxyMiddleware({
|
||||||
// target: "https://api.soyootech.com/",
|
target: "https://api.soyootech.com/",
|
||||||
// changeOrigin: true,
|
changeOrigin: true,
|
||||||
// pathRewrite: { "^/api": "" },
|
pathRewrite: { "^/api": "" },
|
||||||
// })
|
})
|
||||||
// );
|
);
|
||||||
};
|
};
|
||||||
|
|