iobroker.imap 0.0.4
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/LICENSE +21 -0
- package/README.md +69 -0
- package/admin/blockly.js +878 -0
- package/admin/i18n/de/translations.json +54 -0
- package/admin/i18n/en/translations.json +54 -0
- package/admin/i18n/es/translations.json +54 -0
- package/admin/i18n/fr/translations.json +54 -0
- package/admin/i18n/it/translations.json +54 -0
- package/admin/i18n/nl/translations.json +54 -0
- package/admin/i18n/pl/translations.json +54 -0
- package/admin/i18n/pt/translations.json +54 -0
- package/admin/i18n/ru/translations.json +54 -0
- package/admin/i18n/uk/translations.json +54 -0
- package/admin/i18n/zh-cn/translations.json +54 -0
- package/admin/imap.png +0 -0
- package/admin/img/email.png +0 -0
- package/admin/img/fernbedienung.png +0 -0
- package/admin/img/html.png +0 -0
- package/admin/index_m.html +40 -0
- package/admin/jsonConfig.json +283 -0
- package/io-package.json +169 -0
- package/lib/adapter-config.d.ts +19 -0
- package/lib/helper.js +980 -0
- package/lib/listener.js +424 -0
- package/lib/translator.js +1926 -0
- package/main.js +1148 -0
- package/package.json +84 -0
package/lib/helper.js
ADDED
|
@@ -0,0 +1,980 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
async createHost(id) {
|
|
3
|
+
let common = {};
|
|
4
|
+
let icons;
|
|
5
|
+
if (id.picture != null && id.picture != "") {
|
|
6
|
+
icons = { icon: id.picture };
|
|
7
|
+
}
|
|
8
|
+
common = {
|
|
9
|
+
name: id.username,
|
|
10
|
+
desc: id.user,
|
|
11
|
+
statusStates: {
|
|
12
|
+
onlineId: `${this.namespace}.${id.user}.online`,
|
|
13
|
+
},
|
|
14
|
+
...icons,
|
|
15
|
+
};
|
|
16
|
+
await this.createDataPoint(id.user, common, "device");
|
|
17
|
+
common = {
|
|
18
|
+
type: "boolean",
|
|
19
|
+
role: "info.status",
|
|
20
|
+
name: this.helper_translator("Status Host"),
|
|
21
|
+
desc: "Create by Adapter",
|
|
22
|
+
read: true,
|
|
23
|
+
write: false,
|
|
24
|
+
def: false,
|
|
25
|
+
};
|
|
26
|
+
await this.createDataPoint(`${id.user}.online`, common, "state");
|
|
27
|
+
common = {
|
|
28
|
+
type: "number",
|
|
29
|
+
role: "info.count",
|
|
30
|
+
name: this.helper_translator("total e-mails"),
|
|
31
|
+
desc: "Create by Adapter",
|
|
32
|
+
read: true,
|
|
33
|
+
write: false,
|
|
34
|
+
def: 0,
|
|
35
|
+
};
|
|
36
|
+
await this.createDataPoint(`${id.user}.total`, common, "state");
|
|
37
|
+
common = {
|
|
38
|
+
type: "number",
|
|
39
|
+
role: "info.count",
|
|
40
|
+
name: this.helper_translator("unread"),
|
|
41
|
+
desc: "Create by Adapter",
|
|
42
|
+
read: true,
|
|
43
|
+
write: false,
|
|
44
|
+
def: 0,
|
|
45
|
+
};
|
|
46
|
+
await this.createDataPoint(`${id.user}.total_unread`, common, "state");
|
|
47
|
+
common = {
|
|
48
|
+
type: "string",
|
|
49
|
+
role: "info.html",
|
|
50
|
+
name: this.helper_translator("html_code"),
|
|
51
|
+
desc: "Create by Adapter",
|
|
52
|
+
read: true,
|
|
53
|
+
write: false,
|
|
54
|
+
def: "",
|
|
55
|
+
};
|
|
56
|
+
await this.createDataPoint(`${id.user}.html`, common, "state");
|
|
57
|
+
common = {
|
|
58
|
+
type: "string",
|
|
59
|
+
role: "json",
|
|
60
|
+
name: this.helper_translator("json_code"),
|
|
61
|
+
desc: "Create by Adapter",
|
|
62
|
+
read: true,
|
|
63
|
+
write: false,
|
|
64
|
+
def: "",
|
|
65
|
+
};
|
|
66
|
+
await this.createDataPoint(`${id.user}.json`, common, "state");
|
|
67
|
+
common = {
|
|
68
|
+
type: "string",
|
|
69
|
+
role: "info",
|
|
70
|
+
name: this.helper_translator("last activity"),
|
|
71
|
+
desc: "Create by Adapter",
|
|
72
|
+
read: true,
|
|
73
|
+
write: false,
|
|
74
|
+
def: "",
|
|
75
|
+
};
|
|
76
|
+
await this.createDataPoint(`${id.user}.last_activity`, common, "state");
|
|
77
|
+
common = {
|
|
78
|
+
type: "string",
|
|
79
|
+
role: "json",
|
|
80
|
+
name: this.helper_translator("json last activity"),
|
|
81
|
+
desc: "Create by Adapter",
|
|
82
|
+
read: true,
|
|
83
|
+
write: false,
|
|
84
|
+
def: "",
|
|
85
|
+
};
|
|
86
|
+
await this.createDataPoint(`${id.user}.last_activity_json`, common, "state");
|
|
87
|
+
common = {
|
|
88
|
+
type: "string",
|
|
89
|
+
role: "info",
|
|
90
|
+
name: this.helper_translator("Active folder"),
|
|
91
|
+
desc: "Create by Adapter",
|
|
92
|
+
read: true,
|
|
93
|
+
write: false,
|
|
94
|
+
def: "",
|
|
95
|
+
};
|
|
96
|
+
await this.createDataPoint(`${id.user}.active_inbox`, common, "state");
|
|
97
|
+
this.setState(`${id.user}.active_inbox`, {
|
|
98
|
+
val: id.inbox,
|
|
99
|
+
ack: true,
|
|
100
|
+
});
|
|
101
|
+
common = {
|
|
102
|
+
type: "number",
|
|
103
|
+
role: "info",
|
|
104
|
+
name: this.helper_translator("timestamp last activity"),
|
|
105
|
+
desc: "Create by Adapter",
|
|
106
|
+
read: true,
|
|
107
|
+
write: false,
|
|
108
|
+
def: 0,
|
|
109
|
+
};
|
|
110
|
+
await this.createDataPoint(`${id.user}.last_activity_timestamp`, common, "state");
|
|
111
|
+
common = {
|
|
112
|
+
type: "string",
|
|
113
|
+
role: "json",
|
|
114
|
+
name: this.helper_translator("qualitiy"),
|
|
115
|
+
desc: "Datapoints Quality",
|
|
116
|
+
read: true,
|
|
117
|
+
write: false,
|
|
118
|
+
def: "",
|
|
119
|
+
};
|
|
120
|
+
await this.createDataPoint(`${id.user}.quality`, common, "state");
|
|
121
|
+
},
|
|
122
|
+
async createMails(id) {
|
|
123
|
+
if (id.maxi < 1) id.maxi = 10;
|
|
124
|
+
let common = {};
|
|
125
|
+
let mailid;
|
|
126
|
+
common = {
|
|
127
|
+
name: this.helper_translator("e-Mail"),
|
|
128
|
+
desc: "Create by Adapter",
|
|
129
|
+
icon: "img/email.png",
|
|
130
|
+
};
|
|
131
|
+
await this.createDataPoint(`${id.user}.email`, common, "folder", { id: id.maxi });
|
|
132
|
+
for (let i = 1; i < id.maxi + 1; i++) {
|
|
133
|
+
mailid = ("0" + i).slice(-2);
|
|
134
|
+
common = {
|
|
135
|
+
name: this.helper_translator("e-Mail"),
|
|
136
|
+
desc: "Create by Adapter",
|
|
137
|
+
icon: "img/email.png",
|
|
138
|
+
};
|
|
139
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}`, common, "folder", { id: i });
|
|
140
|
+
common = {
|
|
141
|
+
type: "string",
|
|
142
|
+
role: "info.html",
|
|
143
|
+
name: this.helper_translator("Mail content"),
|
|
144
|
+
desc: "Create by Adapter",
|
|
145
|
+
read: true,
|
|
146
|
+
write: false,
|
|
147
|
+
def: "",
|
|
148
|
+
};
|
|
149
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.content`, common, "state");
|
|
150
|
+
common = {
|
|
151
|
+
type: "string",
|
|
152
|
+
role: "info.receive",
|
|
153
|
+
name: this.helper_translator("Receive"),
|
|
154
|
+
desc: "Create by Adapter",
|
|
155
|
+
read: true,
|
|
156
|
+
write: false,
|
|
157
|
+
def: "",
|
|
158
|
+
};
|
|
159
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.receive`, common, "state");
|
|
160
|
+
common = {
|
|
161
|
+
type: "string",
|
|
162
|
+
role: "info.subject",
|
|
163
|
+
name: this.helper_translator("e-Mail Subject"),
|
|
164
|
+
desc: "Create by Adapter",
|
|
165
|
+
read: true,
|
|
166
|
+
write: false,
|
|
167
|
+
def: "",
|
|
168
|
+
};
|
|
169
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.subject`, common, "state");
|
|
170
|
+
common = {
|
|
171
|
+
type: "string",
|
|
172
|
+
role: "info.to",
|
|
173
|
+
name: this.helper_translator("To"),
|
|
174
|
+
desc: "Create by Adapter",
|
|
175
|
+
read: true,
|
|
176
|
+
write: false,
|
|
177
|
+
def: "",
|
|
178
|
+
};
|
|
179
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.to`, common, "state");
|
|
180
|
+
common = {
|
|
181
|
+
type: "string",
|
|
182
|
+
role: "info.from",
|
|
183
|
+
name: this.helper_translator("From"),
|
|
184
|
+
desc: "Create by Adapter",
|
|
185
|
+
read: true,
|
|
186
|
+
write: false,
|
|
187
|
+
def: "",
|
|
188
|
+
};
|
|
189
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.from`, common, "state");
|
|
190
|
+
common = {
|
|
191
|
+
type: "string",
|
|
192
|
+
role: "info.text",
|
|
193
|
+
name: this.helper_translator("Text"),
|
|
194
|
+
desc: "Create by Adapter",
|
|
195
|
+
read: true,
|
|
196
|
+
write: false,
|
|
197
|
+
def: "",
|
|
198
|
+
};
|
|
199
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.text`, common, "state");
|
|
200
|
+
common = {
|
|
201
|
+
type: "string",
|
|
202
|
+
role: "info.texthtml",
|
|
203
|
+
name: this.helper_translator("TextHTML"),
|
|
204
|
+
desc: "Create by Adapter",
|
|
205
|
+
read: true,
|
|
206
|
+
write: false,
|
|
207
|
+
def: "",
|
|
208
|
+
};
|
|
209
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.texthtml`, common, "state");
|
|
210
|
+
common = {
|
|
211
|
+
type: "string",
|
|
212
|
+
role: "info.flag",
|
|
213
|
+
name: this.helper_translator("Flag"),
|
|
214
|
+
desc: "Create by Adapter",
|
|
215
|
+
read: true,
|
|
216
|
+
write: false,
|
|
217
|
+
def: "",
|
|
218
|
+
};
|
|
219
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.flag`, common, "state");
|
|
220
|
+
common = {
|
|
221
|
+
type: "number",
|
|
222
|
+
role: "info.uid",
|
|
223
|
+
name: this.helper_translator("UID"),
|
|
224
|
+
desc: "Create by Adapter",
|
|
225
|
+
read: true,
|
|
226
|
+
write: false,
|
|
227
|
+
def: 0,
|
|
228
|
+
};
|
|
229
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.uid`, common, "state");
|
|
230
|
+
common = {
|
|
231
|
+
type: "number",
|
|
232
|
+
role: "info.seq",
|
|
233
|
+
name: this.helper_translator("SEQ"),
|
|
234
|
+
desc: "Create by Adapter",
|
|
235
|
+
read: true,
|
|
236
|
+
write: false,
|
|
237
|
+
def: 0,
|
|
238
|
+
};
|
|
239
|
+
await this.createDataPoint(`${id.user}.email.email_${mailid}.seq`, common, "state");
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
async createDataPoint(ident, common, types, native) {
|
|
243
|
+
try {
|
|
244
|
+
const nativvalue = !native ? { native: {} } : { native: native };
|
|
245
|
+
const obj = await this.getObjectAsync(ident);
|
|
246
|
+
if (!obj) {
|
|
247
|
+
await this.setObjectNotExistsAsync(ident, {
|
|
248
|
+
type: types,
|
|
249
|
+
common: common,
|
|
250
|
+
...nativvalue,
|
|
251
|
+
}).catch((error) => {
|
|
252
|
+
this.log_translator("error", "catch", `createDataPoint: ${error}`);
|
|
253
|
+
});
|
|
254
|
+
} else {
|
|
255
|
+
let ischange = false;
|
|
256
|
+
if (JSON.stringify(obj.common) != JSON.stringify(common)) ischange = true;
|
|
257
|
+
else if (JSON.stringify(obj.type) != JSON.stringify(types)) ischange = true;
|
|
258
|
+
if (native) {
|
|
259
|
+
if (JSON.stringify(obj.native) != JSON.stringify(nativvalue)) {
|
|
260
|
+
ischange = true;
|
|
261
|
+
delete obj["native"];
|
|
262
|
+
obj["native"] = native;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (ischange) {
|
|
266
|
+
this.log_translator("debug", "Change common", `${this.namespace}.${ident}`);
|
|
267
|
+
delete obj["common"];
|
|
268
|
+
obj["common"] = common;
|
|
269
|
+
obj["type"] = types;
|
|
270
|
+
await this.setObjectAsync(ident, obj);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
} catch (e) {
|
|
274
|
+
this.log_translator("error", "try", `createDataPoint: ${e}`);
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
async createRemote(id) {
|
|
278
|
+
let common = {};
|
|
279
|
+
common = {
|
|
280
|
+
name: this.helper_translator("Remote"),
|
|
281
|
+
desc: "Create by Adapter",
|
|
282
|
+
icon: "img/fernbedienung.png",
|
|
283
|
+
};
|
|
284
|
+
await this.createDataPoint(`${id.user}.remote`, common, "folder");
|
|
285
|
+
common = {
|
|
286
|
+
name: this.helper_translator("HTML"),
|
|
287
|
+
desc: "Create by Adapter",
|
|
288
|
+
icon: "img/html.png",
|
|
289
|
+
};
|
|
290
|
+
await this.createDataPoint(`${id.user}.remote.html`, common, "folder");
|
|
291
|
+
common = {
|
|
292
|
+
type: "string",
|
|
293
|
+
role: "value",
|
|
294
|
+
name: this.helper_translator("criteria"),
|
|
295
|
+
desc: "Create by Adapter",
|
|
296
|
+
read: true,
|
|
297
|
+
write: true,
|
|
298
|
+
def: id.flag,
|
|
299
|
+
};
|
|
300
|
+
await this.createDataPoint(`${id.user}.remote.criteria`, common, "state");
|
|
301
|
+
common = {
|
|
302
|
+
type: "number",
|
|
303
|
+
role: "value",
|
|
304
|
+
name: this.helper_translator("Show maximum emails"),
|
|
305
|
+
desc: "Create by Adapter",
|
|
306
|
+
read: true,
|
|
307
|
+
write: true,
|
|
308
|
+
def: id.maxi,
|
|
309
|
+
};
|
|
310
|
+
await this.createDataPoint(`${id.user}.remote.show_mails`, common, "state");
|
|
311
|
+
common = {
|
|
312
|
+
type: "boolean",
|
|
313
|
+
role: "button",
|
|
314
|
+
name: this.helper_translator("Start new search"),
|
|
315
|
+
desc: "Create by Adapter",
|
|
316
|
+
read: true,
|
|
317
|
+
write: true,
|
|
318
|
+
def: false,
|
|
319
|
+
};
|
|
320
|
+
await this.createDataPoint(`${id.user}.remote.search_start`, common, "state");
|
|
321
|
+
common = {
|
|
322
|
+
type: "boolean",
|
|
323
|
+
role: "button",
|
|
324
|
+
name: this.helper_translator("Reload emails"),
|
|
325
|
+
desc: "Create by Adapter",
|
|
326
|
+
read: true,
|
|
327
|
+
write: true,
|
|
328
|
+
def: false,
|
|
329
|
+
};
|
|
330
|
+
await this.createDataPoint(`${id.user}.remote.reload_emails`, common, "state");
|
|
331
|
+
common = {
|
|
332
|
+
type: "string",
|
|
333
|
+
role: "value.background",
|
|
334
|
+
name: this.helper_translator("body_background"),
|
|
335
|
+
desc: "Create by Adapter",
|
|
336
|
+
read: true,
|
|
337
|
+
write: true,
|
|
338
|
+
def: "#000000",
|
|
339
|
+
};
|
|
340
|
+
await this.createDataPoint(`${id.user}.remote.html.body_background`, common, "state");
|
|
341
|
+
common = {
|
|
342
|
+
type: "string",
|
|
343
|
+
role: "value.p",
|
|
344
|
+
name: this.helper_translator("p_tag_text_align"),
|
|
345
|
+
desc: "Create by Adapter",
|
|
346
|
+
read: true,
|
|
347
|
+
write: true,
|
|
348
|
+
def: "center",
|
|
349
|
+
states: {
|
|
350
|
+
center: "center",
|
|
351
|
+
left: "left",
|
|
352
|
+
right: "right",
|
|
353
|
+
auto: "auto",
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
await this.createDataPoint(`${id.user}.remote.html.p_tag_text_align`, common, "state");
|
|
357
|
+
common = {
|
|
358
|
+
type: "number",
|
|
359
|
+
role: "value.td",
|
|
360
|
+
name: this.helper_translator("td_tag_cell"),
|
|
361
|
+
desc: "Create by Adapter",
|
|
362
|
+
read: true,
|
|
363
|
+
write: true,
|
|
364
|
+
unit: "px",
|
|
365
|
+
def: 6,
|
|
366
|
+
};
|
|
367
|
+
await this.createDataPoint(`${id.user}.remote.html.td_tag_cell`, common, "state");
|
|
368
|
+
common = {
|
|
369
|
+
type: "string",
|
|
370
|
+
role: "value.td",
|
|
371
|
+
name: this.helper_translator("td_tag_border_color"),
|
|
372
|
+
desc: "Create by Adapter",
|
|
373
|
+
read: true,
|
|
374
|
+
write: true,
|
|
375
|
+
def: "#424242",
|
|
376
|
+
};
|
|
377
|
+
await this.createDataPoint(`${id.user}.remote.html.td_tag_border_color`, common, "state");
|
|
378
|
+
common = {
|
|
379
|
+
type: "string",
|
|
380
|
+
role: "value",
|
|
381
|
+
name: this.helper_translator("Choose content"),
|
|
382
|
+
desc: "Create by Adapter",
|
|
383
|
+
read: true,
|
|
384
|
+
write: true,
|
|
385
|
+
def: "text",
|
|
386
|
+
states: {
|
|
387
|
+
html: "html",
|
|
388
|
+
text: "text",
|
|
389
|
+
textAsHtml: "textAsHtml",
|
|
390
|
+
html_convert: "html_convert",
|
|
391
|
+
textAsHtml_convert: "textAsHtml_convert",
|
|
392
|
+
},
|
|
393
|
+
};
|
|
394
|
+
await this.createDataPoint(`${id.user}.remote.html.choose_content`, common, "state");
|
|
395
|
+
common = {
|
|
396
|
+
type: "number",
|
|
397
|
+
role: "value.td",
|
|
398
|
+
name: this.helper_translator("td_tag_border_right"),
|
|
399
|
+
desc: "Create by Adapter",
|
|
400
|
+
read: true,
|
|
401
|
+
write: true,
|
|
402
|
+
unit: "px",
|
|
403
|
+
def: 1,
|
|
404
|
+
};
|
|
405
|
+
await this.createDataPoint(`${id.user}.remote.html.td_tag_border_right`, common, "state");
|
|
406
|
+
common = {
|
|
407
|
+
type: "number",
|
|
408
|
+
role: "value.td",
|
|
409
|
+
name: this.helper_translator("td_tag_border_bottom"),
|
|
410
|
+
desc: "Create by Adapter",
|
|
411
|
+
read: true,
|
|
412
|
+
write: true,
|
|
413
|
+
unit: "px",
|
|
414
|
+
def: 1,
|
|
415
|
+
};
|
|
416
|
+
await this.createDataPoint(`${id.user}.remote.html.td_tag_border_bottom`, common, "state");
|
|
417
|
+
common = {
|
|
418
|
+
type: "string",
|
|
419
|
+
role: "value.table",
|
|
420
|
+
name: this.helper_translator("table_tag_text_align"),
|
|
421
|
+
desc: "Create by Adapter",
|
|
422
|
+
read: true,
|
|
423
|
+
write: true,
|
|
424
|
+
def: "auto",
|
|
425
|
+
};
|
|
426
|
+
await this.createDataPoint(`${id.user}.remote.html.table_tag_text_align`, common, "state");
|
|
427
|
+
common = {
|
|
428
|
+
type: "string",
|
|
429
|
+
role: "value.table",
|
|
430
|
+
name: this.helper_translator("table_tag_width"),
|
|
431
|
+
desc: "Create by Adapter",
|
|
432
|
+
read: true,
|
|
433
|
+
write: true,
|
|
434
|
+
def: "auto",
|
|
435
|
+
};
|
|
436
|
+
await this.createDataPoint(`${id.user}.remote.html.table_tag_width`, common, "state");
|
|
437
|
+
common = {
|
|
438
|
+
type: "string",
|
|
439
|
+
role: "value.table",
|
|
440
|
+
name: this.helper_translator("table_tag_border_color"),
|
|
441
|
+
desc: "Create by Adapter",
|
|
442
|
+
read: true,
|
|
443
|
+
write: true,
|
|
444
|
+
def: "#424242",
|
|
445
|
+
};
|
|
446
|
+
await this.createDataPoint(`${id.user}.remote.html.table_tag_border_color`, common, "state");
|
|
447
|
+
common = {
|
|
448
|
+
type: "number",
|
|
449
|
+
role: "value.table",
|
|
450
|
+
name: this.helper_translator("table_tag_cell"),
|
|
451
|
+
desc: "Create by Adapter",
|
|
452
|
+
read: true,
|
|
453
|
+
write: true,
|
|
454
|
+
unit: "px",
|
|
455
|
+
def: 6,
|
|
456
|
+
};
|
|
457
|
+
await this.createDataPoint(`${id.user}.remote.html.table_tag_cell`, common, "state");
|
|
458
|
+
common = {
|
|
459
|
+
type: "string",
|
|
460
|
+
role: "value.table",
|
|
461
|
+
name: this.helper_translator("td_tag_2_colums"),
|
|
462
|
+
desc: "Create by Adapter",
|
|
463
|
+
read: true,
|
|
464
|
+
write: true,
|
|
465
|
+
def: "auto",
|
|
466
|
+
};
|
|
467
|
+
await this.createDataPoint(`${id.user}.remote.html.td_tag_2_colums`, common, "state");
|
|
468
|
+
common = {
|
|
469
|
+
type: "string",
|
|
470
|
+
role: "value.header",
|
|
471
|
+
name: this.helper_translator("header_tag_border_color"),
|
|
472
|
+
desc: "Create by Adapter",
|
|
473
|
+
read: true,
|
|
474
|
+
write: true,
|
|
475
|
+
def: "#424242",
|
|
476
|
+
};
|
|
477
|
+
await this.createDataPoint(`${id.user}.remote.html.header_tag_border_color`, common, "state");
|
|
478
|
+
common = {
|
|
479
|
+
type: "number",
|
|
480
|
+
role: "value.header",
|
|
481
|
+
name: this.helper_translator("header_border"),
|
|
482
|
+
desc: "Create by Adapter",
|
|
483
|
+
read: true,
|
|
484
|
+
write: true,
|
|
485
|
+
unit: "px",
|
|
486
|
+
def: 2,
|
|
487
|
+
};
|
|
488
|
+
await this.createDataPoint(`${id.user}.remote.html.header_border`, common, "state");
|
|
489
|
+
common = {
|
|
490
|
+
type: "string",
|
|
491
|
+
role: "value.header",
|
|
492
|
+
name: this.helper_translator("header_width"),
|
|
493
|
+
desc: "Create by Adapter",
|
|
494
|
+
read: true,
|
|
495
|
+
write: true,
|
|
496
|
+
def: "auto",
|
|
497
|
+
};
|
|
498
|
+
await this.createDataPoint(`${id.user}.remote.html.header_width`, common, "state");
|
|
499
|
+
common = {
|
|
500
|
+
type: "string",
|
|
501
|
+
role: "value.header",
|
|
502
|
+
name: this.helper_translator("header_rules"),
|
|
503
|
+
desc: "Create by Adapter",
|
|
504
|
+
read: true,
|
|
505
|
+
write: true,
|
|
506
|
+
def: "none",
|
|
507
|
+
states: {
|
|
508
|
+
none: "none",
|
|
509
|
+
all: "all",
|
|
510
|
+
cols: "cols",
|
|
511
|
+
rows: "rows",
|
|
512
|
+
},
|
|
513
|
+
};
|
|
514
|
+
await this.createDataPoint(`${id.user}.remote.html.header_rules`, common, "state");
|
|
515
|
+
common = {
|
|
516
|
+
type: "string",
|
|
517
|
+
role: "value.header",
|
|
518
|
+
name: this.helper_translator("header_text_color"),
|
|
519
|
+
desc: "Create by Adapter",
|
|
520
|
+
read: true,
|
|
521
|
+
write: true,
|
|
522
|
+
def: "#BDBDBD",
|
|
523
|
+
};
|
|
524
|
+
await this.createDataPoint(`${id.user}.remote.html.header_text_color`, common, "state");
|
|
525
|
+
common = {
|
|
526
|
+
type: "number",
|
|
527
|
+
role: "value.header",
|
|
528
|
+
name: this.helper_translator("header_font_size"),
|
|
529
|
+
desc: "Create by Adapter",
|
|
530
|
+
read: true,
|
|
531
|
+
write: true,
|
|
532
|
+
unit: "px",
|
|
533
|
+
def: 15,
|
|
534
|
+
};
|
|
535
|
+
await this.createDataPoint(`${id.user}.remote.html.header_font_size`, common, "state");
|
|
536
|
+
common = {
|
|
537
|
+
type: "string",
|
|
538
|
+
role: "value.header",
|
|
539
|
+
name: this.helper_translator("header_font"),
|
|
540
|
+
desc: "Create by Adapter",
|
|
541
|
+
read: true,
|
|
542
|
+
write: true,
|
|
543
|
+
def: "Helvetica",
|
|
544
|
+
};
|
|
545
|
+
await this.createDataPoint(`${id.user}.remote.html.header_font`, common, "state");
|
|
546
|
+
common = {
|
|
547
|
+
type: "string",
|
|
548
|
+
role: "value.header",
|
|
549
|
+
name: this.helper_translator("header_linear_color_1"),
|
|
550
|
+
desc: "Create by Adapter",
|
|
551
|
+
read: true,
|
|
552
|
+
write: true,
|
|
553
|
+
def: "#424242",
|
|
554
|
+
};
|
|
555
|
+
await this.createDataPoint(`${id.user}.remote.html.header_linear_color_1`, common, "state");
|
|
556
|
+
common = {
|
|
557
|
+
type: "string",
|
|
558
|
+
role: "value.header",
|
|
559
|
+
name: this.helper_translator("header_linear_color_2"),
|
|
560
|
+
desc: "Create by Adapter",
|
|
561
|
+
read: true,
|
|
562
|
+
write: true,
|
|
563
|
+
def: "#424242",
|
|
564
|
+
};
|
|
565
|
+
await this.createDataPoint(`${id.user}.remote.html.header_linear_color_2`, common, "state");
|
|
566
|
+
common = {
|
|
567
|
+
type: "number",
|
|
568
|
+
role: "value.header",
|
|
569
|
+
name: this.helper_translator("headline_height"),
|
|
570
|
+
desc: "Create by Adapter",
|
|
571
|
+
read: true,
|
|
572
|
+
write: true,
|
|
573
|
+
unit: "px",
|
|
574
|
+
def: 35,
|
|
575
|
+
};
|
|
576
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_height`, common, "state");
|
|
577
|
+
common = {
|
|
578
|
+
type: "string",
|
|
579
|
+
role: "value.header",
|
|
580
|
+
name: this.helper_translator("headline_color"),
|
|
581
|
+
desc: "Create by Adapter",
|
|
582
|
+
read: true,
|
|
583
|
+
write: true,
|
|
584
|
+
def: "#BDBDBD",
|
|
585
|
+
};
|
|
586
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_color`, common, "state");
|
|
587
|
+
common = {
|
|
588
|
+
type: "number",
|
|
589
|
+
role: "value.header",
|
|
590
|
+
name: this.helper_translator("headline_font_size"),
|
|
591
|
+
desc: "Create by Adapter",
|
|
592
|
+
read: true,
|
|
593
|
+
write: true,
|
|
594
|
+
unit: "px",
|
|
595
|
+
def: 16,
|
|
596
|
+
};
|
|
597
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_font_size`, common, "state");
|
|
598
|
+
common = {
|
|
599
|
+
type: "string",
|
|
600
|
+
role: "value.header",
|
|
601
|
+
name: this.helper_translator("headline_style"),
|
|
602
|
+
desc: "Create by Adapter",
|
|
603
|
+
read: true,
|
|
604
|
+
write: true,
|
|
605
|
+
def: "normal",
|
|
606
|
+
states: {
|
|
607
|
+
nnormal: "normal",
|
|
608
|
+
bold: "bold",
|
|
609
|
+
},
|
|
610
|
+
};
|
|
611
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_style`, common, "state");
|
|
612
|
+
common = {
|
|
613
|
+
type: "number",
|
|
614
|
+
role: "value.header",
|
|
615
|
+
name: this.helper_translator("headline_underlined"),
|
|
616
|
+
desc: "Create by Adapter",
|
|
617
|
+
read: true,
|
|
618
|
+
write: true,
|
|
619
|
+
unit: "px",
|
|
620
|
+
def: 3,
|
|
621
|
+
};
|
|
622
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_underlined`, common, "state");
|
|
623
|
+
common = {
|
|
624
|
+
type: "string",
|
|
625
|
+
role: "value.header",
|
|
626
|
+
name: this.helper_translator("headline_underlined_color"),
|
|
627
|
+
desc: "Create by Adapter",
|
|
628
|
+
read: true,
|
|
629
|
+
write: true,
|
|
630
|
+
def: "#ffffff",
|
|
631
|
+
};
|
|
632
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_underlined_color`, common, "state");
|
|
633
|
+
common = {
|
|
634
|
+
type: "string",
|
|
635
|
+
role: "value.header",
|
|
636
|
+
name: this.helper_translator("headline_column_width", 1),
|
|
637
|
+
desc: "Create by Adapter",
|
|
638
|
+
read: true,
|
|
639
|
+
write: true,
|
|
640
|
+
def: "auto",
|
|
641
|
+
};
|
|
642
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_1`, common, "state");
|
|
643
|
+
common = {
|
|
644
|
+
type: "string",
|
|
645
|
+
role: "value.header",
|
|
646
|
+
name: this.helper_translator("headline_column_width", 2),
|
|
647
|
+
desc: "Create by Adapter",
|
|
648
|
+
read: true,
|
|
649
|
+
write: true,
|
|
650
|
+
def: "auto",
|
|
651
|
+
};
|
|
652
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_2`, common, "state");
|
|
653
|
+
common = {
|
|
654
|
+
type: "string",
|
|
655
|
+
role: "value.header",
|
|
656
|
+
name: this.helper_translator("headline_column_width", 3),
|
|
657
|
+
desc: "Create by Adapter",
|
|
658
|
+
read: true,
|
|
659
|
+
write: true,
|
|
660
|
+
def: "auto",
|
|
661
|
+
};
|
|
662
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_3`, common, "state");
|
|
663
|
+
common = {
|
|
664
|
+
type: "string",
|
|
665
|
+
role: "value.header",
|
|
666
|
+
name: this.helper_translator("headline_column_width", 4),
|
|
667
|
+
desc: "Create by Adapter",
|
|
668
|
+
read: true,
|
|
669
|
+
write: true,
|
|
670
|
+
def: "auto",
|
|
671
|
+
};
|
|
672
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_4`, common, "state");
|
|
673
|
+
common = {
|
|
674
|
+
type: "string",
|
|
675
|
+
role: "value.header",
|
|
676
|
+
name: this.helper_translator("headline_column_width", 5),
|
|
677
|
+
desc: "Create by Adapter",
|
|
678
|
+
read: true,
|
|
679
|
+
write: true,
|
|
680
|
+
def: "auto",
|
|
681
|
+
};
|
|
682
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_5`, common, "state");
|
|
683
|
+
common = {
|
|
684
|
+
type: "string",
|
|
685
|
+
role: "value.header",
|
|
686
|
+
name: this.helper_translator("headline_column_width", 6),
|
|
687
|
+
desc: "Create by Adapter",
|
|
688
|
+
read: true,
|
|
689
|
+
write: true,
|
|
690
|
+
def: "auto",
|
|
691
|
+
};
|
|
692
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_6`, common, "state");
|
|
693
|
+
common = {
|
|
694
|
+
type: "string",
|
|
695
|
+
role: "value.header",
|
|
696
|
+
name: this.helper_translator("headline_column_width", 7),
|
|
697
|
+
desc: "Create by Adapter",
|
|
698
|
+
read: true,
|
|
699
|
+
write: true,
|
|
700
|
+
def: "auto",
|
|
701
|
+
};
|
|
702
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_column_width_7`, common, "state");
|
|
703
|
+
common = {
|
|
704
|
+
type: "string",
|
|
705
|
+
role: "value.table",
|
|
706
|
+
name: this.helper_translator("headline_align_column", 1),
|
|
707
|
+
desc: "Create by Adapter",
|
|
708
|
+
read: true,
|
|
709
|
+
write: true,
|
|
710
|
+
def: "center",
|
|
711
|
+
states: {
|
|
712
|
+
center: "center",
|
|
713
|
+
left: "left",
|
|
714
|
+
right: "right",
|
|
715
|
+
auto: "auto",
|
|
716
|
+
},
|
|
717
|
+
};
|
|
718
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_1`, common, "state");
|
|
719
|
+
common = {
|
|
720
|
+
type: "string",
|
|
721
|
+
role: "value.table",
|
|
722
|
+
name: this.helper_translator("headline_align_column", 2),
|
|
723
|
+
desc: "Create by Adapter",
|
|
724
|
+
read: true,
|
|
725
|
+
write: true,
|
|
726
|
+
def: "center",
|
|
727
|
+
states: {
|
|
728
|
+
center: "center",
|
|
729
|
+
left: "left",
|
|
730
|
+
right: "right",
|
|
731
|
+
auto: "auto",
|
|
732
|
+
},
|
|
733
|
+
};
|
|
734
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_2`, common, "state");
|
|
735
|
+
common = {
|
|
736
|
+
type: "string",
|
|
737
|
+
role: "value.table",
|
|
738
|
+
name: this.helper_translator("headline_align_column", 3),
|
|
739
|
+
desc: "Create by Adapter",
|
|
740
|
+
read: true,
|
|
741
|
+
write: true,
|
|
742
|
+
def: "center",
|
|
743
|
+
states: {
|
|
744
|
+
center: "center",
|
|
745
|
+
left: "left",
|
|
746
|
+
right: "right",
|
|
747
|
+
auto: "auto",
|
|
748
|
+
},
|
|
749
|
+
};
|
|
750
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_3`, common, "state");
|
|
751
|
+
common = {
|
|
752
|
+
type: "string",
|
|
753
|
+
role: "value.table",
|
|
754
|
+
name: this.helper_translator("headline_align_column", 4),
|
|
755
|
+
desc: "Create by Adapter",
|
|
756
|
+
read: true,
|
|
757
|
+
write: true,
|
|
758
|
+
def: "center",
|
|
759
|
+
states: {
|
|
760
|
+
center: "center",
|
|
761
|
+
left: "left",
|
|
762
|
+
right: "right",
|
|
763
|
+
auto: "auto",
|
|
764
|
+
},
|
|
765
|
+
};
|
|
766
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_4`, common, "state");
|
|
767
|
+
common = {
|
|
768
|
+
type: "string",
|
|
769
|
+
role: "value.table",
|
|
770
|
+
name: this.helper_translator("headline_align_column", 5),
|
|
771
|
+
desc: "Create by Adapter",
|
|
772
|
+
read: true,
|
|
773
|
+
write: true,
|
|
774
|
+
def: "center",
|
|
775
|
+
states: {
|
|
776
|
+
center: "center",
|
|
777
|
+
left: "left",
|
|
778
|
+
right: "right",
|
|
779
|
+
auto: "auto",
|
|
780
|
+
},
|
|
781
|
+
};
|
|
782
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_5`, common, "state");
|
|
783
|
+
common = {
|
|
784
|
+
type: "string",
|
|
785
|
+
role: "value.table",
|
|
786
|
+
name: this.helper_translator("headline_align_column", 6),
|
|
787
|
+
desc: "Create by Adapter",
|
|
788
|
+
read: true,
|
|
789
|
+
write: true,
|
|
790
|
+
def: "center",
|
|
791
|
+
states: {
|
|
792
|
+
center: "center",
|
|
793
|
+
left: "left",
|
|
794
|
+
right: "right",
|
|
795
|
+
auto: "auto",
|
|
796
|
+
},
|
|
797
|
+
};
|
|
798
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_6`, common, "state");
|
|
799
|
+
common = {
|
|
800
|
+
type: "string",
|
|
801
|
+
role: "value.table",
|
|
802
|
+
name: this.helper_translator("headline_align_column", 7),
|
|
803
|
+
desc: "Create by Adapter",
|
|
804
|
+
read: true,
|
|
805
|
+
write: true,
|
|
806
|
+
def: "center",
|
|
807
|
+
states: {
|
|
808
|
+
center: "center",
|
|
809
|
+
left: "left",
|
|
810
|
+
right: "right",
|
|
811
|
+
auto: "auto",
|
|
812
|
+
},
|
|
813
|
+
};
|
|
814
|
+
await this.createDataPoint(`${id.user}.remote.html.headline_align_column_7`, common, "state");
|
|
815
|
+
common = {
|
|
816
|
+
type: "string",
|
|
817
|
+
role: "value.top",
|
|
818
|
+
name: this.helper_translator("top_text_color"),
|
|
819
|
+
desc: "Create by Adapter",
|
|
820
|
+
read: true,
|
|
821
|
+
write: true,
|
|
822
|
+
def: "#ffffff",
|
|
823
|
+
};
|
|
824
|
+
await this.createDataPoint(`${id.user}.remote.html.top_text_color`, common, "state");
|
|
825
|
+
common = {
|
|
826
|
+
type: "string",
|
|
827
|
+
role: "value.top",
|
|
828
|
+
name: this.helper_translator("top_text"),
|
|
829
|
+
desc: "Create by Adapter",
|
|
830
|
+
read: true,
|
|
831
|
+
write: true,
|
|
832
|
+
def: id.username,
|
|
833
|
+
};
|
|
834
|
+
await this.createDataPoint(`${id.user}.remote.html.top_text`, common, "state");
|
|
835
|
+
common = {
|
|
836
|
+
type: "boolean",
|
|
837
|
+
role: "switch",
|
|
838
|
+
name: this.helper_translator("Disable containers"),
|
|
839
|
+
desc: "Create by Adapter",
|
|
840
|
+
read: true,
|
|
841
|
+
write: true,
|
|
842
|
+
def: false,
|
|
843
|
+
};
|
|
844
|
+
await this.createDataPoint(`${id.user}.remote.html.jarvis`, common, "state");
|
|
845
|
+
common = {
|
|
846
|
+
type: "string",
|
|
847
|
+
role: "value.top",
|
|
848
|
+
name: this.helper_translator("top_font"),
|
|
849
|
+
desc: "Create by Adapter",
|
|
850
|
+
read: true,
|
|
851
|
+
write: true,
|
|
852
|
+
def: "Helvetica",
|
|
853
|
+
};
|
|
854
|
+
await this.createDataPoint(`${id.user}.remote.html.top_font`, common, "state");
|
|
855
|
+
common = {
|
|
856
|
+
type: "number",
|
|
857
|
+
role: "value.top",
|
|
858
|
+
name: this.helper_translator("top_font_size"),
|
|
859
|
+
desc: "Create by Adapter",
|
|
860
|
+
read: true,
|
|
861
|
+
write: true,
|
|
862
|
+
unit: "px",
|
|
863
|
+
def: 20,
|
|
864
|
+
};
|
|
865
|
+
await this.createDataPoint(`${id.user}.remote.html.top_font_size`, common, "state");
|
|
866
|
+
common = {
|
|
867
|
+
type: "string",
|
|
868
|
+
role: "value.top",
|
|
869
|
+
name: this.helper_translator("top_font_weight"),
|
|
870
|
+
desc: "Create by Adapter",
|
|
871
|
+
read: true,
|
|
872
|
+
write: true,
|
|
873
|
+
def: "normal",
|
|
874
|
+
states: {
|
|
875
|
+
nnormal: "normal",
|
|
876
|
+
bold: "bold",
|
|
877
|
+
},
|
|
878
|
+
};
|
|
879
|
+
await this.createDataPoint(`${id.user}.remote.html.top_font_weight`, common, "state");
|
|
880
|
+
common = {
|
|
881
|
+
type: "string",
|
|
882
|
+
role: "value.color",
|
|
883
|
+
name: this.helper_translator("mails_today_color"),
|
|
884
|
+
desc: "Create by Adapter",
|
|
885
|
+
read: true,
|
|
886
|
+
write: true,
|
|
887
|
+
def: "#ffffff",
|
|
888
|
+
};
|
|
889
|
+
await this.createDataPoint(`${id.user}.remote.html.mails_today_color`, common, "state");
|
|
890
|
+
common = {
|
|
891
|
+
type: "string",
|
|
892
|
+
role: "value.color",
|
|
893
|
+
name: this.helper_translator("mails_today_color_odd"),
|
|
894
|
+
desc: "Create by Adapter",
|
|
895
|
+
read: true,
|
|
896
|
+
write: true,
|
|
897
|
+
def: "#ffffff",
|
|
898
|
+
};
|
|
899
|
+
await this.createDataPoint(`${id.user}.remote.html.mails_today_color_odd`, common, "state");
|
|
900
|
+
common = {
|
|
901
|
+
type: "string",
|
|
902
|
+
role: "value.color",
|
|
903
|
+
name: this.helper_translator("mails_nextday_color_even"),
|
|
904
|
+
desc: "Create by Adapter",
|
|
905
|
+
read: true,
|
|
906
|
+
write: true,
|
|
907
|
+
def: "#000000",
|
|
908
|
+
};
|
|
909
|
+
await this.createDataPoint(`${id.user}.remote.html.mails_nextday_color_even`, common, "state");
|
|
910
|
+
common = {
|
|
911
|
+
type: "string",
|
|
912
|
+
role: "value.color",
|
|
913
|
+
name: this.helper_translator("mails_nextday_color_odd"),
|
|
914
|
+
desc: "Create by Adapter",
|
|
915
|
+
read: true,
|
|
916
|
+
write: true,
|
|
917
|
+
def: "#000000",
|
|
918
|
+
};
|
|
919
|
+
await this.createDataPoint(`${id.user}.remote.html.mails_nextday_color_odd`, common, "state");
|
|
920
|
+
common = {
|
|
921
|
+
type: "string",
|
|
922
|
+
role: "value.color",
|
|
923
|
+
name: this.helper_translator("mails_even_color"),
|
|
924
|
+
desc: "Create by Adapter",
|
|
925
|
+
read: true,
|
|
926
|
+
write: true,
|
|
927
|
+
def: "#333333",
|
|
928
|
+
};
|
|
929
|
+
await this.createDataPoint(`${id.user}.remote.html.mails_even_color`, common, "state");
|
|
930
|
+
common = {
|
|
931
|
+
type: "string",
|
|
932
|
+
role: "value.color",
|
|
933
|
+
name: this.helper_translator("mails_odd_color"),
|
|
934
|
+
desc: "Create by Adapter",
|
|
935
|
+
read: true,
|
|
936
|
+
write: true,
|
|
937
|
+
def: "#000000",
|
|
938
|
+
};
|
|
939
|
+
await this.createDataPoint(`${id.user}.remote.html.mails_odd_color`, common, "state");
|
|
940
|
+
common = {
|
|
941
|
+
type: "number",
|
|
942
|
+
role: "value.top",
|
|
943
|
+
name: this.helper_translator("short_subject"),
|
|
944
|
+
desc: "Create by Adapter",
|
|
945
|
+
read: true,
|
|
946
|
+
write: true,
|
|
947
|
+
def: 35,
|
|
948
|
+
};
|
|
949
|
+
await this.createDataPoint(`${id.user}.remote.html.short_subject`, common, "state");
|
|
950
|
+
common = {
|
|
951
|
+
type: "number",
|
|
952
|
+
role: "value.top",
|
|
953
|
+
name: this.helper_translator("short_content"),
|
|
954
|
+
desc: "Create by Adapter",
|
|
955
|
+
read: true,
|
|
956
|
+
write: true,
|
|
957
|
+
def: 35,
|
|
958
|
+
};
|
|
959
|
+
await this.createDataPoint(`${id.user}.remote.html.short_content`, common, "state");
|
|
960
|
+
},
|
|
961
|
+
async createinbox(id, folder) {
|
|
962
|
+
if (folder == null) return;
|
|
963
|
+
let common = {};
|
|
964
|
+
const states = {};
|
|
965
|
+
for (const address of folder) {
|
|
966
|
+
states[address] = address;
|
|
967
|
+
}
|
|
968
|
+
common = {
|
|
969
|
+
type: "string",
|
|
970
|
+
role: "json",
|
|
971
|
+
name: this.helper_translator("Change folder"),
|
|
972
|
+
desc: "Create by Adapter",
|
|
973
|
+
read: true,
|
|
974
|
+
write: true,
|
|
975
|
+
def: "",
|
|
976
|
+
states: states,
|
|
977
|
+
};
|
|
978
|
+
await this.createDataPoint(`${id}.remote.change_folder`, common, "state");
|
|
979
|
+
},
|
|
980
|
+
};
|