Fix filetree SSR tab selection
This commit is contained in:
@@ -484,6 +484,11 @@ pub async fn root_entry(
|
||||
&workspace_projection,
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
if requests_filetree_first {
|
||||
Some("filetree")
|
||||
} else {
|
||||
None
|
||||
},
|
||||
);
|
||||
let workspace_name = workspace_projection.workspace_name.clone();
|
||||
let active_page_id = selected_active_page_id.unwrap_or_default();
|
||||
@@ -663,6 +668,7 @@ pub async fn trash_entry(
|
||||
&workspace_projection,
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
None,
|
||||
);
|
||||
let trash_workbench_html = render_local_trash_workbench_html(
|
||||
&workspace_id,
|
||||
@@ -725,6 +731,7 @@ pub async fn trash_entry(
|
||||
&workspace_projection,
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
None,
|
||||
);
|
||||
let dataset = load_sidebar_dataset(state.config(), &context, &workspace_id)
|
||||
.await
|
||||
|
||||
@@ -73,6 +73,7 @@ pub async fn mindmap_object_shell(
|
||||
&workspace_projection,
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
None,
|
||||
);
|
||||
(
|
||||
Some(workspace_name),
|
||||
@@ -107,6 +108,7 @@ pub async fn mindmap_object_shell(
|
||||
&workspace_projection,
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
None,
|
||||
);
|
||||
(
|
||||
Some(workspace_name),
|
||||
|
||||
@@ -49,6 +49,7 @@ pub struct DocumentShellQuery {
|
||||
pub workspace_id: Option<String>,
|
||||
pub source_kind: Option<String>,
|
||||
pub root_uri: Option<String>,
|
||||
pub tree_view: Option<String>,
|
||||
pub secondary_document_id: Option<String>,
|
||||
pub secondary_source_kind: Option<String>,
|
||||
pub secondary_root_uri: Option<String>,
|
||||
@@ -142,6 +143,11 @@ pub async fn document_page_shell(
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty())
|
||||
== Some("local_folder");
|
||||
let requests_filetree_first = query
|
||||
.tree_view
|
||||
.as_deref()
|
||||
.map(str::trim)
|
||||
.is_some_and(|value| value == "filetree");
|
||||
let (sidebar_tree_html, file_tree_html) = if is_local_folder {
|
||||
let root_uri = query.root_uri.as_deref().unwrap_or_default();
|
||||
(
|
||||
@@ -168,6 +174,11 @@ pub async fn document_page_shell(
|
||||
&workspace_projection,
|
||||
Some(sidebar_tree_html.as_str()),
|
||||
Some(file_tree_html.as_str()),
|
||||
if requests_filetree_first {
|
||||
Some("filetree")
|
||||
} else {
|
||||
None
|
||||
},
|
||||
);
|
||||
let workspace_name = workspace_projection.workspace_name.clone();
|
||||
let page_subtree_json =
|
||||
|
||||
Reference in New Issue
Block a user