fix local folder resource lifecycle
This commit is contained in:
@@ -21,6 +21,7 @@ pub struct DocumentPaneViewModel {
|
||||
pub has_page_subtree: bool,
|
||||
pub primary_legacy_ids: bool,
|
||||
pub visible: bool,
|
||||
pub hide_title_header: bool,
|
||||
}
|
||||
|
||||
#[component]
|
||||
@@ -76,7 +77,11 @@ fn DocumentPane(model: DocumentPaneViewModel) -> impl IntoView {
|
||||
data-page-font={model.page_font.clone()}
|
||||
data-page-show-heading-numbers={model.page_show_heading_numbers.to_string()}
|
||||
>
|
||||
<header class="document-shell-header">
|
||||
<header
|
||||
class="document-shell-header"
|
||||
data-page-title-hidden={model.hide_title_header.to_string()}
|
||||
hidden={model.hide_title_header}
|
||||
>
|
||||
<div class="document-page-icon" aria-hidden="true">
|
||||
<span class="material-symbols-outlined material-symbols-filled mnote-material-page-icon" data-icon="home"></span>
|
||||
</div>
|
||||
@@ -177,6 +182,12 @@ pub fn DocumentPage(
|
||||
/// 右侧页面选项 JSON(可选)
|
||||
#[prop(optional)]
|
||||
secondary_page_options_json: String,
|
||||
/// 是否隐藏主文档页头标题
|
||||
#[prop(optional)]
|
||||
primary_hide_title_header: bool,
|
||||
/// 是否隐藏右侧文档页头标题
|
||||
#[prop(optional)]
|
||||
secondary_hide_title_header: bool,
|
||||
/// 是否显示管理员授权入口
|
||||
#[prop(optional)]
|
||||
show_admin_access_policy: bool,
|
||||
@@ -260,6 +271,7 @@ pub fn DocumentPage(
|
||||
has_page_subtree,
|
||||
primary_legacy_ids: true,
|
||||
visible: true,
|
||||
hide_title_header: primary_hide_title_header,
|
||||
};
|
||||
let secondary_model = DocumentPaneViewModel {
|
||||
pane_role: "secondary",
|
||||
@@ -278,6 +290,7 @@ pub fn DocumentPage(
|
||||
has_page_subtree: secondary_has_page_subtree,
|
||||
primary_legacy_ids: false,
|
||||
visible: secondary_visible,
|
||||
hide_title_header: secondary_hide_title_header,
|
||||
};
|
||||
view! {
|
||||
<PageLayout current_nav="documents" sidebar_tree_html={sidebar_tree_html.unwrap_or_default()} workspace_name={workspace_name.unwrap_or_default()} workspace_sidebar_html={workspace_sidebar_html.unwrap_or_default()} topbar_title={title.clone()} show_admin_access_policy={show_admin_access_policy} enable_tree_live={enable_tree_live}>
|
||||
|
||||
Reference in New Issue
Block a user