-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMMM-Config.schema.json
More file actions
450 lines (450 loc) · 15.4 KB
/
MMM-Config.schema.json
File metadata and controls
450 lines (450 loc) · 15.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
{
"schema": {
"MMM-EmbedURL": {
"type": "object",
"title": "properties for MMM-EmbedURL",
"properties": {
"module": {
"type": "string",
"title": "module",
"default": "MMM-EmbedURL",
"readonly": true
},
"disabled": {
"type": "boolean",
"title": "disabled",
"default": false
},
"position": {
"type": "string",
"title": "module position",
"readonly": "true"
},
"animateIn": {
"type": "string"
},
"animateOut": {
"type": "string"
},
"classes": {
"type": "string",
"title": "classes",
"default": ""
},
"order": {
"type": "string",
"title": "order",
"default": "*"
},
"inconfig": {
"type": "string",
"title": "inconfig",
"default": "0"
},
"index": {
"type": "integer"
},
"config": {
"type": "object",
"title": "config",
"properties": {
"basicElementType": {
"type": "string",
"enum":[
"div","span"]
},
"embedElementType": {
"type": "string",
"enum":[
"iframe","embed"]
},
"updateInterval": {
"type": "integer",
"default":60
},
"animationSpeed": {
"type": "integer",
"default":500
},
"positions": {
"type": "string"
},
"appendTimestamp": {
"type": "boolean",
"default": false
},
"title": {
"type": "string"
},
"fontIcon": {
"type": "string"
},
"imgIcon": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"embed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string"
}
},
"basicElementType": {
"type": "string",
"enum": [
"div",
"span"
]
},
"embedElementType": {
"type": "string",
"enum": [
"iframe",
"webview"
]
},
"updateInterval": {
"type": "integer",
"default":60
},
"animationSpeed": {
"type": "integer",
"default":500
},
"positions": {
"type": "string"
},
"fontIcon": {
"type": "string"
},
"imgIcon": {
"type": "string"
},
"appendTimestamp": {
"type": "boolean",
"default": false
},
"title": {
"type": "string"
},
"profiles": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"embed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string"
}
},
"basicElementType": {
"type": "string",
"enum":[
"div","span"]
},
"embedElementType": {
"type": "string",
"enum":[
"iframe","embed"]
},
"updateInterval": {
"type": "integer"
},
"animationSpeed": {
"type": "integer"
},
"positions": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"embed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"imgDecodeCheckInterval": {
"type": "integer",
"default":0,
"minimum":-1
},
"updateDomOnResume": {
"type": "boolean",
"default":false
}
}
}
}
}
},
"form": [
{
"key": "MMM-EmbedURL.disabled",
"htmlClass": "disabled_checkbox",
"description": "when checked the module will not be used by MagicMirror<br> but will remain in config.js if already present"
},
{
"key": "MMM-EmbedURL.position",
"description": "use Module Positions section below to set or change"
},
{
"key": "MMM-EmbedURL.classes",
"description": "css classes to use for this module, beyond what MM provides"
},
{
"key": "MMM-EmbedURL.order",
"type": "hidden"
},
{
"key": "MMM-EmbedURL.inconfig",
"type": "hidden"
},
{
"key": "MMM-EmbedURL.index",
"type": "hidden"
},
{
"type": "fieldset",
"title": "config",
"items": [
{
"title": "basicElementType",
"key": "MMM-EmbedURL.config.basicElementType",
"description":"select which type of html element to use for the content"
},
{
"title": "embedElementType",
"key": "MMM-EmbedURL.config.embedElementType",
"description":"choose how to embed the content,<br> note:if you choose embed, you must also set the electronOptions to enable enbedded components"
},
{
"title": "updateInterval",
"key": "MMM-EmbedURL.config.updateInterval",
"description":"The websites will be refreshed in this interval provided in seconds.<br> Set the value to 0 or lower to disable automatic refresh."
},
{
"title": "animationSpeed",
"key": "MMM-EmbedURL.config.animationSpeed",
"description":"The creation of the elements will be animated with this speed in milliseconds."
},
{
"title": "positions",
"key": "MMM-EmbedURL.config.positions",
"description":"The elements will be added in the order of the characters in this string (i=icon, t=title, e=embeded)."
},
{
"title": "appendTimestamp",
"key": "MMM-EmbedURL.config.appendTimestamp",
"description":"If this option is set to true a timestamp is added to each URL that is embedded. This is to avoid caching issues."
},
{
"title": "title",
"key": "MMM-EmbedURL.config.title",
"description":"Either a single String or a Array of String that will be added as title. It is supported to add html tags to the title"
},
{
"title": "fontIcon",
"key": "MMM-EmbedURL.config.fontIcon",
"description":"A single String or a Array of String containing the Fontawesome 4.7 or Iconify class definition of icons (i.e. \"fa fa-tint\" or \"fluent-emoji-flat:test-tube\"). Array or single String"
},
{
"title": "imgIcon",
"key": "MMM-EmbedURL.config.imgIcon",
"description":"If you want to use a image as icon instead of fontawesome 4.7 icons you can specify a single URL or a Array of URLs with this option. <br>If both fontIcon and imgIcon are specified the imgIcon will be used!"
},
{
"type": "array",
"title": "attributes",
"deleteCurrent": false,
"draggable": false,
"description":"This is a array with additional attributes that should be added to the embeded html element.",
"items": [
{
"title": "attribute {{idx}}",
"key": "MMM-EmbedURL.config.attributes[]"
}
]
},
{
"title": "embed",
"key": "MMM-EmbedURL.config.embed",
"type":"array",
"draggable": false,
"items" :[
{
"type": "fieldset",
"title": "embed {{idx}}",
"htmlClass":"embed",
"expandable": true,
"items": [
{
"type":"array",
"draggable": false,
"title":"urls",
"items":[
{
"title": " ",
"key": "MMM-EmbedURL.config.embed[].urls[]"
}
]
},
{
"title": "basicElementType ",
"key": "MMM-EmbedURL.config.embed[].basicElementType",
"description":"select which type of html element to use for the content"
},
{
"title": "embedElementType ",
"key": "MMM-EmbedURL.config.embed[].embedElementType",
"description":"choose how to embed the content,<br> note:if you choose embed, you must also set the electronOptions to enable enbedded components"
},
{
"title": "updateInterval ",
"key": "MMM-EmbedURL.config.embed[].updateInterval",
"description":"The websites will be refreshed in this interval provided in seconds.<br> Set the value to 0 or lower to disable automatic refresh."
},
{
"title": "animationSpeed ",
"key": "MMM-EmbedURL.config.embed[].animationSpeed",
"description":"The creation of the elements will be animated with this speed in milliseconds."
},
{
"title": "positions ",
"key": "MMM-EmbedURL.config.embed[].positions",
"description":"The elements will be added in the order of the characters in this string (i=icon, t=title, e=embeded)."
},
{
"title": "appendTimestamp",
"key": "MMM-EmbedURL.config.embed[].appendTimestamp",
"description":"If this option is set to true a timestamp is added to each URL that is embedded. This is to avoid caching issues."
},
{
"title": "title",
"key": "MMM-EmbedURL.config.embed[].title",
"description":"Either a single String or a Array of String that will be added as title. It is supported to add html tags to the title"
},
{
"title": "fontIcon",
"key": "MMM-EmbedURL.config.embed[].fontIcon",
"description":"A single String or a Array of String containing the Fontawesome 4.7 or Iconify class definition of icons (i.e. \"fa fa-tint\" or \"fluent-emoji-flat:test-tube\"). Array or single String"
},
{
"title": "imgIcon",
"key": "MMM-EmbedURL.config.embed[].imgIcon",
"description":"If you want to use a image as icon instead of fontawesome 4.7 icons you can specify a single URL or a Array of URLs with this option. <br>If both fontIcon and imgIcon are specified the imgIcon will be used!"
},
{
"type":"array",
"title":"attributes",
"draggable": false,
"description":"This is a array with additional attributes that should be added to the embeded html element.",
"items":[
{
"title": "attribute {{idx}}",
"key": "MMM-EmbedURL.config.embed[].attributes[]"
}
]
},
{
"title": "embed",
"key": "MMM-EmbedURL.config.embed[].embed",
"type":"array",
"draggable": false,
"items" :[
{
"type": "fieldset",
"title": "embed {{idx}}",
"expandable": true,
"items": [
{
"type":"array",
"draggable": false,
"title":"urls",
"items":[
{
"title": " ",
"key": "MMM-EmbedURL.config.embed[].embed[].urls[]"
}
]
}
]
}
]
}
]
}
]
},
{
"title": "imgDecodeCheckInterval",
"key": "MMM-EmbedURL.config.imgDecodeCheckInterval",
"description":"If a value higher than 0 is set the module checks the content of all \"img\" embed elements to be decodeable. If the content is not decodeable the URL gets reset."
},
{
"title": "updateDomOnResume",
"key": "MMM-EmbedURL.config.updateDomOnResume",
"description":"The module updates all embeded elements if it gets resumed in the default configuration. If you do not want this behavior but wait for the updateInterval instead set this option to false"
}
]
}
],
"value": {
"disabled": true,
"module": "MMM-EmbedURL",
"position": "none",
"order": "*",
"inconfig": "0",
"config": {
"basicElementType": "div",
"embedElementType": "iframe",
"updateInterval": 60,
"animationSpeed": 500,
"positions": "tie",
"attributes": [
"frameborder=0"
],
"embed": "",
"imgDecodeCheckInterval": -1,
"updateDomOnResume": true
}
}
}