#
luxiaotao1123
2024-10-12 822d9d9494cc575c1bcdbaa51d68da817236c0b8
#
5个文件已修改
51 ■■■■ 已修改文件
zy-acs-flow/src/map/MapPage.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/player.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/settings/CopyDrawer.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/settings/MapSettings.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/settings/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/MapPage.jsx
@@ -92,6 +92,11 @@
            window.removeEventListener('resize', handleResize);
            Tool.patchRaLayout('');
        };
    }, [])
    useEffect(() => {
        player.setTheme(themeMode);
        Tool.setThemeMode(themeMode);
    }, [themeMode])
    const switchMode = (mode) => {
zy-acs-flow/src/map/player.js
@@ -390,6 +390,10 @@
        this.app.destroy(true, { children: true });
    }
    setTheme = (themeMode) => {
        this.app.renderer.background.color = themeMode === 'dark' ? 0x2f3542 : 0xf1f2f6;
    }
}
const generateApp = (dom, themeMode) => {
zy-acs-flow/src/map/settings/CopyDrawer.jsx
@@ -5,11 +5,12 @@
    Grid,
    Typography,
    TextField,
    Slider,
    Card,
    CardContent,
    Button,
    Select,
    MenuItem,
    InputLabel,
    useTheme,
    FormControl,
    Stack,
    Divider,
@@ -79,6 +80,9 @@
    const { open, onCancel, sprite, value, width = PAGE_DRAWER_WIDTH, handleOnCopy } = props;
    const notify = useNotification();
    const translate = useTranslate();
    const theme = useTheme();
    const themeMode = theme.palette.mode;
    const deviceType = sprite?.data?.type;
    const incrementOptions = incrementOptionsMap[deviceType]
@@ -137,6 +141,20 @@
                        </Stack>
                        <Box p={3}>
                            <Card sx={{
                                p: 2,
                                transition: '0.3s',
                                boxShadow: themeMode === 'light'
                                    ? '0px 2px 8px rgba(0, 0, 0, 0.1)'
                                    : '0px 2px 2px rgba(255, 255, 255, 0.1)',
                                '&:hover': {
                                    boxShadow: themeMode === 'light'
                                        ? '0px 4px 16px rgba(0, 0, 0, 0.2)'
                                        : '0px 4px 8px rgba(255, 255, 255, 0.2)',
                                },
                                borderRadius: '8px',
                            }}>
                                <CardContent>
                            <Box component="form" onSubmit={handleSubmit(onFormSubmit)} noValidate sx={{ mt: 0 }}>
                                <Grid container spacing={1.4}>
                                    <Grid item xs={6}>
@@ -304,6 +322,8 @@
                                </Grid>
                            </Box>
                                </CardContent>
                            </Card>
                        </Box>
                    </Box>
                )}
zy-acs-flow/src/map/settings/MapSettings.jsx
@@ -27,10 +27,10 @@
    const { control, handleSubmit, reset, watch } = useForm({
        defaultValues: {
            x: sprite?.position.x || 0,
            y: sprite?.position.y || 0,
            scaleX: sprite?.scale.x || 1,
            scaleY: sprite?.scale.y || 1,
            x: sprite?.position?.x || 0,
            y: sprite?.position?.y || 0,
            scaleX: sprite?.scale?.x || 1,
            scaleY: sprite?.scale?.y || 1,
            rotation: (sprite?.rotation * 180) / Math.PI || 0,
            copyDirection: 'right',
            copyCount: 1,
zy-acs-flow/src/map/settings/index.jsx
@@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from 'react';
import { useTranslate } from "react-admin";
import { Drawer, Box, Typography, Tabs, Tab, IconButton, Stack, useTheme, Card, CardContent, CardHeader, Divider } from '@mui/material';
import { Drawer, Box, Typography, Tabs, Tab, IconButton, Stack, useTheme, Card, CardContent, Divider } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import { PAGE_DRAWER_WIDTH } from '@/config/setting';
import MapSettings from './MapSettings';
@@ -53,9 +53,13 @@
                        <Box p={3}>
                            <Card sx={{
                                transition: '0.3s',
                                boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.1)',
                                boxShadow: themeMode === 'light'
                                    ? '0px 2px 8px rgba(0, 0, 0, 0.1)'
                                    : '0px 2px 2px rgba(255, 255, 255, 0.1)',
                                '&:hover': {
                                    boxShadow: '0px 4px 16px rgba(0, 0, 0, 0.2)',
                                    boxShadow: themeMode === 'light'
                                        ? '0px 4px 16px rgba(0, 0, 0, 0.2)'
                                        : '0px 4px 8px rgba(255, 255, 255, 0.2)',
                                },
                                borderRadius: '8px',
                            }}>