iobroker.vis-icontwo 1.18.5 → 1.18.7
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 +13 -13
- package/io-package.json +13 -13
- package/package.json +3 -2
- package/lib/adapter-config.d.ts +0 -16
- package/lib/tools.js +0 -91
package/README.md
CHANGED
|
@@ -59,27 +59,27 @@ Falls Dir unsere Arbeit gefällt und Du uns unterstützen möchtest, wir freuen
|
|
|
59
59
|
## Changelog / Änderungsprotokoll
|
|
60
60
|
<!--
|
|
61
61
|
### **WORK IN PROGRESS**
|
|
62
|
-
-->
|
|
63
|
-
### 1.18.
|
|
64
|
-
- (skvarel)
|
|
65
|
-
|
|
62
|
+
-->
|
|
63
|
+
### 1.18.7 (2026-01-31)
|
|
64
|
+
- (skvarel) Bugfix
|
|
65
|
+
|
|
66
66
|
### 1.18.0
|
|
67
67
|
|
|
68
|
-
• Neue Icons hinzugefügt (Network, Printer & People)
|
|
69
|
-
|
|
68
|
+
• Neue Icons hinzugefügt (Network, Printer & People)
|
|
69
|
+
|
|
70
70
|
### 1.17.0
|
|
71
71
|
|
|
72
72
|
• Neue Icons hinzugefügt (Devices/battery)
|
|
73
|
-
• Neue Icons hinzugefügt (Alarm/camera)
|
|
74
|
-
|
|
73
|
+
• Neue Icons hinzugefügt (Alarm/camera)
|
|
74
|
+
|
|
75
75
|
### 1.16.0
|
|
76
76
|
|
|
77
|
-
• Neue Icons hinzugefügt (Backgrounds/wood)
|
|
78
|
-
|
|
77
|
+
• Neue Icons hinzugefügt (Backgrounds/wood)
|
|
78
|
+
|
|
79
79
|
### 1.15.0
|
|
80
80
|
|
|
81
|
-
• Neue Icons hinzugefügt (Devices/mower)
|
|
82
|
-
|
|
81
|
+
• Neue Icons hinzugefügt (Devices/mower)
|
|
82
|
+
|
|
83
83
|
## Older changes
|
|
84
84
|
- [CHANGELOG_OLD.md](CHANGELOG_OLD.md)
|
|
85
85
|
|
|
@@ -109,4 +109,4 @@ SOFTWARE.
|
|
|
109
109
|
|
|
110
110
|
Icons from Icons8 https://icons8.com/
|
|
111
111
|
|
|
112
|
-
Copyright (c) 2025-2026 [jkvarel](https://github.com/jkvarel) und [skvarel](https://github.com/skvarel) von [inventwo](https://github.com/inventwo)
|
|
112
|
+
Copyright (c) 2025-2026 [jkvarel](https://github.com/jkvarel) und [skvarel](https://github.com/skvarel) von [inventwo](https://github.com/inventwo)
|
package/io-package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "vis-icontwo",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.6",
|
|
5
5
|
"news": {
|
|
6
|
-
"1.18.
|
|
7
|
-
"en": "
|
|
8
|
-
"de": "
|
|
9
|
-
"ru": "
|
|
10
|
-
"pt": "
|
|
11
|
-
"nl": "
|
|
12
|
-
"fr": "
|
|
13
|
-
"it": "
|
|
14
|
-
"es": "
|
|
15
|
-
"pl": "
|
|
16
|
-
"uk": "
|
|
17
|
-
"zh-cn": "
|
|
6
|
+
"1.18.7": {
|
|
7
|
+
"en": "Bugfix",
|
|
8
|
+
"de": "Bugfix",
|
|
9
|
+
"ru": "Исправлена ошибка",
|
|
10
|
+
"pt": "Correção de bug",
|
|
11
|
+
"nl": "Bugfix",
|
|
12
|
+
"fr": "Correction de bug",
|
|
13
|
+
"it": "Correzione di bug",
|
|
14
|
+
"es": "Corrección de errores",
|
|
15
|
+
"pl": "Naprawiono błąd",
|
|
16
|
+
"uk": "Виправлення помилки",
|
|
17
|
+
"zh-cn": "错误修复"
|
|
18
18
|
},
|
|
19
19
|
"1.18.0": {
|
|
20
20
|
"en": "new icons added",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.vis-icontwo",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.7",
|
|
4
4
|
"description": "inventwo Icon Set",
|
|
5
5
|
"author": "skvarel <skvarel@inventwo.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"lib/",
|
|
16
16
|
"www/",
|
|
17
17
|
"io-package.json",
|
|
18
|
-
"LICENSE"
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"README.md"
|
|
19
20
|
],
|
|
20
21
|
"keywords": [
|
|
21
22
|
"ioBroker",
|
package/lib/adapter-config.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// This file extends the AdapterConfig type from "@types/ioBroker"
|
|
2
|
-
// using the actual properties present in io-package.json
|
|
3
|
-
// in order to provide typings for adapter.config properties
|
|
4
|
-
|
|
5
|
-
import { native } from "../io-package.json";
|
|
6
|
-
|
|
7
|
-
type _AdapterConfig = typeof native;
|
|
8
|
-
|
|
9
|
-
// Augment the globally declared type ioBroker.AdapterConfig
|
|
10
|
-
declare global {
|
|
11
|
-
namespace ioBroker {
|
|
12
|
-
interface AdapterConfig extends _AdapterConfig {
|
|
13
|
-
// Do not enter anything here!
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
package/lib/tools.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
const axios = require("axios");
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Tests whether the given variable is a real object and not an Array
|
|
5
|
-
* @param {any} it The variable to test
|
|
6
|
-
* @returns {it is Record<string, any>}
|
|
7
|
-
*/
|
|
8
|
-
function isObject(it) {
|
|
9
|
-
// This is necessary because:
|
|
10
|
-
// typeof null === 'object'
|
|
11
|
-
// typeof [] === 'object'
|
|
12
|
-
// [] instanceof Object === true
|
|
13
|
-
return Object.prototype.toString.call(it) === "[object Object]";
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Tests whether the given variable is really an Array
|
|
18
|
-
* @param {any} it The variable to test
|
|
19
|
-
* @returns {it is any[]}
|
|
20
|
-
*/
|
|
21
|
-
function isArray(it) {
|
|
22
|
-
if (typeof Array.isArray === "function") return Array.isArray(it);
|
|
23
|
-
return Object.prototype.toString.call(it) === "[object Array]";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Translates text to the target language. Automatically chooses the right translation API.
|
|
28
|
-
* @param {string} text The text to translate
|
|
29
|
-
* @param {string} targetLang The target languate
|
|
30
|
-
* @param {string} [yandexApiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
|
|
31
|
-
* @returns {Promise<string>}
|
|
32
|
-
*/
|
|
33
|
-
async function translateText(text, targetLang, yandexApiKey) {
|
|
34
|
-
if (targetLang === "en") {
|
|
35
|
-
return text;
|
|
36
|
-
}
|
|
37
|
-
if (yandexApiKey) {
|
|
38
|
-
return await translateYandex(text, targetLang, yandexApiKey);
|
|
39
|
-
} else {
|
|
40
|
-
return await translateGoogle(text, targetLang);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Translates text with Yandex API
|
|
46
|
-
* @param {string} text The text to translate
|
|
47
|
-
* @param {string} targetLang The target languate
|
|
48
|
-
* @param {string} [apiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
|
|
49
|
-
* @returns {Promise<string>}
|
|
50
|
-
*/
|
|
51
|
-
async function translateYandex(text, targetLang, apiKey) {
|
|
52
|
-
if (targetLang === "zh-cn") {
|
|
53
|
-
targetLang = "zh";
|
|
54
|
-
}
|
|
55
|
-
try {
|
|
56
|
-
const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${apiKey}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`;
|
|
57
|
-
const response = await axios({url, timeout: 15000});
|
|
58
|
-
if (response.data && response.data["text"]) {
|
|
59
|
-
return response.data["text"][0];
|
|
60
|
-
}
|
|
61
|
-
throw new Error("Invalid response for translate request");
|
|
62
|
-
} catch (e) {
|
|
63
|
-
throw new Error(`Could not translate to "${targetLang}": ${e}`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Translates text with Google API
|
|
69
|
-
* @param {string} text The text to translate
|
|
70
|
-
* @param {string} targetLang The target languate
|
|
71
|
-
* @returns {Promise<string>}
|
|
72
|
-
*/
|
|
73
|
-
async function translateGoogle(text, targetLang) {
|
|
74
|
-
try {
|
|
75
|
-
const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`;
|
|
76
|
-
const response = await axios({url, timeout: 15000});
|
|
77
|
-
if (isArray(response.data)) {
|
|
78
|
-
// we got a valid response
|
|
79
|
-
return response.data[0][0][0];
|
|
80
|
-
}
|
|
81
|
-
throw new Error("Invalid response for translate request");
|
|
82
|
-
} catch (e) {
|
|
83
|
-
throw new Error(`Could not translate to "${targetLang}": ${e}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
module.exports = {
|
|
88
|
-
isArray,
|
|
89
|
-
isObject,
|
|
90
|
-
translateText
|
|
91
|
-
};
|