@iobroker/adapter-react-v5 7.2.1 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/ComplexCron.js +3 -3
- package/Components/IconPicker.js +1 -1
- package/Components/Schedule.js +27 -9
- package/Components/SimpleCron/index.js +32 -8
- package/Dialogs/SimpleCron.js +1 -1
- package/GenericApp.js +1 -1
- package/README.md +11 -3
- package/i18n/de.json +11 -1
- package/i18n/en.json +11 -1
- package/i18n/es.json +11 -1
- package/i18n/fr.json +11 -1
- package/i18n/it.json +11 -1
- package/i18n/nl.json +11 -1
- package/i18n/pl.json +11 -1
- package/i18n/pt.json +11 -1
- package/i18n/ru.json +11 -1
- package/i18n/uk.json +11 -1
- package/i18n/zh-cn.json +11 -1
- package/package.json +1 -1
- package/src/Components/ComplexCron.tsx +3 -3
- package/src/Components/IconPicker.tsx +1 -1
- package/src/Components/Schedule.tsx +39 -6
- package/src/Dialogs/SimpleCron.tsx +1 -0
- package/src/GenericApp.tsx +1 -1
|
@@ -38,7 +38,7 @@ const styles = {
|
|
|
38
38
|
periodSelect: {
|
|
39
39
|
// margin: '0 10px 60px 10px',
|
|
40
40
|
display: 'block',
|
|
41
|
-
width:
|
|
41
|
+
width: 250,
|
|
42
42
|
},
|
|
43
43
|
slider: {
|
|
44
44
|
marginTop: 20,
|
|
@@ -400,9 +400,9 @@ class ComplexCron extends react_1.Component {
|
|
|
400
400
|
const everyMinute = this.state.minutes === '*' || this.state.minutes === '*/1';
|
|
401
401
|
const everySecond = this.state.seconds === '*' || this.state.seconds === '*/1';
|
|
402
402
|
return (react_1.default.createElement("div", { style: styles.mainDiv },
|
|
403
|
-
react_1.default.createElement("div", { style: { paddingLeft: 8, width: '100%' } },
|
|
403
|
+
react_1.default.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - px)' } },
|
|
404
404
|
react_1.default.createElement(material_1.TextField, { variant: "standard", style: { width: '100%' }, value: this.state.cron, disabled: true })),
|
|
405
|
-
react_1.default.createElement("div", { style: { paddingLeft: 8, width: '100%', height: 60 } },
|
|
405
|
+
react_1.default.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - px)', height: 60 } },
|
|
406
406
|
ComplexCron.convertCronToText(this.state.cron, this.props.language || 'en'),
|
|
407
407
|
react_1.default.createElement("span", { style: styles.warning }, everySecond
|
|
408
408
|
? i18n_1.default.t('ra_warning_every_second')
|
package/Components/IconPicker.js
CHANGED
package/Components/Schedule.js
CHANGED
|
@@ -600,7 +600,11 @@ class Schedule extends react_1.Component {
|
|
|
600
600
|
this.onChange(_schedule);
|
|
601
601
|
} }), label: !fromTo ? i18n_1.default.t('sch_fromTo') : '' }),
|
|
602
602
|
fromTo && [
|
|
603
|
-
react_1.default.createElement(material_1.TextField, { variant: "standard", style: Object.assign(Object.assign({}, styles.inputTime), { marginRight: 10 }), key: "exactTimeFrom", type: "time",
|
|
603
|
+
react_1.default.createElement(material_1.TextField, { variant: "standard", style: Object.assign(Object.assign({}, styles.inputTime), { marginRight: 10 }), key: "exactTimeFrom", type: "time", sx: (theme) => ({
|
|
604
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
605
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
606
|
+
},
|
|
607
|
+
}), value: this.state.schedule.time.start,
|
|
604
608
|
// InputProps={{inputComponent: TextTime}}
|
|
605
609
|
onChange: e => {
|
|
606
610
|
const _schedule = JSON.parse(JSON.stringify(this.state.schedule));
|
|
@@ -609,7 +613,11 @@ class Schedule extends react_1.Component {
|
|
|
609
613
|
}, slotProps: {
|
|
610
614
|
inputLabel: { shrink: true },
|
|
611
615
|
}, label: i18n_1.default.t('sch_from'), margin: "normal" }),
|
|
612
|
-
react_1.default.createElement(material_1.TextField, { variant: "standard", style: styles.inputTime, key: "exactTimeTo", type: "time",
|
|
616
|
+
react_1.default.createElement(material_1.TextField, { variant: "standard", style: styles.inputTime, key: "exactTimeTo", type: "time", sx: (theme) => ({
|
|
617
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
618
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
619
|
+
},
|
|
620
|
+
}), value: this.state.schedule.time.end,
|
|
613
621
|
// InputProps={{inputComponent: TextTime}}
|
|
614
622
|
onChange: e => {
|
|
615
623
|
const _schedule = JSON.parse(JSON.stringify(this.state.schedule));
|
|
@@ -659,13 +667,17 @@ class Schedule extends react_1.Component {
|
|
|
659
667
|
react_1.default.createElement(material_1.MenuItem, { key: "specific", value: "00:00" }, i18n_1.default.t('sch_specificTime')),
|
|
660
668
|
ASTRO.map(event => (react_1.default.createElement(material_1.MenuItem, { key: event, value: event }, i18n_1.default.t(`sch_astro_${event}`)))))),
|
|
661
669
|
this.state.schedule.time.exactTime && !isAstro && (react_1.default.createElement("div", { style: styles.settingsDiv },
|
|
662
|
-
react_1.default.createElement(material_1.TextField, { variant: "standard", style: styles.inputTime, key: "exactTimeValue", value: this.state.schedule.time.start, type: "time",
|
|
663
|
-
|
|
664
|
-
|
|
670
|
+
react_1.default.createElement(material_1.TextField, { variant: "standard", style: styles.inputTime, key: "exactTimeValue", value: this.state.schedule.time.start, type: "time", sx: (theme) => ({
|
|
671
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
672
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
673
|
+
},
|
|
674
|
+
}), onChange: e => {
|
|
665
675
|
const _schedule = JSON.parse(JSON.stringify(this.state.schedule));
|
|
666
676
|
_schedule.time.start = e.target.value;
|
|
667
677
|
this.onChange(_schedule);
|
|
668
|
-
},
|
|
678
|
+
}, slotProps: {
|
|
679
|
+
inputLabel: { shrink: true },
|
|
680
|
+
}, margin: "normal" })))));
|
|
669
681
|
}
|
|
670
682
|
static getDivider() {
|
|
671
683
|
return react_1.default.createElement("hr", { style: styles.hr });
|
|
@@ -719,7 +731,9 @@ class Schedule extends react_1.Component {
|
|
|
719
731
|
this.onChange(_schedule);
|
|
720
732
|
}
|
|
721
733
|
}, 1500, e.target.value);
|
|
722
|
-
},
|
|
734
|
+
}, slotProps: {
|
|
735
|
+
inputLabel: { shrink: true },
|
|
736
|
+
}, label: i18n_1.default.t('sch_at'), margin: "normal" })))),
|
|
723
737
|
// ----- days ---
|
|
724
738
|
react_1.default.createElement(material_1.Box, { component: "div", key: "days", sx: Utils_1.default.getStyle(this.props.theme, styles.rowDiv, styles.rowDays) },
|
|
725
739
|
react_1.default.createElement("div", { style: styles.modeDiv },
|
|
@@ -1218,7 +1232,9 @@ class Schedule extends react_1.Component {
|
|
|
1218
1232
|
this.onChange(_schedule);
|
|
1219
1233
|
}
|
|
1220
1234
|
}, 1500, e.target.value);
|
|
1221
|
-
},
|
|
1235
|
+
}, slotProps: {
|
|
1236
|
+
inputLabel: { shrink: true },
|
|
1237
|
+
}, margin: "normal" }),
|
|
1222
1238
|
react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { style: styles.inputRadio, checked: !!schedule.valid.to, onClick: () => {
|
|
1223
1239
|
const _schedule = JSON.parse(JSON.stringify(this.state.schedule));
|
|
1224
1240
|
_schedule.valid.to = _schedule.valid.to ? '' : Schedule.now2string(true);
|
|
@@ -1243,7 +1259,9 @@ class Schedule extends react_1.Component {
|
|
|
1243
1259
|
this.onChange(_schedule);
|
|
1244
1260
|
}
|
|
1245
1261
|
}, 1500, e.target.value);
|
|
1246
|
-
},
|
|
1262
|
+
}, slotProps: {
|
|
1263
|
+
inputLabel: { shrink: true },
|
|
1264
|
+
}, margin: "normal" })))));
|
|
1247
1265
|
}
|
|
1248
1266
|
render() {
|
|
1249
1267
|
return (react_1.default.createElement("div", { style: { height: 'calc(100% - 48px)', width: '100%', overflow: 'hidden' } },
|
|
@@ -36,7 +36,16 @@ const PERIODIC_TYPES = {
|
|
|
36
36
|
minutes: 'minutes',
|
|
37
37
|
// hours: 'hours',
|
|
38
38
|
};
|
|
39
|
-
const WEEKDAYS = [
|
|
39
|
+
const WEEKDAYS = [
|
|
40
|
+
'ra_Sunday',
|
|
41
|
+
'ra_Monday',
|
|
42
|
+
'ra_Tuesday',
|
|
43
|
+
'ra_Wednesday',
|
|
44
|
+
'ra_Thursday',
|
|
45
|
+
'ra_Friday',
|
|
46
|
+
'ra_Saturday',
|
|
47
|
+
'ra_Sunday',
|
|
48
|
+
];
|
|
40
49
|
function padding(num) {
|
|
41
50
|
if (num < 10) {
|
|
42
51
|
return `0${num}`;
|
|
@@ -281,6 +290,9 @@ class SimpleCron extends react_1.default.Component {
|
|
|
281
290
|
const text = [];
|
|
282
291
|
let start = null;
|
|
283
292
|
let end = null;
|
|
293
|
+
if (!list.length) {
|
|
294
|
+
return '_';
|
|
295
|
+
}
|
|
284
296
|
for (let i = 0; i < list.length; i++) {
|
|
285
297
|
if (start === null) {
|
|
286
298
|
start = list[i];
|
|
@@ -459,13 +471,21 @@ class SimpleCron extends react_1.default.Component {
|
|
|
459
471
|
}
|
|
460
472
|
getControlsWeekdaysElements(type) {
|
|
461
473
|
const settings = type === 'intervalBetween' ? this.state.intervalBetween : this.state.specific;
|
|
462
|
-
return (react_1.default.createElement("div", { key: "weekdays", style: { paddingLeft: 8, width: '100%', maxWidth: 600 } },
|
|
474
|
+
return (react_1.default.createElement("div", { key: "weekdays", style: { paddingLeft: 8, width: 'calc(100% - 8px)', maxWidth: 600 } },
|
|
463
475
|
react_1.default.createElement("h5", null, i18n_1.default.t('ra_On weekdays')),
|
|
464
476
|
[1, 2, 3, 4, 5, 6, 0].map(day => (react_1.default.createElement(material_1.FormControlLabel, { key: WEEKDAYS[day], control: react_1.default.createElement(material_1.Checkbox, { checked: settings.weekdays.includes(day), onChange: e => {
|
|
465
477
|
const _settings = JSON.parse(JSON.stringify(this.state[type]));
|
|
466
478
|
const pos = _settings.weekdays.indexOf(day);
|
|
467
|
-
e.target.checked
|
|
468
|
-
|
|
479
|
+
if (e.target.checked) {
|
|
480
|
+
if (pos === -1) {
|
|
481
|
+
_settings.weekdays.push(day);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
if (pos !== -1) {
|
|
486
|
+
_settings.weekdays.splice(pos, 1);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
469
489
|
_settings.weekdays.sort();
|
|
470
490
|
if (type === 'intervalBetween') {
|
|
471
491
|
this.setState({ intervalBetween: _settings }, () => this.recalcCron());
|
|
@@ -564,7 +584,11 @@ class SimpleCron extends react_1.default.Component {
|
|
|
564
584
|
getControlsTime(type) {
|
|
565
585
|
const settings = type === 'once' ? this.state.once : this.state.specific;
|
|
566
586
|
return (react_1.default.createElement(material_1.FormControl, { variant: "standard", sx: Object.assign(Object.assign({}, styles.formControl), { '&.MuiFormControl-root': styles.formControlMarginRight }) },
|
|
567
|
-
react_1.default.createElement(material_1.TextField, { variant: "standard", key: "at", label: i18n_1.default.t('sc_time'), value: settings.time, type: "time",
|
|
587
|
+
react_1.default.createElement(material_1.TextField, { variant: "standard", key: "at", label: i18n_1.default.t('sc_time'), value: settings.time, type: "time", sx: (theme) => ({
|
|
588
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
589
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
590
|
+
},
|
|
591
|
+
}), onChange: e => {
|
|
568
592
|
const _settings = JSON.parse(JSON.stringify(this.state[type]));
|
|
569
593
|
_settings.time = e.target.value;
|
|
570
594
|
if (type === 'once') {
|
|
@@ -655,9 +679,9 @@ class SimpleCron extends react_1.default.Component {
|
|
|
655
679
|
}
|
|
656
680
|
render() {
|
|
657
681
|
return (react_1.default.createElement("div", { style: styles.mainDiv },
|
|
658
|
-
react_1.default.createElement("div", { style: { paddingLeft: 8, width: '100%' } },
|
|
659
|
-
react_1.default.createElement(material_1.TextField, { variant: "standard", style: { width: '100%' }, value: this.state.cron, disabled: true })),
|
|
660
|
-
react_1.default.createElement("div", { style: { paddingLeft: 8, width: '100%', height: 60 } }, (0, cronText_1.default)(this.state.cron, this.props.language || 'en')),
|
|
682
|
+
react_1.default.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - 8px)' } },
|
|
683
|
+
react_1.default.createElement(material_1.TextField, { variant: "standard", style: { width: '100%' }, value: this.state.cron, disabled: true, error: this.state.cron.includes('_') })),
|
|
684
|
+
react_1.default.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - 8px)', height: 60 } }, this.state.cron.includes('_') ? i18n_1.default.t('sc_invalid_cron') : (0, cronText_1.default)(this.state.cron, this.props.language || 'en')),
|
|
661
685
|
react_1.default.createElement("div", null,
|
|
662
686
|
react_1.default.createElement(material_1.FormControl, { variant: "standard", style: Object.assign(Object.assign({}, styles.formControl), { marginLeft: 8, marginTop: 8 }) },
|
|
663
687
|
react_1.default.createElement(material_1.InputLabel, null, i18n_1.default.t('ra_Repeat')),
|
package/Dialogs/SimpleCron.js
CHANGED
|
@@ -44,7 +44,7 @@ class DialogSimpleCron extends react_1.default.Component {
|
|
|
44
44
|
react_1.default.createElement(material_1.DialogContent, { style: { height: '100%', overflow: 'hidden' } },
|
|
45
45
|
react_1.default.createElement(SimpleCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() })),
|
|
46
46
|
react_1.default.createElement(material_1.DialogActions, null,
|
|
47
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
|
|
47
|
+
react_1.default.createElement(material_1.Button, { variant: "contained", disabled: !this.state.cron || this.state.cron.includes('_'), onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
|
|
48
48
|
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel')))));
|
|
49
49
|
}
|
|
50
50
|
}
|
package/GenericApp.js
CHANGED
|
@@ -236,7 +236,7 @@ class GenericApp extends Router_1.default {
|
|
|
236
236
|
'zh-cn': zh_cn_json_1.default,
|
|
237
237
|
};
|
|
238
238
|
// merge together
|
|
239
|
-
if (settings
|
|
239
|
+
if (settings === null || settings === void 0 ? void 0 : settings.translations) {
|
|
240
240
|
Object.keys(settings.translations).forEach(lang => {
|
|
241
241
|
if (settings.translations) {
|
|
242
242
|
translations[lang] = Object.assign(translations[lang], settings.translations[lang] || {});
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ If you want to create the configuration page with ReactJS:
|
|
|
13
13
|
- Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
|
|
14
14
|
- Add to devDependencies:
|
|
15
15
|
```
|
|
16
|
-
"@iobroker/adapter-react-v5": "^7.2.
|
|
16
|
+
"@iobroker/adapter-react-v5": "^7.2.3",
|
|
17
17
|
```
|
|
18
18
|
Versions can be higher.
|
|
19
19
|
So your `src/package.json` should look like:
|
|
@@ -24,7 +24,7 @@ If you want to create the configuration page with ReactJS:
|
|
|
24
24
|
"version": "0.1.0",
|
|
25
25
|
"private": true,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@iobroker/adapter-react-v5": "^7.2.
|
|
27
|
+
"@iobroker/adapter-react-v5": "^7.2.3",
|
|
28
28
|
"@iobroker/build-tools": "^1.0.0",
|
|
29
29
|
"@iobroker/eslint-config": "^0.1.2",
|
|
30
30
|
"@mui/material": "^6.0.2",
|
|
@@ -697,9 +697,17 @@ You can find the migration instructions:
|
|
|
697
697
|
-->
|
|
698
698
|
|
|
699
699
|
## Changelog
|
|
700
|
+
### 7.2.3 (2024-10-05)
|
|
701
|
+
|
|
702
|
+
- (@GermanBluefox) Corrected error in the simple CRON dialog
|
|
703
|
+
|
|
704
|
+
### 7.2.2 (2024-10-04)
|
|
705
|
+
|
|
706
|
+
- (@GermanBluefox) Small layout change for Icon Picker
|
|
707
|
+
|
|
700
708
|
### 7.2.1 (2024-09-30)
|
|
701
709
|
|
|
702
|
-
- (
|
|
710
|
+
- (@GermanBluefox) Allowed using an array of elements in dialogs
|
|
703
711
|
- (@GermanBluefox) Allowed to use `socket.iob` instead of `socket.io`
|
|
704
712
|
|
|
705
713
|
### 7.1.4 (2024-09-15)
|
package/i18n/de.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Achtung: Der CRON-Job wird im angegebenen Zeitraum jede Sekunde ausgeführt!",
|
|
436
436
|
"ra_warning_every_minute": "Achtung: Der CRON-Job wird im angegebenen Zeitraum jede Minute ausgeführt!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "Der Zeitplan wird jede Sekunde ausgeführt. Sind Sie sicher?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "Der Zeitplan wird jede Minute ausgeführt. Sind Sie sicher?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "Der Zeitplan wird jede Minute ausgeführt. Sind Sie sicher?",
|
|
439
|
+
"sc_dow": "Tag",
|
|
440
|
+
"ra_Define CRON...": "Definieren Sie CRON ...",
|
|
441
|
+
"ra_Sunday": "Sonntag",
|
|
442
|
+
"ra_Monday": "Montag",
|
|
443
|
+
"ra_Tuesday": "Dienstag",
|
|
444
|
+
"ra_Wednesday": "Mittwoch",
|
|
445
|
+
"ra_Thursday": "Donnerstag",
|
|
446
|
+
"ra_Friday": "Freitag",
|
|
447
|
+
"ra_Saturday": "Samstag",
|
|
448
|
+
"sc_invalid_cron": "Ungültiger CRON"
|
|
439
449
|
}
|
package/i18n/en.json
CHANGED
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"sc_date": "Date",
|
|
93
93
|
"sc_dates": "Dates",
|
|
94
94
|
"sc_dows": "Day of week",
|
|
95
|
+
"sc_dow": "Day",
|
|
95
96
|
"sc_every": "Every",
|
|
96
97
|
"sc_everyN_dates": "every N days",
|
|
97
98
|
"sc_everyN_dows": "every N day of week",
|
|
@@ -435,5 +436,14 @@
|
|
|
435
436
|
"ra_warning_every_second": "Warning: The CRON job will run every second during the specified period!",
|
|
436
437
|
"ra_warning_every_minute": "Warning: The CRON job will run every minute during the specified period!",
|
|
437
438
|
"ra_The schedule will be executed every second. Are you sure?": "The schedule will be executed every second. Are you sure?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "The schedule will be executed every minute. Are you sure?"
|
|
439
|
+
"ra_The schedule will be executed every minute. Are you sure?": "The schedule will be executed every minute. Are you sure?",
|
|
440
|
+
"ra_Define CRON...": "Define CRON...",
|
|
441
|
+
"ra_Sunday": "Sunday",
|
|
442
|
+
"ra_Monday": "Monday",
|
|
443
|
+
"ra_Tuesday": "Tuesday",
|
|
444
|
+
"ra_Wednesday": "Wednesday",
|
|
445
|
+
"ra_Thursday": "Thursday",
|
|
446
|
+
"ra_Friday": "Friday",
|
|
447
|
+
"ra_Saturday": "Saturday",
|
|
448
|
+
"sc_invalid_cron": "Invalid CRON"
|
|
439
449
|
}
|
package/i18n/es.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Advertencia: ¡El trabajo CRON se ejecutará cada segundo durante el período especificado!",
|
|
436
436
|
"ra_warning_every_minute": "Advertencia: ¡El trabajo CRON se ejecutará cada minuto durante el período especificado!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "El cronograma se ejecutará cada segundo. ¿Estás seguro?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "El cronograma se ejecutará cada minuto. ¿Estás seguro?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "El cronograma se ejecutará cada minuto. ¿Estás seguro?",
|
|
439
|
+
"sc_dow": "Día",
|
|
440
|
+
"ra_Define CRON...": "Definir CRON...",
|
|
441
|
+
"ra_Sunday": "Domingo",
|
|
442
|
+
"ra_Monday": "Lunes",
|
|
443
|
+
"ra_Tuesday": "Martes",
|
|
444
|
+
"ra_Wednesday": "Miércoles",
|
|
445
|
+
"ra_Thursday": "Jueves",
|
|
446
|
+
"ra_Friday": "Viernes",
|
|
447
|
+
"ra_Saturday": "Sábado",
|
|
448
|
+
"sc_invalid_cron": "CRON no válido"
|
|
439
449
|
}
|
package/i18n/fr.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Attention : la tâche CRON s’exécutera toutes les secondes pendant la période spécifiée !",
|
|
436
436
|
"ra_warning_every_minute": "Attention : la tâche CRON s’exécutera toutes les minutes pendant la période spécifiée !",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "Le planning sera exécuté toutes les secondes. Êtes-vous sûr ?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "Le planning sera exécuté toutes les minutes. Êtes-vous sûr ?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "Le planning sera exécuté toutes les minutes. Êtes-vous sûr ?",
|
|
439
|
+
"sc_dow": "Jour",
|
|
440
|
+
"ra_Define CRON...": "Définir CRON...",
|
|
441
|
+
"ra_Sunday": "Dimanche",
|
|
442
|
+
"ra_Monday": "Lundi",
|
|
443
|
+
"ra_Tuesday": "Mardi",
|
|
444
|
+
"ra_Wednesday": "Mercredi",
|
|
445
|
+
"ra_Thursday": "Jeudi",
|
|
446
|
+
"ra_Friday": "Vendredi",
|
|
447
|
+
"ra_Saturday": "Samedi",
|
|
448
|
+
"sc_invalid_cron": "CRON non valide"
|
|
439
449
|
}
|
package/i18n/it.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Attenzione: il processo CRON verrà eseguito ogni secondo durante il periodo specificato!",
|
|
436
436
|
"ra_warning_every_minute": "Attenzione: il processo CRON verrà eseguito ogni minuto durante il periodo specificato!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "La pianificazione verrà eseguita ogni secondo. Sei sicuro?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "La pianificazione verrà eseguita ogni minuto. Sei sicuro?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "La pianificazione verrà eseguita ogni minuto. Sei sicuro?",
|
|
439
|
+
"sc_dow": "Giorno",
|
|
440
|
+
"ra_Define CRON...": "Definisci CRON...",
|
|
441
|
+
"ra_Sunday": "Domenica",
|
|
442
|
+
"ra_Monday": "Lunedi",
|
|
443
|
+
"ra_Tuesday": "Martedì",
|
|
444
|
+
"ra_Wednesday": "Mercoledì",
|
|
445
|
+
"ra_Thursday": "Giovedì",
|
|
446
|
+
"ra_Friday": "Venerdì",
|
|
447
|
+
"ra_Saturday": "Sabato",
|
|
448
|
+
"sc_invalid_cron": "CRON non valido"
|
|
439
449
|
}
|
package/i18n/nl.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Waarschuwing: De CRON-taak wordt elke seconde uitgevoerd gedurende de opgegeven periode!",
|
|
436
436
|
"ra_warning_every_minute": "Waarschuwing: De CRON-taak wordt elke minuut uitgevoerd gedurende de opgegeven periode!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "Het schema wordt elke seconde uitgevoerd. Weet je het zeker?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "Het schema wordt elke minuut uitgevoerd. Weet u het zeker?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "Het schema wordt elke minuut uitgevoerd. Weet u het zeker?",
|
|
439
|
+
"sc_dow": "Dag",
|
|
440
|
+
"ra_Define CRON...": "Definieer CRON...",
|
|
441
|
+
"ra_Sunday": "Zondag",
|
|
442
|
+
"ra_Monday": "Maandag",
|
|
443
|
+
"ra_Tuesday": "Dinsdag",
|
|
444
|
+
"ra_Wednesday": "Woensdag",
|
|
445
|
+
"ra_Thursday": "Donderdag",
|
|
446
|
+
"ra_Friday": "Vrijdag",
|
|
447
|
+
"ra_Saturday": "Zaterdag",
|
|
448
|
+
"sc_invalid_cron": "Ongeldige CRON"
|
|
439
449
|
}
|
package/i18n/pl.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Ostrzeżenie: Zadanie CRON będzie uruchamiane co sekundę w określonym przedziale czasowym!",
|
|
436
436
|
"ra_warning_every_minute": "Ostrzeżenie: Zadanie CRON będzie uruchamiane co minutę w określonym przedziale czasowym!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "Harmonogram będzie wykonywany co sekundę. Czy jesteś pewien?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "Harmonogram będzie wykonywany co minutę. Czy jesteś pewien?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "Harmonogram będzie wykonywany co minutę. Czy jesteś pewien?",
|
|
439
|
+
"sc_dow": "Dzień",
|
|
440
|
+
"ra_Define CRON...": "Zdefiniuj CRON...",
|
|
441
|
+
"ra_Sunday": "Niedziela",
|
|
442
|
+
"ra_Monday": "Poniedziałek",
|
|
443
|
+
"ra_Tuesday": "Wtorek",
|
|
444
|
+
"ra_Wednesday": "Środa",
|
|
445
|
+
"ra_Thursday": "Czwartek",
|
|
446
|
+
"ra_Friday": "Piątek",
|
|
447
|
+
"ra_Saturday": "Sobota",
|
|
448
|
+
"sc_invalid_cron": "Nieprawidłowy CRON"
|
|
439
449
|
}
|
package/i18n/pt.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Aviso: O trabalho CRON será executado a cada segundo durante o período especificado!",
|
|
436
436
|
"ra_warning_every_minute": "Aviso: O trabalho CRON será executado a cada minuto durante o período especificado!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "O agendamento será executado a cada segundo. Tem certeza?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "O agendamento será executado a cada minuto. Tem certeza?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "O agendamento será executado a cada minuto. Tem certeza?",
|
|
439
|
+
"sc_dow": "Dia",
|
|
440
|
+
"ra_Define CRON...": "Defina CRON...",
|
|
441
|
+
"ra_Sunday": "Domingo",
|
|
442
|
+
"ra_Monday": "Segunda-feira",
|
|
443
|
+
"ra_Tuesday": "Terça-feira",
|
|
444
|
+
"ra_Wednesday": "Quarta-feira",
|
|
445
|
+
"ra_Thursday": "Quinta-feira",
|
|
446
|
+
"ra_Friday": "Sexta-feira",
|
|
447
|
+
"ra_Saturday": "Sábado",
|
|
448
|
+
"sc_invalid_cron": "CRON inválido"
|
|
439
449
|
}
|
package/i18n/ru.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Внимание: задание CRON будет выполняться каждую секунду в течение указанного периода!",
|
|
436
436
|
"ra_warning_every_minute": "Внимание: задание CRON будет запускаться каждую минуту в течение указанного периода!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "Расписание будет выполняться каждую секунду. Вы уверены?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "Расписание будет выполняться каждую минуту. Вы уверены?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "Расписание будет выполняться каждую минуту. Вы уверены?",
|
|
439
|
+
"sc_dow": "День",
|
|
440
|
+
"ra_Define CRON...": "Определите CRON...",
|
|
441
|
+
"ra_Sunday": "Воскресенье",
|
|
442
|
+
"ra_Monday": "Понедельник",
|
|
443
|
+
"ra_Tuesday": "Вторник",
|
|
444
|
+
"ra_Wednesday": "Среда",
|
|
445
|
+
"ra_Thursday": "Четверг",
|
|
446
|
+
"ra_Friday": "Пятница",
|
|
447
|
+
"ra_Saturday": "Суббота",
|
|
448
|
+
"sc_invalid_cron": "Неверный CRON"
|
|
439
449
|
}
|
package/i18n/uk.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "Попередження: завдання CRON виконуватиметься кожну секунду протягом зазначеного періоду!",
|
|
436
436
|
"ra_warning_every_minute": "Попередження: завдання CRON виконуватиметься щохвилини протягом зазначеного періоду!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "Розклад буде виконуватися щосекунди. Ви впевнені?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "Розклад буде виконуватися щохвилини. Ви впевнені?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "Розклад буде виконуватися щохвилини. Ви впевнені?",
|
|
439
|
+
"sc_dow": "День",
|
|
440
|
+
"ra_Define CRON...": "Визначити CRON...",
|
|
441
|
+
"ra_Sunday": "неділя",
|
|
442
|
+
"ra_Monday": "понеділок",
|
|
443
|
+
"ra_Tuesday": "вівторок",
|
|
444
|
+
"ra_Wednesday": "Середа",
|
|
445
|
+
"ra_Thursday": "четвер",
|
|
446
|
+
"ra_Friday": "П'ятниця",
|
|
447
|
+
"ra_Saturday": "Субота",
|
|
448
|
+
"sc_invalid_cron": "Недійсний CRON"
|
|
439
449
|
}
|
package/i18n/zh-cn.json
CHANGED
|
@@ -435,5 +435,15 @@
|
|
|
435
435
|
"ra_warning_every_second": "警告:CRON 作业将在指定期间内每秒运行一次!",
|
|
436
436
|
"ra_warning_every_minute": "警告:CRON 作业将在指定期间内每分钟运行一次!",
|
|
437
437
|
"ra_The schedule will be executed every second. Are you sure?": "该计划将每秒执行一次。你确定吗?",
|
|
438
|
-
"ra_The schedule will be executed every minute. Are you sure?": "该计划将每分钟执行一次。您确定吗?"
|
|
438
|
+
"ra_The schedule will be executed every minute. Are you sure?": "该计划将每分钟执行一次。您确定吗?",
|
|
439
|
+
"sc_dow": "天",
|
|
440
|
+
"ra_Define CRON...": "定义 CRON...",
|
|
441
|
+
"ra_Sunday": "星期日",
|
|
442
|
+
"ra_Monday": "周一",
|
|
443
|
+
"ra_Tuesday": "周二",
|
|
444
|
+
"ra_Wednesday": "周三",
|
|
445
|
+
"ra_Thursday": "周四",
|
|
446
|
+
"ra_Friday": "星期五",
|
|
447
|
+
"ra_Saturday": "周六",
|
|
448
|
+
"sc_invalid_cron": "无效的 CRON"
|
|
439
449
|
}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ const styles: Record<string, React.CSSProperties> = {
|
|
|
13
13
|
periodSelect: {
|
|
14
14
|
// margin: '0 10px 60px 10px',
|
|
15
15
|
display: 'block',
|
|
16
|
-
width:
|
|
16
|
+
width: 250,
|
|
17
17
|
},
|
|
18
18
|
slider: {
|
|
19
19
|
marginTop: 20,
|
|
@@ -479,7 +479,7 @@ class ComplexCron extends Component<ComplexCronProps, ComplexCronState> {
|
|
|
479
479
|
|
|
480
480
|
return (
|
|
481
481
|
<div style={styles.mainDiv}>
|
|
482
|
-
<div style={{ paddingLeft: 8, width: '100%' }}>
|
|
482
|
+
<div style={{ paddingLeft: 8, width: 'calc(100% - px)' }}>
|
|
483
483
|
<TextField
|
|
484
484
|
variant="standard"
|
|
485
485
|
style={{ width: '100%' }}
|
|
@@ -487,7 +487,7 @@ class ComplexCron extends Component<ComplexCronProps, ComplexCronState> {
|
|
|
487
487
|
disabled
|
|
488
488
|
/>
|
|
489
489
|
</div>
|
|
490
|
-
<div style={{ paddingLeft: 8, width: '100%', height: 60 }}>
|
|
490
|
+
<div style={{ paddingLeft: 8, width: 'calc(100% - px)', height: 60 }}>
|
|
491
491
|
{ComplexCron.convertCronToText(this.state.cron, this.props.language || 'en')}
|
|
492
492
|
<span style={styles.warning}>
|
|
493
493
|
{everySecond
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import React, { Component, type JSX } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Input,
|
|
5
|
+
Radio,
|
|
6
|
+
FormControlLabel,
|
|
7
|
+
FormGroup,
|
|
8
|
+
Checkbox,
|
|
9
|
+
MenuItem,
|
|
10
|
+
Select,
|
|
11
|
+
TextField,
|
|
12
|
+
Box,
|
|
13
|
+
type Theme
|
|
14
|
+
} from '@mui/material';
|
|
4
15
|
|
|
5
16
|
import I18n from '../i18n';
|
|
6
17
|
import type { IobTheme } from '../types';
|
|
@@ -650,6 +661,11 @@ class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
650
661
|
style={{ ...styles.inputTime, marginRight: 10 }}
|
|
651
662
|
key="exactTimeFrom"
|
|
652
663
|
type="time"
|
|
664
|
+
sx={(theme: Theme) => ({
|
|
665
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
666
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
667
|
+
},
|
|
668
|
+
})}
|
|
653
669
|
value={this.state.schedule.time.start}
|
|
654
670
|
// InputProps={{inputComponent: TextTime}}
|
|
655
671
|
onChange={e => {
|
|
@@ -668,6 +684,11 @@ class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
668
684
|
style={styles.inputTime}
|
|
669
685
|
key="exactTimeTo"
|
|
670
686
|
type="time"
|
|
687
|
+
sx={(theme: Theme) => ({
|
|
688
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
689
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
690
|
+
},
|
|
691
|
+
})}
|
|
671
692
|
value={this.state.schedule.time.end}
|
|
672
693
|
// InputProps={{inputComponent: TextTime}}
|
|
673
694
|
onChange={e => {
|
|
@@ -810,13 +831,19 @@ class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
810
831
|
key="exactTimeValue"
|
|
811
832
|
value={this.state.schedule.time.start}
|
|
812
833
|
type="time"
|
|
813
|
-
|
|
834
|
+
sx={(theme: Theme) => ({
|
|
835
|
+
'& input[type="time"]::-webkit-calendar-picker-indicator': {
|
|
836
|
+
filter: theme.palette.mode === 'dark' ? 'invert(80%)' : undefined,
|
|
837
|
+
},
|
|
838
|
+
})}
|
|
814
839
|
onChange={e => {
|
|
815
840
|
const _schedule = JSON.parse(JSON.stringify(this.state.schedule));
|
|
816
841
|
_schedule.time.start = e.target.value;
|
|
817
842
|
this.onChange(_schedule);
|
|
818
843
|
}}
|
|
819
|
-
|
|
844
|
+
slotProps={{
|
|
845
|
+
inputLabel: { shrink: true },
|
|
846
|
+
}}
|
|
820
847
|
margin="normal"
|
|
821
848
|
/>
|
|
822
849
|
</div>
|
|
@@ -906,7 +933,9 @@ class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
906
933
|
e.target.value,
|
|
907
934
|
);
|
|
908
935
|
}}
|
|
909
|
-
|
|
936
|
+
slotProps={{
|
|
937
|
+
inputLabel: { shrink: true },
|
|
938
|
+
}}
|
|
910
939
|
label={I18n.t('sch_at')}
|
|
911
940
|
margin="normal"
|
|
912
941
|
/>
|
|
@@ -1882,7 +1911,9 @@ class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
1882
1911
|
e.target.value,
|
|
1883
1912
|
);
|
|
1884
1913
|
}}
|
|
1885
|
-
|
|
1914
|
+
slotProps={{
|
|
1915
|
+
inputLabel: { shrink: true },
|
|
1916
|
+
}}
|
|
1886
1917
|
margin="normal"
|
|
1887
1918
|
/>
|
|
1888
1919
|
<FormControlLabel
|
|
@@ -1931,7 +1962,9 @@ class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
1931
1962
|
e.target.value,
|
|
1932
1963
|
);
|
|
1933
1964
|
}}
|
|
1934
|
-
|
|
1965
|
+
slotProps={{
|
|
1966
|
+
inputLabel: { shrink: true },
|
|
1967
|
+
}}
|
|
1935
1968
|
margin="normal"
|
|
1936
1969
|
/>
|
|
1937
1970
|
)}
|
|
@@ -77,6 +77,7 @@ class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState>
|
|
|
77
77
|
<DialogActions>
|
|
78
78
|
<Button
|
|
79
79
|
variant="contained"
|
|
80
|
+
disabled={!this.state.cron || this.state.cron.includes('_')}
|
|
80
81
|
onClick={() => this.handleOk()}
|
|
81
82
|
color="primary"
|
|
82
83
|
startIcon={<IconOk />}
|
package/src/GenericApp.tsx
CHANGED
|
@@ -254,7 +254,7 @@ class GenericApp<
|
|
|
254
254
|
};
|
|
255
255
|
|
|
256
256
|
// merge together
|
|
257
|
-
if (settings
|
|
257
|
+
if (settings?.translations) {
|
|
258
258
|
Object.keys(settings.translations).forEach(lang => {
|
|
259
259
|
if (settings.translations) {
|
|
260
260
|
translations[lang as ioBroker.Languages] = Object.assign(
|