fix local markdown attachment regressions

This commit is contained in:
lix-2026
2026-05-29 11:13:05 +08:00
parent 1109e3c0d8
commit cbe789e034
63 changed files with 3249 additions and 1502 deletions
@@ -186,8 +186,9 @@
return;
}
var params = new URLSearchParams(window.location.search);
var sourceKind = (params.get('sourceKind') || '').trim();
if (sourceKind === 'local_folder') {
var sourceKind = (params.get('sourceKind') || '').trim()
|| (document.body instanceof HTMLElement ? (document.body.getAttribute('data-mnote-source-kind') || '').trim() : '');
if (sourceKind === 'local_folder' || bootstrap.transport === 'local-folder-events') {
applyTransport('local-folder-events');
applyStatus('connecting');
var localRootUri = (params.get('rootUri') || '').trim()
@@ -199,7 +200,7 @@
startWithSse(bootstrap, '', url);
return;
}
// No rootUri or EventSource unavailable — mark static and let polling fallback handle it
// No rootUri or EventSource unavailable — stay static and let caller surface events-required
applyTransport('local-folder-static');
applyStatus('static');
return;