';
return;
}
@@ -841,14 +873,13 @@ window._wsInitData = (function() {
try {
var meta = JSON.parse(content);
if (meta.file_path && /\.(png|jpe?g|gif|webp|svg|bmp|ico)$/i.test(meta.file_path)) {
- var wsId2 = 1;
- var imgUrl2 = '/api/files/' + wsId2 + '/' + encodeURIComponent(meta.file_path);
- this.previewPanelContent = '
';
+ var imgUrl2 = '/api/files/' + 1 + '/' + encodeURIComponent(meta.file_path);
+ body.innerHTML = '
';
return;
}
} catch(e) {}
- preview = '
'
- + '
'+getSvgIcon('file',32)+''
+ preview = '
'
+ + '' + getSvgIcon('file',32) + ''
+ (node.size_display || '') + ' — open to view
';
} else if (format === 'blocks') {
try {
@@ -856,16 +887,16 @@ window._wsInitData = (function() {
if (blocks && blocks.blocks) {
preview = blocks.blocks.slice(0, 30).map(function(b) {
var txt = b.content || b.text || (typeof b === 'string' ? b : '');
- return '
' + this._escHtml(txt) + '
';
+ return '
' + this._escHtml(txt) + '
';
}, this).join('');
}
} catch(e) { preview = '
' + this._escHtml(String(content).substring(0, 2000)) + '
'; }
} else {
preview = '
' + this._escHtml(String(content).substring(0, 2000)) + '
';
}
- this.previewPanelContent = preview || '
(empty)
';
+ body.innerHTML = preview || '
(empty)
';
} catch(e) {
- this.previewPanelContent = '
Preview not available
';
+ body.innerHTML = '
Preview not available
';
}
},
@@ -2800,33 +2831,27 @@ console.log('FLOWDECK v2.4.6 — IIFE done, _wsInitData keys:', Object.keys(wind