@signageos/front-display 14.25.0 → 14.25.1
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/dist/bundle.js +1 -1
- package/dist/console.js +14 -0
- package/package.json +1 -1
package/dist/console.js
CHANGED
|
@@ -41,6 +41,11 @@ Example use:
|
|
|
41
41
|
* leaks in the application.
|
|
42
42
|
*/
|
|
43
43
|
polyfillErrorStack: false,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Maximum number of lines in the log, after exceeded this amount oldest logs are removed
|
|
47
|
+
*/
|
|
48
|
+
maxChildCount: 200,
|
|
44
49
|
};
|
|
45
50
|
|
|
46
51
|
/** @param {string} name */
|
|
@@ -63,6 +68,7 @@ Example use:
|
|
|
63
68
|
SETTINGS.disableShadow = getParameterByName('disableShadow') !== null;
|
|
64
69
|
SETTINGS.defaultColor = getParameterByName('defaultColor') || SETTINGS.defaultColor;
|
|
65
70
|
SETTINGS.polyfillErrorStack = getParameterByName('polyfillErrorStack') !== null;
|
|
71
|
+
SETTINGS.maxChildCount = Number(getParameterByName('maxChildCount')) || SETTINGS.maxChildCount;
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
if (SETTINGS.polyfillErrorStack) {
|
|
@@ -143,6 +149,10 @@ Example use:
|
|
|
143
149
|
var firstChild = log.childNodes[0];
|
|
144
150
|
|
|
145
151
|
log.insertBefore(row, firstChild);
|
|
152
|
+
|
|
153
|
+
while (log.childElementCount > SETTINGS.maxChildCount) {
|
|
154
|
+
log.childNodes[log.childNodes.length - 1].remove();
|
|
155
|
+
}
|
|
146
156
|
} else {
|
|
147
157
|
preMountQueue.push([level, content]);
|
|
148
158
|
}
|
|
@@ -156,6 +166,10 @@ Example use:
|
|
|
156
166
|
function formatAny(content, depth) {
|
|
157
167
|
var indent = SETTINGS.depth - depth;
|
|
158
168
|
|
|
169
|
+
if (depth === SETTINGS.depth && Array.isArray(content) && content.length === 1 && typeof content[0] === 'string') {
|
|
170
|
+
return block([content[0]]);
|
|
171
|
+
}
|
|
172
|
+
|
|
159
173
|
if (depth <= 0 || isInlineable(content, depth)) {
|
|
160
174
|
try {
|
|
161
175
|
return block([
|