From 7e02a7e5262adb678b8c747b4f041c14f4a11adc Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Fri, 19 Jul 2024 21:26:49 +0900 Subject: [PATCH] Remove in some files the withStyles --- engine/front-end/src/Footer.js | 47 +++++++++-------- engine/front-end/src/Pages/Statistics.js | 64 +++++++++++------------- 2 files changed, 53 insertions(+), 58 deletions(-) diff --git a/engine/front-end/src/Footer.js b/engine/front-end/src/Footer.js index 419d650d1..f4e69615f 100644 --- a/engine/front-end/src/Footer.js +++ b/engine/front-end/src/Footer.js @@ -1,6 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from '@mui/styles'; import { FaGithubSquare as IconGithub, @@ -12,13 +11,14 @@ import LogoIoBroker from './assets/iobroker-logo-small.png'; import Utils from './Utils'; import I18n from './i18n'; +import {Box} from "@mui/material"; -const styles = theme => ({ - footer: { +const styles = { + footer: theme => ({ background: theme.palette.primary.light, textAlign: 'center', - padding: 20, - }, + p: '20px', + }), footerIconDiv: { width: 54, height: 54, @@ -51,46 +51,45 @@ const styles = theme => ({ color: '#b1b1b1', paddingRight: 10, }, -}); +}; class Loader extends React.Component { render() { - return
-
+ return +
Utils.openLink('https://github.com/ioBroker')} />
-
+
Utils.openLink('https://github.com/iobroker-community-adapters')} /> -
Community
+
Community
-
+
Utils.openLink('https://www.facebook.com/groups/440499112958264')} />
-
+
Utils.openLink('https://discord.gg/HwUCwsH')} />

-
this.props.onNavigate(null, 'imprint')}>{I18n.t('Imprint')}
-
|
-
this.props.onNavigate(null, 'privacy')}>{I18n.t('Privacy policy')}
+
this.props.onNavigate(null, 'imprint')}>{I18n.t('Imprint')}
+
|
+
this.props.onNavigate(null, 'privacy')}>{I18n.t('Privacy policy')}
-

Copyright © 2014-2024 by the ioBroker Community and the ioBroker GmbH.

- logo -
; +

Copyright © 2014-2024 by the ioBroker Community and the ioBroker GmbH.

+ logo + ; } } @@ -98,4 +97,4 @@ Loader.propTypes = { onNavigate: PropTypes.func, }; -export default withStyles(styles)(Loader); +export default Loader; diff --git a/engine/front-end/src/Pages/Statistics.js b/engine/front-end/src/Pages/Statistics.js index dbb50f9a6..38b270dce 100644 --- a/engine/front-end/src/Pages/Statistics.js +++ b/engine/front-end/src/Pages/Statistics.js @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import { withStyles } from '@mui/styles'; import PropTypes from 'prop-types'; import { @@ -24,8 +23,6 @@ import { import { MdFullscreen as IconZoom } from 'react-icons/md'; -import { Utils as ARUtils } from '@iobroker/adapter-react-v5'; - import I18n from '../i18n'; import Utils from '../Utils'; import PieStats from '../Components/PieStats'; @@ -33,8 +30,7 @@ import Footer from '../Footer'; echarts.use([LineChart, TooltipComponent, LegendComponent, GridComponent, SVGRenderer]); -const styles = theme => ({ - content: theme.content, +const styles = { iframe: { border: 0, overflow: 'hidden', @@ -127,7 +123,7 @@ const styles = theme => ({ tableColumnPercent: { }, -}); +}; const MAX_MOBILE_WIDTH = 1000; class Statistics extends Component { constructor(props) { @@ -156,15 +152,15 @@ class Statistics extends Component { } renderMap() { - return + return Utils.openLink('data/map.html')} > -