Skip to content

Commit

Permalink
Corrected widget and profile
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Apr 2, 2024
1 parent 84ab4d8 commit 49da878
Show file tree
Hide file tree
Showing 23 changed files with 171 additions and 180 deletions.
6 changes: 3 additions & 3 deletions admin/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.83fa2641.css",
"main.js": "./static/js/main.8018a587.js",
"main.js": "./static/js/main.952b4dbc.js",
"static/media/day-night.jpg": "./static/media/day-night.d6f09cbf18746b70d451.jpg",
"static/media/Ground Floor.svg": "./static/media/Ground Floor.2b7c5c91db7f070935a2.svg",
"static/media/Second Floor.svg": "./static/media/Second Floor.a2d5ed32df336591c06b.svg",
Expand Down Expand Up @@ -124,10 +124,10 @@
"static/media/Outdoor Blinds.svg": "./static/media/Outdoor Blinds.37b85a9c060a4af48da9.svg",
"static/media/Upstairs.svg": "./static/media/Upstairs.441813e54e0daca0882d.svg",
"main.83fa2641.css.map": "./static/css/main.83fa2641.css.map",
"main.8018a587.js.map": "./static/js/main.8018a587.js.map"
"main.952b4dbc.js.map": "./static/js/main.952b4dbc.js.map"
},
"entrypoints": [
"static/css/main.83fa2641.css",
"static/js/main.8018a587.js"
"static/js/main.952b4dbc.js"
]
}
2 changes: 1 addition & 1 deletion admin/index_m.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>Scheduler</title><script defer="defer" src="./static/js/main.8018a587.js"></script><link href="./static/css/main.83fa2641.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>Scheduler</title><script defer="defer" src="./static/js/main.952b4dbc.js"></script><link href="./static/css/main.83fa2641.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
"i18n": "component",
"name": "scheduler",
"url": "scheduler/customWidgets.js",
"url1": "http://localhost:4173/customWidgets.js",
"components": [
"Scheduler"
]
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url": "https://github.com/ioBroker/ioBroker.scheduler"
},
"dependencies": {
"@iobroker/adapter-core": "^3.0.4"
"@iobroker/adapter-core": "^3.0.6"
},
"devDependencies": {
"@alcalzone/release-script": "^3.7.0",
Expand All @@ -30,11 +30,11 @@
"babel-eslint": "^10.1.0",
"eslint": "^8.57.0",
"@types/iobroker": "^4.0.5",
"@types/node": "^20.11.26",
"axios": "^1.6.7",
"chai": "^4.4.1",
"gulp": "^4.0.2",
"mocha": "^10.3.0"
"@types/node": "^20.12.2",
"axios": "^1.6.8",
"chai": "^5.1.0",
"gulp": "^5.0.0",
"mocha": "^10.4.0"
},
"bugs": {
"url": "https://github.com/ioBroker/ioBroker.scheduler/issues"
Expand Down
14 changes: 7 additions & 7 deletions src-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@iobroker/adapter-react-v5": "^4.10.1",
"@emotion/styled": "^11.11.5",
"@iobroker/adapter-react-v5": "^4.13.4",
"@iobroker/vis-2-widgets-react-dev": "^1.0.5",
"@mui/icons-material": "^5.15.12",
"@mui/material": "5.14.14",
"@mui/styles": "5.14.14",
"@mui/icons-material": "^5.15.14",
"@mui/material": "5.15.14",
"@mui/styles": "5.15.14",
"moment": "^2.30.1",
"prop-types": "^15.8.1",
"react": "^18.2.0",
Expand All @@ -23,11 +23,11 @@
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-eqeqeq-fix": "^1.0.3",
"eslint-plugin-only-warn": "^1.1.0",
"sass": "^1.71.1"
"sass": "^1.72.0"
},
"scripts": {
"start": "set PORT=4173 && craco start",
Expand Down
23 changes: 13 additions & 10 deletions src-widgets/src/Scheduler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { withStyles, withTheme } from '@mui/styles';
import {
MenuItem,
Select,
Card,
CardContent,
} from '@mui/material';

import {
Expand Down Expand Up @@ -103,8 +101,8 @@ class Scheduler extends Generic {
id: 'tplScheduler',
visSet: 'scheduler',
visWidgetLabel: 'scheduler', // Label of widget
visSetLabel: 'set_label', // Label of widget set
visSetColor: '#70BBF7', // color of widget set
visSetLabel: 'set_label', // Label of the widget set
visSetColor: '#70BBF7', // color of the widget set
visName: 'Scheduler',
visAttrs: [{
name: 'common',
Expand Down Expand Up @@ -143,10 +141,15 @@ class Scheduler extends Generic {
default: false,
},
{
name: 'noCard',
label: 'without_card',
type: 'checkbox',
hidden: '!!data.externalDialog',
},
{
name: 'widgetTitle',
label: 'name',
name: 'name',
tooltip: 'used_only_with_relative',
default: '',
hidden: '!!data.noCard',
},
],
}],
Expand Down Expand Up @@ -317,11 +320,11 @@ class Scheduler extends Generic {
/>}
</div>;

if (this.state.rxStyle.position === 'relative') {
return this.wrapContent(content, null, { height: 'calc(100% - 24px)', width: 'calc(100% - 24px)' }, null, null, { Card, CardContent });
if (this.state.rxData.noCard || props.widget.usedInWidget) {
return content;
}

return content;
return this.wrapContent(content, null, { height: 'calc(100% - 24px)', width: 'calc(100% - 24px)' });
}
}

Expand Down
1 change: 0 additions & 1 deletion src-widgets/src/components/Interval.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ class Interval extends Component {
<span className={prettoSecs}>
{label[1]}
</span>

</div>
</span>;
}
Expand Down
12 changes: 6 additions & 6 deletions src-widgets/src/components/Intervals.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,11 @@ class Intervals extends Component {

setSlideOfTime = () => {
const { range } = this.props;
const hour = new Date().getHours();
const part = this.getCountByRange(range) * range;
this.setState({ slideId: Math.floor(hour / part) });
if (this.state.intervalsWidth) {
const hour = new Date().getHours();
const part = this.getCountByRange(range) * range;
this.setState({ slideId: Math.floor(hour / part) });
}
};

render() {
Expand All @@ -275,9 +277,7 @@ class Intervals extends Component {
onChange={quarterId => {
this.setSlideId(quarterId);
clearInterval(this.setSlideInterval);
this.setSlideInterval = setInterval(() => {
this.setSlideOfTime();
}, 1000 * 120);
this.setSlideInterval = setInterval(() => this.setSlideOfTime(), 1000 * 120);
}}
/>
</>;
Expand Down
4 changes: 2 additions & 2 deletions src-widgets/src/components/IntervalsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ class IntervalsContainer extends Component {
width: '100%',
}}
>
<Intervals
{this.props.intervalsWidth || this.state.intervalsWidth ? <Intervals
data={intervals}
onChange={this.props.onChange}
theme={theme}
type={type}
range={range}
intervalsWidth={this.props.intervalsWidth || this.state.intervalsWidth}
/>
/> : null}
</div>
</div>;
}
Expand Down
14 changes: 7 additions & 7 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@iobroker/adapter-react-v5": "^4.10.1",
"@mui/icons-material": "^5.15.12",
"@mui/material": "5.14.14",
"@mui/styles": "5.14.14",
"@sentry/browser": "^7.106.1",
"@sentry/integrations": "^7.106.1",
"@iobroker/adapter-react-v5": "^4.13.4",
"@mui/icons-material": "^5.15.14",
"@mui/material": "5.15.14",
"@mui/styles": "5.15.14",
"@sentry/browser": "^7.109.0",
"@sentry/integrations": "^7.109.0",
"babel-eslint": "^10.1.0",
"chroma-js": "^2.4.2",
"eslint-plugin-eqeqeq-fix": "^1.0.3",
Expand All @@ -30,7 +30,7 @@
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0"
},
"scripts": {
Expand Down
Loading

0 comments on commit 49da878

Please sign in to comment.