iobroker.telegram-menu 0.0.1 → 0.0.2
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/README.md +8 -78
- package/admin/i18n/de/translations.json +18 -0
- package/admin/i18n/en/translations.json +18 -0
- package/admin/i18n/es/translations.json +18 -0
- package/admin/i18n/fr/translations.json +18 -0
- package/admin/i18n/it/translations.json +18 -0
- package/admin/i18n/nl/translations.json +18 -0
- package/admin/i18n/pl/translations.json +18 -0
- package/admin/i18n/pt/translations.json +18 -0
- package/admin/i18n/ru/translations.json +18 -0
- package/admin/i18n/uk/translations.json +18 -0
- package/admin/i18n/zh-cn/translations.json +18 -0
- package/admin/img/info-big.png +2580 -0
- package/admin/index_m.html +400 -105
- package/admin/js/component.js +159 -13
- package/admin/js/main.js +270 -39
- package/admin/style.css +49 -12
- package/admin/telegram-menu.png +0 -0
- package/admin/words.js +220 -43
- package/io-package.json +139 -115
- package/lib/js/action.js +150 -0
- package/lib/js/telegram.js +55 -0
- package/main.js +366 -170
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|

|
|
2
|
+
|
|
2
3
|
# ioBroker.telegram-menu
|
|
3
4
|
|
|
4
5
|
[](https://www.npmjs.com/package/iobroker.telegram-menu)
|
|
@@ -14,92 +15,21 @@
|
|
|
14
15
|
|
|
15
16
|
Easily create Telegram Menus
|
|
16
17
|
|
|
17
|
-
##
|
|
18
|
-
This section is intended for the developer. It can be deleted later.
|
|
19
|
-
|
|
20
|
-
### DISCLAIMER
|
|
21
|
-
|
|
22
|
-
Please make sure that you consider copyrights and trademarks when you use names or logos of a company and add a disclaimer to your README.
|
|
23
|
-
You can check other adapters for examples or ask in the developer community. Using a name or logo of a company without permission may cause legal problems for you.
|
|
24
|
-
|
|
25
|
-
### Getting started
|
|
26
|
-
|
|
27
|
-
You are almost done, only a few steps left:
|
|
28
|
-
1. Create a new repository on GitHub with the name `ioBroker.telegram-menu`
|
|
29
|
-
|
|
30
|
-
1. Push all files to the GitHub repo. The creator has already set up the local repository for you:
|
|
31
|
-
```bash
|
|
32
|
-
git push origin main
|
|
33
|
-
```
|
|
34
|
-
1. Add a new secret under https://github.com/MiRo1310/ioBroker.telegram-menu/settings/secrets. It must be named `AUTO_MERGE_TOKEN` and contain a personal access token with push access to the repository, e.g. yours. You can create a new token under https://github.com/settings/tokens.
|
|
35
|
-
|
|
36
|
-
1. Head over to [main.js](main.js) and start programming!
|
|
37
|
-
|
|
38
|
-
### Best Practices
|
|
39
|
-
We've collected some [best practices](https://github.com/ioBroker/ioBroker.repositories#development-and-coding-best-practices) regarding ioBroker development and coding in general. If you're new to ioBroker or Node.js, you should
|
|
40
|
-
check them out. If you're already experienced, you should also take a look at them - you might learn something new :)
|
|
41
|
-
|
|
42
|
-
### Scripts in `package.json`
|
|
43
|
-
Several npm scripts are predefined for your convenience. You can run them using `npm run <scriptname>`
|
|
44
|
-
| Script name | Description |
|
|
45
|
-
|-------------|-------------|
|
|
46
|
-
| `test:js` | Executes the tests you defined in `*.test.js` files. |
|
|
47
|
-
| `test:package` | Ensures your `package.json` and `io-package.json` are valid. |
|
|
48
|
-
| `test:integration` | Tests the adapter startup with an actual instance of ioBroker. |
|
|
49
|
-
| `test` | Performs a minimal test run on package files and your tests. |
|
|
50
|
-
| `check` | Performs a type-check on your code (without compiling anything). |
|
|
51
|
-
| `lint` | Runs `ESLint` to check your code for formatting errors and potential bugs. |
|
|
52
|
-
| `translate` | Translates texts in your adapter to all required languages, see [`@iobroker/adapter-dev`](https://github.com/ioBroker/adapter-dev#manage-translations) for more details. |
|
|
53
|
-
| `release` | Creates a new release, see [`@alcalzone/release-script`](https://github.com/AlCalzone/release-script#usage) for more details. |
|
|
54
|
-
|
|
55
|
-
### Writing tests
|
|
56
|
-
When done right, testing code is invaluable, because it gives you the
|
|
57
|
-
confidence to change your code while knowing exactly if and when
|
|
58
|
-
something breaks. A good read on the topic of test-driven development
|
|
59
|
-
is https://hackernoon.com/introduction-to-test-driven-development-tdd-61a13bc92d92.
|
|
60
|
-
Although writing tests before the code might seem strange at first, but it has very
|
|
61
|
-
clear upsides.
|
|
62
|
-
|
|
63
|
-
The template provides you with basic tests for the adapter startup and package files.
|
|
64
|
-
It is recommended that you add your own tests into the mix.
|
|
65
|
-
|
|
66
|
-
### Publishing the adapter
|
|
67
|
-
Using GitHub Actions, you can enable automatic releases on npm whenever you push a new git tag that matches the form
|
|
68
|
-
`v<major>.<minor>.<patch>`. We **strongly recommend** that you do. The necessary steps are described in `.github/workflows/test-and-release.yml`.
|
|
69
|
-
|
|
70
|
-
Since you installed the release script, you can create a new
|
|
71
|
-
release simply by calling:
|
|
72
|
-
```bash
|
|
73
|
-
npm run release
|
|
74
|
-
```
|
|
75
|
-
Additional command line options for the release script are explained in the
|
|
76
|
-
[release-script documentation](https://github.com/AlCalzone/release-script#command-line).
|
|
77
|
-
|
|
78
|
-
To get your adapter released in ioBroker, please refer to the documentation
|
|
79
|
-
of [ioBroker.repositories](https://github.com/ioBroker/ioBroker.repositories#requirements-for-adapter-to-get-added-to-the-latest-repository).
|
|
80
|
-
|
|
81
|
-
### Test the adapter manually with dev-server
|
|
82
|
-
Since you set up `dev-server`, you can use it to run, test and debug your adapter.
|
|
83
|
-
|
|
84
|
-
You may start `dev-server` by calling from your dev directory:
|
|
85
|
-
```bash
|
|
86
|
-
dev-server watch
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
The ioBroker.admin interface will then be available at http://localhost:8081/
|
|
90
|
-
|
|
91
|
-
Please refer to the [`dev-server` documentation](https://github.com/ioBroker/dev-server#command-line) for more details.
|
|
18
|
+
## Discrition
|
|
92
19
|
|
|
93
20
|
## Changelog
|
|
21
|
+
|
|
94
22
|
<!--
|
|
95
23
|
Placeholder for the next version (at the beginning of the line):
|
|
96
24
|
### **WORK IN PROGRESS**
|
|
97
25
|
-->
|
|
98
26
|
|
|
99
|
-
###
|
|
100
|
-
|
|
27
|
+
### 0.0.2 (2023-04-16)
|
|
28
|
+
|
|
29
|
+
- (MiRo1310) initial release
|
|
101
30
|
|
|
102
31
|
## License
|
|
32
|
+
|
|
103
33
|
MIT License
|
|
104
34
|
|
|
105
35
|
Copyright (c) 2023 MiRo1310 <michael.roling@gmx.de>
|
|
@@ -120,4 +50,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
120
50
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
121
51
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
122
52
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
123
|
-
SOFTWARE.
|
|
53
|
+
SOFTWARE.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Aktion",
|
|
3
|
+
"Add": "hinzufügen",
|
|
4
|
+
"Add new Navigation": "Neue Navigation hinzufügen",
|
|
5
|
+
"Add new Username": "Neuen Benutzernamen hinzufügen",
|
|
6
|
+
"All User from Telegram, seperate with": "Alle Benutzer von Telegram, getrennt mit",
|
|
7
|
+
"Call": "Forderung",
|
|
8
|
+
"Cancel": "Stornieren",
|
|
9
|
+
"Close": "Schließen",
|
|
10
|
+
"Global User activ": "Globaler Benutzer aktiv",
|
|
11
|
+
"Instanze": "Instanz",
|
|
12
|
+
"Navigation": "Navigation",
|
|
13
|
+
"Save": "Speichern",
|
|
14
|
+
"Select": "Wählen",
|
|
15
|
+
"Settings": "Einstellungen",
|
|
16
|
+
"Startside": "Startseite",
|
|
17
|
+
"telegram-menu adapter settings": "Adaptereinstellungen für Telegram-Menü"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Action",
|
|
3
|
+
"Add": "add",
|
|
4
|
+
"Add new Navigation": "Add new Navigation",
|
|
5
|
+
"Add new Username": "Add new Username",
|
|
6
|
+
"All User from Telegram, seperate with": "All User from Telegram, seperate with",
|
|
7
|
+
"Call": "Call",
|
|
8
|
+
"Cancel": "Cancel",
|
|
9
|
+
"Close": "Close",
|
|
10
|
+
"Global User activ": "Global user activ",
|
|
11
|
+
"Instanze": "Instanze",
|
|
12
|
+
"Navigation": "Navigation",
|
|
13
|
+
"Save": "Save",
|
|
14
|
+
"Select": "Select",
|
|
15
|
+
"Settings": "Settings",
|
|
16
|
+
"Startside": "Startside",
|
|
17
|
+
"telegram-menu adapter settings": "Adapter settings for telegram-menu"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Acción",
|
|
3
|
+
"Add": "agregar",
|
|
4
|
+
"Add new Navigation": "Agregar nueva navegación",
|
|
5
|
+
"Add new Username": "Agregar nuevo nombre de usuario",
|
|
6
|
+
"All User from Telegram, seperate with": "Todos los usuarios de Telegram, separados con",
|
|
7
|
+
"Call": "Llamar",
|
|
8
|
+
"Cancel": "Cancelar",
|
|
9
|
+
"Close": "Cerca",
|
|
10
|
+
"Global User activ": "Actividad de usuario global",
|
|
11
|
+
"Instanze": "Instancia",
|
|
12
|
+
"Navigation": "Navegación",
|
|
13
|
+
"Save": "Ahorrar",
|
|
14
|
+
"Select": "Seleccionar",
|
|
15
|
+
"Settings": "Ajustes",
|
|
16
|
+
"Startside": "Lado de salida",
|
|
17
|
+
"telegram-menu adapter settings": "Configuración del adaptador para el menú de telegramas"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Action",
|
|
3
|
+
"Add": "ajouter",
|
|
4
|
+
"Add new Navigation": "Ajouter une nouvelle navigation",
|
|
5
|
+
"Add new Username": "Ajouter un nouveau nom d'utilisateur",
|
|
6
|
+
"All User from Telegram, seperate with": "Tous les utilisateurs de Telegram, séparés par",
|
|
7
|
+
"Call": "Appel",
|
|
8
|
+
"Cancel": "Annuler",
|
|
9
|
+
"Close": "Fermer",
|
|
10
|
+
"Global User activ": "Activation globale de l'utilisateur",
|
|
11
|
+
"Instanze": "Instantané",
|
|
12
|
+
"Navigation": "La navigation",
|
|
13
|
+
"Save": "Sauvegarder",
|
|
14
|
+
"Select": "Sélectionner",
|
|
15
|
+
"Settings": "Paramètres",
|
|
16
|
+
"Startside": "Côté départ",
|
|
17
|
+
"telegram-menu adapter settings": "Paramètres de l'adaptateur pour le menu télégramme"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Azione",
|
|
3
|
+
"Add": "aggiungere",
|
|
4
|
+
"Add new Navigation": "Aggiungi nuova navigazione",
|
|
5
|
+
"Add new Username": "Aggiungi nuovo nome utente",
|
|
6
|
+
"All User from Telegram, seperate with": "Tutti gli utenti di Telegram, separati da",
|
|
7
|
+
"Call": "Chiamata",
|
|
8
|
+
"Cancel": "Annulla",
|
|
9
|
+
"Close": "Vicino",
|
|
10
|
+
"Global User activ": "Utente globale attivo",
|
|
11
|
+
"Instanze": "Istanza",
|
|
12
|
+
"Navigation": "Navigazione",
|
|
13
|
+
"Save": "Salva",
|
|
14
|
+
"Select": "Selezionare",
|
|
15
|
+
"Settings": "Impostazioni",
|
|
16
|
+
"Startside": "Lato iniziale",
|
|
17
|
+
"telegram-menu adapter settings": "Impostazioni dell'adattatore per il menu del telegramma"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Actie",
|
|
3
|
+
"Add": "toevoegen",
|
|
4
|
+
"Add new Navigation": "Nieuwe navigatie toevoegen",
|
|
5
|
+
"Add new Username": "Nieuwe gebruikersnaam toevoegen",
|
|
6
|
+
"All User from Telegram, seperate with": "Alle gebruikers van Telegram, gescheiden met",
|
|
7
|
+
"Call": "Telefoongesprek",
|
|
8
|
+
"Cancel": "Annuleren",
|
|
9
|
+
"Close": "Dichtbij",
|
|
10
|
+
"Global User activ": "Globale gebruiker actief",
|
|
11
|
+
"Instanze": "Instanze",
|
|
12
|
+
"Navigation": "Navigatie",
|
|
13
|
+
"Save": "Redden",
|
|
14
|
+
"Select": "Selecteer",
|
|
15
|
+
"Settings": "Instellingen",
|
|
16
|
+
"Startside": "Startzijde",
|
|
17
|
+
"telegram-menu adapter settings": "Adapterinstellingen voor telegrammenu"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Działanie",
|
|
3
|
+
"Add": "dodać",
|
|
4
|
+
"Add new Navigation": "Dodaj nową Nawigację",
|
|
5
|
+
"Add new Username": "Dodaj nową nazwę użytkownika",
|
|
6
|
+
"All User from Telegram, seperate with": "Wszyscy użytkownicy z Telegramu, oddzielni od",
|
|
7
|
+
"Call": "Dzwonić",
|
|
8
|
+
"Cancel": "Anulować",
|
|
9
|
+
"Close": "Zamknąć",
|
|
10
|
+
"Global User activ": "Globalna aktywność użytkowników",
|
|
11
|
+
"Instanze": "Instancja",
|
|
12
|
+
"Navigation": "Nawigacja",
|
|
13
|
+
"Save": "Ratować",
|
|
14
|
+
"Select": "Wybierać",
|
|
15
|
+
"Settings": "Ustawienia",
|
|
16
|
+
"Startside": "Strona startowa",
|
|
17
|
+
"telegram-menu adapter settings": "Ustawienia adaptera dla menu telegramu"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Ação",
|
|
3
|
+
"Add": "adicionar",
|
|
4
|
+
"Add new Navigation": "Adicionar nova navegação",
|
|
5
|
+
"Add new Username": "Adicionar novo nome de usuário",
|
|
6
|
+
"All User from Telegram, seperate with": "Todos os usuários do Telegram, separados por",
|
|
7
|
+
"Call": "Chamar",
|
|
8
|
+
"Cancel": "Cancelar",
|
|
9
|
+
"Close": "Fechar",
|
|
10
|
+
"Global User activ": "Atividade global do usuário",
|
|
11
|
+
"Instanze": "instância",
|
|
12
|
+
"Navigation": "Navegação",
|
|
13
|
+
"Save": "Salvar",
|
|
14
|
+
"Select": "Selecione",
|
|
15
|
+
"Settings": "Configurações",
|
|
16
|
+
"Startside": "Startside",
|
|
17
|
+
"telegram-menu adapter settings": "Configurações do adaptador para menu de telegrama"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Действие",
|
|
3
|
+
"Add": "добавлять",
|
|
4
|
+
"Add new Navigation": "Добавить новую навигацию",
|
|
5
|
+
"Add new Username": "Добавить новое имя пользователя",
|
|
6
|
+
"All User from Telegram, seperate with": "Все пользователи из Telegram, отдельно от",
|
|
7
|
+
"Call": "Вызов",
|
|
8
|
+
"Cancel": "Отмена",
|
|
9
|
+
"Close": "Закрывать",
|
|
10
|
+
"Global User activ": "Активность глобального пользователя",
|
|
11
|
+
"Instanze": "Инстанц",
|
|
12
|
+
"Navigation": "Навигация",
|
|
13
|
+
"Save": "Сохранять",
|
|
14
|
+
"Select": "Выбирать",
|
|
15
|
+
"Settings": "Настройки",
|
|
16
|
+
"Startside": "Стартовая сторона",
|
|
17
|
+
"telegram-menu adapter settings": "Настройки адаптера для телеграм-меню"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "Дія",
|
|
3
|
+
"Add": "додати",
|
|
4
|
+
"Add new Navigation": "Додати нову навігацію",
|
|
5
|
+
"Add new Username": "Додайте нове ім'я користувача",
|
|
6
|
+
"All User from Telegram, seperate with": "Всі користувачі з Telegram, окремо від",
|
|
7
|
+
"Call": "Телефонуйте",
|
|
8
|
+
"Cancel": "Скасувати",
|
|
9
|
+
"Close": "Закрити",
|
|
10
|
+
"Global User activ": "Глобальна активність користувачів",
|
|
11
|
+
"Instanze": "Instanze",
|
|
12
|
+
"Navigation": "Навігація",
|
|
13
|
+
"Save": "зберегти",
|
|
14
|
+
"Select": "Виберіть",
|
|
15
|
+
"Settings": "Налаштування",
|
|
16
|
+
"Startside": "Стартова сторона",
|
|
17
|
+
"telegram-menu adapter settings": "Налаштування адаптера для telegram-меню"
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Action": "行动",
|
|
3
|
+
"Add": "添加",
|
|
4
|
+
"Add new Navigation": "添加新导航",
|
|
5
|
+
"Add new Username": "添加新用户名",
|
|
6
|
+
"All User from Telegram, seperate with": "来自 Telegram 的所有用户,与",
|
|
7
|
+
"Call": "称呼",
|
|
8
|
+
"Cancel": "取消",
|
|
9
|
+
"Close": "关闭",
|
|
10
|
+
"Global User activ": "全球用户活跃度",
|
|
11
|
+
"Instanze": "瞬间",
|
|
12
|
+
"Navigation": "导航",
|
|
13
|
+
"Save": "节省",
|
|
14
|
+
"Select": "选择",
|
|
15
|
+
"Settings": "设置",
|
|
16
|
+
"Startside": "起跑线",
|
|
17
|
+
"telegram-menu adapter settings": "电报菜单的适配器设置"
|
|
18
|
+
}
|