Skip to content

Commit

Permalink
Update OpenLayers Map
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Sep 8, 2023
1 parent a13487a commit e8b14d1
Show file tree
Hide file tree
Showing 14 changed files with 189 additions and 131 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@iobroker/socket-classes": "1.3.3",
"@iobroker/webserver": "^0.3.6",
"@iobroker/ws-server": "^2.1.1",
"archiver": "^6.0.0",
"archiver": "^6.0.1",
"axios": "^1.5.0",
"body-parser": "^1.20.2",
"compression": "^1.7.4",
Expand All @@ -40,7 +40,7 @@
"passport": "^0.6.0",
"passport-local": "^1.0.0",
"semver": "^7.5.4",
"ws": "^8.13.0"
"ws": "^8.14.0"
},
"devDependencies": {
"@alcalzone/release-script": "^3.6.0",
Expand All @@ -49,11 +49,11 @@
"@iobroker/legacy-testing": "^0.3.7",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node16": "^16.1.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"chai": "^4.3.8",
"colorette": "^2.0.20",
"eslint": "^8.47.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^5.0.0",
Expand All @@ -64,9 +64,9 @@
"gulp-replace": "^1.1.4",
"gulp-sourcemaps": "^3.0.0",
"mocha": "^10.2.0",
"prettier": "^3.0.2",
"puppeteer": "^21.1.0",
"typescript": "^5.1.6"
"prettier": "^3.0.3",
"puppeteer": "^21.1.1",
"typescript": "^5.2.2"
},
"bugs": {
"url": "https://github.com/ioBroker/ioBroker.admin/issues"
Expand Down
32 changes: 16 additions & 16 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.22.10",
"@babel/plugin-proposal-decorators": "^7.22.15",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@craco/craco": "^7.1.0",
"@dilesoft/vite-plugin-federation-dynamic": "^1.1.9",
Expand All @@ -14,29 +14,29 @@
"@iobroker/adapter-react-v5": "^4.5.3",
"@iobroker/admin-component-easy-access": "^0.3.2",
"@iobroker/socket-client": "^2.3.4",
"@mui/icons-material": "^5.14.3",
"@mui/lab": "^5.0.0-alpha.140",
"@mui/material": "^5.14.5",
"@mui/styles": "^5.14.5",
"@mui/x-data-grid": "^6.11.2",
"@mui/x-date-pickers": "^6.11.2",
"@mui/icons-material": "^5.14.8",
"@mui/lab": "^5.0.0-alpha.143",
"@mui/material": "^5.14.8",
"@mui/styles": "^5.14.7",
"@mui/x-data-grid": "^6.13.0",
"@mui/x-date-pickers": "^6.13.0",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@react-leaflet/core": "^2.1.0",
"@sentry/browser": "^7.64.0",
"@sentry/integrations": "^7.64.0",
"@testing-library/jest-dom": "^6.0.1",
"@sentry/browser": "^7.68.0",
"@sentry/integrations": "^7.68.0",
"@testing-library/jest-dom": "^6.1.3",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"buffer": "^6.0.3",
"copy-to-clipboard": "^3.3.3",
"craco-module-federation": "^1.1.0",
"cron-parser": "^4.9.0",
"cronstrue": "^2.31.0",
"cronstrue": "^2.32.0",
"crypto-js": "^4.1.1",
"date-fns": "^2.30.0",
"echarts": "^5.4.3",
"echarts-for-react": "^3.0.2",
"eslint": "^8.47.0",
"eslint": "^8.48.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-eqeqeq-fix": "^1.0.3",
Expand All @@ -51,21 +51,21 @@
"leaflet-geosearch": "^3.8.0",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"ol": "^7.5.1",
"ol": "^8.1.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-ace": "^10.1.0",
"react-color": "^2.19.3",
"react-cropper": "^2.3.3",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-multi-backend": "^8.0.1",
"react-dnd-multi-backend": "^8.0.2",
"react-dnd-preview": "^8.0.1",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-icons": "^4.10.1",
"react-inlinesvg": "^4.0.2",
"react-icons": "^4.11.0",
"react-inlinesvg": "^4.0.3",
"react-leaflet": "^4.2.1",
"react-markdown": "^8.0.7",
"react-monaco-editor": "^0.54.0",
Expand Down
2 changes: 1 addition & 1 deletion src/public/css/adapter.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/public/lib/css/iob/selectID.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/public/lib/css/jquery.treetable.theme.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/public/lib/js/ace/ext-searchbox.js

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions src/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,8 @@ class App extends Router {
}

onDiscoveryAlive = (name, value) => {
if (!!(value && !!value.val) !== this.state.discoveryAlive) {
this.setState({ discoveryAlive: !!(value && !!value.val) });
if (!!value?.val !== this.state.discoveryAlive) {
this.setState({ discoveryAlive: !!value?.val });
}
};

Expand Down Expand Up @@ -2286,16 +2286,14 @@ class App extends Router {
</IconButton>
<div className={classes.wrapperButtons}>
<IsVisible name="admin.appBar.discovery" config={this.adminGuiConfig}>
{this.state.discoveryAlive && (
<Tooltip title={I18n.t('Discovery devices')}>
<IconButton
size="large"
onClick={() => Router.doNavigate(null, 'discovery')}
>
<VisibilityIcon />
</IconButton>
</Tooltip>
)}
{this.state.discoveryAlive && <Tooltip title={I18n.t('Discovery devices')}>
<IconButton
size="large"
onClick={() => Router.doNavigate(null, 'discovery')}
>
<VisibilityIcon />
</IconButton>
</Tooltip>}
</IsVisible>
<IsVisible name="admin.appBar.systemSettings" config={this.adminGuiConfig}>
<Tooltip title={I18n.t('System settings')}>
Expand Down
1 change: 1 addition & 0 deletions src/src/components/Object/ObjectBrowserEditRole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class ObjectBrowserEditRole extends Component {
<DialogTitle id="edit-role-dialog-title">{this.object ? this.props.t('Update role for %s', this.object._id) : null}</DialogTitle>
<DialogContent>
<Autocomplete
variant="standard"
freeSolo
options={this.props.roles}
style={{ width: '100%' }}
Expand Down
40 changes: 24 additions & 16 deletions src/src/components/Wizard/WizardAuthSSLTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ import { createRef, Component } from 'react';
import { withStyles } from '@mui/styles';
import PropTypes from 'prop-types';

import Grid from '@mui/material/Grid';
import Toolbar from '@mui/material/Toolbar';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import Button from '@mui/material/Button';
import Paper from '@mui/material/Paper';
import InputLabel from '@mui/material/InputLabel';
import MenuItem from '@mui/material/MenuItem';
import FormHelperText from '@mui/material/FormHelperText';
import FormControl from '@mui/material/FormControl';
import Select from '@mui/material/Select';
import FormGroup from '@mui/material/FormGroup';
import {
Grid,
Toolbar,
FormControlLabel,
Checkbox,
Button,
Paper,
InputLabel,
MenuItem,
FormHelperText,
FormControl,
Select,
FormGroup,
} from '@mui/material';

import IconCheck from '@mui/icons-material/Check';
import { Check as IconCheck } from '@mui/icons-material';

import { withWidth } from '@iobroker/adapter-react-v5';

Expand Down Expand Up @@ -74,7 +76,7 @@ class WizardAuthSSLTab extends Component {
<form className={this.props.classes.form} noValidate autoComplete="off">
<Grid container direction="column">
<Grid item>
<h2 className={this.props.classes.title}>{ this.props.t('It is suggested to enable the authentication in admin') }</h2>
<h2 className={this.props.classes.title}>{this.props.t('It is suggested to enable the authentication in admin')}</h2>
</Grid>
<Grid item className={this.props.classes.inputLine}>
<FormGroup>
Expand All @@ -87,7 +89,6 @@ class WizardAuthSSLTab extends Component {
/>
}
label={this.props.t('Authentication in Admin')}

/>
<FormHelperText>{this.props.t('Activate the check of password in admin if you plan to access your ioBroker is not in "Demilitarized Zone"')}</FormHelperText>
</FormGroup>
Expand All @@ -114,7 +115,14 @@ class WizardAuthSSLTab extends Component {
</form>
<Toolbar className={this.props.classes.toolbar}>
<div className={this.props.classes.grow} />
<Button color="primary" variant="contained" onClick={() => this.props.onDone({ auth: this.state.auth, secure: this.state.secure })} startIcon={<IconCheck />}>{ this.props.t('Apply') }</Button>
<Button
color="primary"
variant="contained"
onClick={() => this.props.onDone({ auth: this.state.auth, secure: this.state.secure })}
startIcon={<IconCheck />}
>
{this.props.t('Apply')}
</Button>
</Toolbar>
</Paper>;
}
Expand Down
78 changes: 50 additions & 28 deletions src/src/components/Wizard/WizardLicenseTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,31 @@ import { createRef, Component } from 'react';
import { withStyles } from '@mui/styles';
import PropTypes from 'prop-types';

import Toolbar from '@mui/material/Toolbar';
import MenuItem from '@mui/material/MenuItem';
import Grid from '@mui/material/Grid';
import Select from '@mui/material/Select';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import Button from '@mui/material/Button';
import FormControl from '@mui/material/FormControl';
import InputLabel from '@mui/material/InputLabel';
import Paper from '@mui/material/Paper';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import {
Toolbar,
MenuItem,
Grid,
Select,
FormControlLabel,
Checkbox,
Button,
FormControl,
InputLabel,
Paper,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from '@mui/material';

import IconWorld from '@mui/icons-material/Language';
import IconCheck from '@mui/icons-material/Check';
import IconCancel from '@mui/icons-material/Close';
import {
Language as IconWorld,
Close as IconCancel,
Check as IconCheck,
} from '@mui/icons-material';

import I18n from '@iobroker/adapter-react-v5/i18n';
import withWidth from '@iobroker/adapter-react-v5/Components/withWidth';
import { I18n, withWidth } from '@iobroker/adapter-react-v5';
import LicenseTexts from '../LicenseTexts';

const TOOLBAR_HEIGHT = 64;
Expand Down Expand Up @@ -113,7 +116,7 @@ class WizardLicenseTab extends Component {
<DialogContentText id="alert-dialog-description">
<span role="img" aria-label="unhappy">😒</span>
{' '}
{ this.props.t('Sorry, you cannot use ioBroker.')}
{this.props.t('Sorry, you cannot use ioBroker.')}
</DialogContentText>
</DialogContent>
<DialogActions>
Expand All @@ -122,7 +125,7 @@ class WizardLicenseTab extends Component {
color="primary"
startIcon={<IconCheck />}
>
{ I18n.t('Understand') }
{I18n.t('Understand')}
</Button>
</DialogActions>
</Dialog>;
Expand All @@ -131,7 +134,10 @@ class WizardLicenseTab extends Component {
renderLicenseText() {
let lines = LicenseTexts[I18n.getLanguage()] || LicenseTexts.en;
lines = lines.split('\n');
return <div className={this.props.classes.licenseTextDiv}>{lines.map((line, i) => <div className={this.props.classes.licenseText} key={i}>{line}</div>)}</div>;
return <div className={this.props.classes.licenseTextDiv}>
{lines.map((line, i) =>
<div className={this.props.classes.licenseText} key={i}>{line}</div>)}
</div>;
}

render() {
Expand All @@ -141,7 +147,7 @@ class WizardLicenseTab extends Component {
<FormControl variant="standard" className={this.props.classes.languageSelect}>
<InputLabel>
<IconWorld />
{ this.props.t('Language') }
{this.props.t('Language')}
</InputLabel>
<Select
variant="standard"
Expand Down Expand Up @@ -169,20 +175,36 @@ class WizardLicenseTab extends Component {
control={<Checkbox ref={this.focusRef} checked={this.state.statisticsAccepted} onChange={e => this.setState({ statisticsAccepted: e.target.checked })} />}
label={this.props.t('I agree with the collection of anonymous statistics.')}
/>
<div className={this.props.classes.statAcceptNote}>{ this.props.t('(This can be disabled later in settings)') }</div>
<div className={this.props.classes.statAcceptNote}>{this.props.t('(This can be disabled later in settings)')}</div>
</div>
</Grid>
<Grid item>
<h1>{ this.props.t('License terms') }</h1>
<h1>{this.props.t('License terms')}</h1>
</Grid>
<Grid item className={this.props.classes.licenseDiv}>
{this.renderLicenseText()}
</Grid>
</Grid>
<Toolbar className={this.props.classes.toolbar}>
<div className={this.props.classes.grow} />
<Button variant="contained" color="grey" onClick={() => this.setState({ notAgree: true })} startIcon={<IconCancel />}>{ this.props.t('Not agree') }</Button>
<Button variant="contained" color="primary" className={this.props.classes.greenButton} disabled={!this.state.statisticsAccepted} onClick={() => this.props.onDone({ lang: this.state.lang })} startIcon={<IconCheck />}>{ this.props.t('Agree') }</Button>
<Button
variant="contained"
color="grey"
onClick={() => this.setState({ notAgree: true })}
startIcon={<IconCancel />}
>
{this.props.t('Not agree')}
</Button>
<Button
variant="contained"
color="primary"
className={this.props.classes.greenButton}
disabled={!this.state.statisticsAccepted}
onClick={() => this.props.onDone({ lang: this.state.lang })}
startIcon={<IconCheck />}
>
{this.props.t('Agree')}
</Button>
<div className={this.props.classes.grow} />
</Toolbar>
{ this.renderNotAgree() }
Expand Down
Loading

0 comments on commit e8b14d1

Please sign in to comment.