Improve local filetree view state and sidebar performance
This commit is contained in:
@@ -61,6 +61,7 @@ pub async fn mindmap_object_shell(
|
||||
let file_tree_html =
|
||||
render_local_file_tree_html(root_uri, Some(&doc_id), None).unwrap_or_default();
|
||||
let workspace_projection = load_workspace_shell_projection(
|
||||
Some(&state),
|
||||
state.config(),
|
||||
&context,
|
||||
workspace_id.as_deref().unwrap_or("local-folder"),
|
||||
@@ -74,6 +75,7 @@ pub async fn mindmap_object_shell(
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
None,
|
||||
None,
|
||||
);
|
||||
(
|
||||
Some(workspace_name),
|
||||
@@ -82,6 +84,7 @@ pub async fn mindmap_object_shell(
|
||||
)
|
||||
} else if let Some(workspace_id) = workspace_id.as_deref() {
|
||||
let workspace_projection = load_workspace_shell_projection(
|
||||
Some(&state),
|
||||
state.config(),
|
||||
&context,
|
||||
workspace_id,
|
||||
@@ -109,6 +112,7 @@ pub async fn mindmap_object_shell(
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
None,
|
||||
None,
|
||||
);
|
||||
(
|
||||
Some(workspace_name),
|
||||
@@ -268,7 +272,7 @@ fn render_mindmap_standalone_bootstrap_script() -> &'static str {
|
||||
return window.__mnoteLeptosTiptapRuntimePromise;
|
||||
}
|
||||
window.__mnoteLeptosTiptapRuntimePromise = (async () => {
|
||||
const manifestResponse = await fetch('/api/leptos-tiptap-runtime/manifest.json', { cache: 'no-store' });
|
||||
const manifestResponse = await fetch('/api/leptos-tiptap-runtime/manifest.json');
|
||||
if (!manifestResponse.ok) throw new Error(`manifest_failed_${manifestResponse.status}`);
|
||||
const manifest = await manifestResponse.json();
|
||||
if (!manifest.entryAssetPath) throw new Error('island manifest 缺少 entryAssetPath');
|
||||
|
||||
Reference in New Issue
Block a user