fix(core): disable doc info and backlinks in readonly mode (#6033)

close AFF-671

<img width="1422" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/ef80b195-3d67-4751-82d9-12973f331798">
This commit is contained in:
JimmFly
2024-03-06 10:07:20 +00:00
parent e96b86ec71
commit c7dd6778ac
2 changed files with 2 additions and 2 deletions

View File

@@ -1049,7 +1049,7 @@ export const PagePropertiesTable = ({ page }: { page: Doc }) => {
// if the given page is not in the current workspace, then we don't render anything
// eg. when it is in history modal
if (!manager.page) {
if (!manager.page || manager.readonly) {
return null;
}

View File

@@ -128,7 +128,7 @@ export const BlocksuiteDocEditor = forwardRef<
}}
></div>
) : null}
{docPage ? (
{docPage && !page.readonly ? (
<adapted.BiDirectionalLinkPanel doc={page} pageRoot={docPage} />
) : null}
</div>