mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 21:06:22 +08:00
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:
@@ -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
|
// if the given page is not in the current workspace, then we don't render anything
|
||||||
// eg. when it is in history modal
|
// eg. when it is in history modal
|
||||||
|
|
||||||
if (!manager.page) {
|
if (!manager.page || manager.readonly) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export const BlocksuiteDocEditor = forwardRef<
|
|||||||
}}
|
}}
|
||||||
></div>
|
></div>
|
||||||
) : null}
|
) : null}
|
||||||
{docPage ? (
|
{docPage && !page.readonly ? (
|
||||||
<adapted.BiDirectionalLinkPanel doc={page} pageRoot={docPage} />
|
<adapted.BiDirectionalLinkPanel doc={page} pageRoot={docPage} />
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user