Skip to content

Commit

Permalink
bug fixed and update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
MiRo1310 committed May 12, 2024
1 parent 245060d commit 12c2e60
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 52 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
admin/words.js
admin/build/
build/
admin/GenericApp.*
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ You can create different groups with separate menus, and then assign users to th
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### 1.7.0 (2024-05-11)


### **WORK IN PROGRESS**

- Switched to typescript

Expand Down
1 change: 1 addition & 0 deletions admin/GenericApp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ declare namespace GenericApp {
let encryptedFields: PropTypes.Requireable<any[]>;
let bottomButtons: PropTypes.Requireable<boolean>;
let Connection: PropTypes.Requireable<object>;

}
}
import Router from '@iobroker/adapter-react-v5/Components/Router';
Expand Down
2 changes: 1 addition & 1 deletion admin/GenericApp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion admin/src/components/popupCards/HelperCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import TableHead from "@mui/material/TableHead";
import TableRow from "@mui/material/TableRow";
import Paper from "@mui/material/Paper";
import { I18n, SelectID } from "@iobroker/adapter-react-v5";
import Input from "../btn-Input/input";
import BtnSmallAdd from "../btn-Input/btn-small-add";
import BtnSmallSearch from "../btn-Input/btn-small-search";
import Textarea from "../btn-Input/textarea";
Expand Down
2 changes: 1 addition & 1 deletion admin/src/pages/TabAction/Action/ActionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class ActionCard extends Component<PropsActionCard, StateActionCard>{
<HelperCard
data={this.props.data}
helper={helperText}
name="nav"
name="action"
val={this.state.helperTextFor}
nav={this.state.nav}
text={this.state.text}
Expand Down
10 changes: 5 additions & 5 deletions admin/src/pages/TabAction/Action/TableDND/TableDndAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import {
} from "../../../../lib/dragNDrop.js";
import { getElementIcon } from "../../../../lib/actionUtils.js";

function createData(entrysOfParentComponent, element) {
function createData(entriesOfParentComponent, element) {
const obj = {};
entrysOfParentComponent.forEach((entry) => {
entriesOfParentComponent.forEach((entry) => {
obj[entry.name] = element[entry.name];
});
return obj;
Expand All @@ -41,11 +41,11 @@ class TableDndAction extends Component<PropsTableDndAction, StateTableDndAction>
const action = this.props.tableData;
const activeMenu = this.props.activeMenu;
if (!action) return;
let elemente = action[activeMenu][this.props.subcard];
let elements = action[activeMenu][this.props.subcard];

const rows:Object[] = [];
if (elemente === undefined) return;
for (let entry of elemente) {
if (elements === undefined) return;
for (let entry of elements) {
rows.push(createData(this.props.entrys, entry));
}
this.setState({ rows: rows });
Expand Down
2 changes: 1 addition & 1 deletion admin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"noImplicitAny": false,
"lib": ["es2018", "DOM"],
"jsx": "react",
"removeComments": true,
"removeComments": true,
},

"include": [
Expand Down
67 changes: 45 additions & 22 deletions build/io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "telegram-menu",
"version": "1.6.3",
"version": "1.7.0",
"news": {
"1.7.0": {
"en": "Switched to typescript",
"de": "Umgestellt in die Schrift",
"ru": "Переключение на типscript",
"pt": "Mudado para o typescript",
"nl": "Overgeschakeld naar typescript",
"fr": "Passé au dactylographié",
"it": "Passato alla scrittura",
"es": "Interruptor a tiposcript",
"pl": "Przełączono na maszynopis",
"uk": "Перемкнено до типу",
"zh-cn": "切换到打字符"
},
"1.6.3": {
"en": "Bug in copy card fixed\n#104 HTTP Request Beta\n#111 status Value in dynamicSwitch\n#112 change value\n**_Change!!!_** menu:deleteAll removes automatic Request Ids which are older than 48h from list. The list is completely deleted once during the update\nFixed menu:number with negativ Values, see the documentation",
"de": "Fehler in der Kopierkarte behoben\n#104 HTTP Frage stellen\n#111 Status Wert in dynamicSwitch\n#112 änderungswert\n**_Change!!!_** Menü:löschen Alle entfernt automatische Request Ids, die älter als 48h sind aus der Liste. Die Liste wird während des Updates vollständig gelöscht\nFixed Menu:Nummer mit Negativ Werte, siehe Dokumentation",
Expand Down Expand Up @@ -80,19 +93,6 @@
"pl": "wysyłać chart\n93 Scrollbar in Menus (ang.)\n#89 powraca do menu, gdzie ustawiono ustawę. Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Value\nusunąć wszystkie komunikaty",
"uk": "надіслати echarts\n#93 Скролбар в меню\n#89 повернутися до меню, встановивши набір Головна Ціна\nвидалити всі повідомлення від Bot",
"zh-cn": "发 术\n#93 Scrollbar in Menus\n第89号法案通过设立男子来回男性。 动态 价值\n删除Bot的所有信"
},
"1.4.0": {
"en": "#88 Menu with dynamic Values\n#87 Event opens a menu",
"de": "#88 Menü mit dynamischen Werten\n#87 Veranstaltung öffnet ein Menü",
"ru": "#88 Меню с динамическими ценностями\n#87 Событие открывает меню",
"pt": "#88 Menu com valores dinâmicos\n#87 Evento abre um menu",
"nl": "88 Menu met dynamische Values\n♪87 Event opent een menu",
"fr": "#88 Menu avec des valeurs dynamiques\n#87 Event opens a menu",
"it": "#88 Menu con valori dinamici\n#87 Evento apre un menu",
"es": "#88 Menu con valores dinámicos\n#87 Evento abre un menú",
"pl": "#88 Menu z dynamicznym Valuesem\n#87 wydarzenia otwierają menu",
"uk": "#88 Меню з динамічними значеннями\n#87 Захід відкриває меню",
"zh-cn": "行动88 具有动态价值的男子\n第87号活动打开了一名男子。"
}
},
"titleLang": {
Expand Down Expand Up @@ -121,8 +121,13 @@
"zh-cn": "轻松创建电报菜单",
"uk": "Легко створюйте меню Telegram"
},
"authors": ["MiRo1310 <[email protected]>"],
"keywords": ["telegram", "menu"],
"authors": [
"MiRo1310 <[email protected]>"
],
"keywords": [
"telegram",
"menu"
],
"license": "MIT",
"platform": "Javascript/Node.js",
"main": "build/src/main.js",
Expand Down Expand Up @@ -155,7 +160,10 @@
{
"condition": {
"operand": "and",
"rules": ["oldVersion<1.0.0", "newVersion>=1.0.0"]
"rules": [
"oldVersion<1.0.0",
"newVersion>=1.0.0"
]
},
"title": {
"en": "Important notice!",
Expand Down Expand Up @@ -184,12 +192,18 @@
"zh-cn": "新版本1.0.x 删除了包装:侵入和包装:从确认文本中删除,为它制作了一个检查站箱。 如果不失去某些数据,就不可能到以前的版本。 请提供数据,说明如何更新。."
},
"level": "warn",
"buttons": ["agree", "cancel"]
"buttons": [
"agree",
"cancel"
]
},
{
"condition": {
"operand": "and",
"rules": ["oldVersion<1.6.1", "newVersion>=1.6.1"]
"rules": [
"oldVersion<1.6.1",
"newVersion>=1.6.1"
]
},
"title": {
"en": "Important notice!",
Expand Down Expand Up @@ -218,12 +232,18 @@
"zh-cn": "突破变革! #102菜单:dynSwitch带有浮点数,如果已经全部使用,必须手动调整函数. 文档中的更多信息"
},
"level": "warn",
"buttons": ["agree", "cancel"]
"buttons": [
"agree",
"cancel"
]
},
{
"condition": {
"operand": "and",
"rules": ["oldVersion<1.6.3", "newVersion>=1.6.4"]
"rules": [
"oldVersion<1.6.3",
"newVersion>=1.6.4"
]
},
"title": {
"en": "Important notice!",
Expand Down Expand Up @@ -252,7 +272,10 @@
"zh-cn": "突破变化! 至少需要节点Js 18"
},
"level": "warn",
"buttons": ["agree", "cancel"]
"buttons": [
"agree",
"cancel"
]
}
]
},
Expand Down
4 changes: 3 additions & 1 deletion build/src/lib/backend/telegram.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/src/lib/backend/telegram.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 2 additions & 15 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
{
"common": {
"name": "telegram-menu",
"version": "1.7.0",
"news": {
"1.7.0": {
"en": "Switched to typescript",
"de": "Umgestellt in die Schrift",
"ru": "Переключение на типscript",
"pt": "Mudado para o typescript",
"nl": "Overgeschakeld naar typescript",
"fr": "Passé au dactylographié",
"it": "Passato alla scrittura",
"es": "Interruptor a tiposcript",
"pl": "Przełączono na maszynopis",
"uk": "Перемкнено до типу",
"zh-cn": "切换到打字符"
},
"version": "1.6.9",
"news": {
"1.6.3": {
"en": "Bug in copy card fixed\n#104 HTTP Request Beta\n#111 status Value in dynamicSwitch\n#112 change value\n**_Change!!!_** menu:deleteAll removes automatic Request Ids which are older than 48h from list. The list is completely deleted once during the update\nFixed menu:number with negativ Values, see the documentation",
"de": "Fehler in der Kopierkarte behoben\n#104 HTTP Frage stellen\n#111 Status Wert in dynamicSwitch\n#112 änderungswert\n**_Change!!!_** Menü:löschen Alle entfernt automatische Request Ids, die älter als 48h sind aus der Liste. Die Liste wird während des Updates vollständig gelöscht\nFixed Menu:Nummer mit Negativ Werte, siehe Dokumentation",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.telegram-menu",
"version": "1.7.0",
"version": "1.6.9",
"description": "Easily create Telegram Menus",
"author": {
"name": "MiRo1310",
Expand Down
Loading

0 comments on commit 12c2e60

Please sign in to comment.