refactor: externalize local folder watch marker
This commit is contained in:
@@ -239,6 +239,13 @@ function applyLocalFolderSidebarSnapshot(nextDocument, options) {
|
||||
return applied;
|
||||
}
|
||||
|
||||
function markLocalFolderWatchApplied(value) {
|
||||
var appliedValue = String(value || 'projection');
|
||||
if (!document || !document.documentElement) return false;
|
||||
document.documentElement.setAttribute('data-mnote-local-folder-watch-applied', appliedValue);
|
||||
return true;
|
||||
}
|
||||
|
||||
function revealFileTreeRow(row) {
|
||||
if (!(row instanceof HTMLElement)) return;
|
||||
var node = row.closest('.tree-node');
|
||||
@@ -378,6 +385,7 @@ window.__mnoteFileTreeRuntime = {
|
||||
groupRowsByParent: groupRowsByParent,
|
||||
replaceSidebarTreeFromDocument: replaceSidebarTreeFromDocument,
|
||||
applyLocalFolderSidebarSnapshot: applyLocalFolderSidebarSnapshot,
|
||||
markLocalFolderWatchApplied: markLocalFolderWatchApplied,
|
||||
fileTreeRowKind: fileTreeRowKind,
|
||||
fileTreeRowDocumentId: fileTreeRowDocumentId,
|
||||
fileTreeRowAssetId: fileTreeRowAssetId,
|
||||
|
||||
Reference in New Issue
Block a user