mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 19:46:32 +08:00
fix(core): disable comment in local workspace (#13124)
Close AF-2731 #### PR Dependency Tree * **PR #13124** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Comment functionality is now available only for cloud workspaces and is disabled for local or shared modes. * **Bug Fixes** * Improved accuracy in enabling comments based on workspace type and configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -87,7 +87,7 @@ const usePatchSpecs = (mode: DocMode, shared?: boolean) => {
|
||||
|
||||
// comment may not be supported by the server
|
||||
const enableComment =
|
||||
serverConfig.features.includes(ServerFeature.Comment) && !shared;
|
||||
isCloud && serverConfig.features.includes(ServerFeature.Comment) && !shared;
|
||||
|
||||
const patchedSpecs = useMemo(() => {
|
||||
const manager = getViewManager()
|
||||
|
||||
@@ -119,7 +119,9 @@ const DetailPageImpl = memo(function DetailPageImpl() {
|
||||
const serverConfig = useLiveData(serverService.server.config$);
|
||||
|
||||
// comment may not be supported by the server
|
||||
const enableComment = serverConfig.features.includes(ServerFeature.Comment);
|
||||
const enableComment =
|
||||
workspace.flavour !== 'local' &&
|
||||
serverConfig.features.includes(ServerFeature.Comment);
|
||||
|
||||
useEffect(() => {
|
||||
if (isActiveView) {
|
||||
|
||||
Reference in New Issue
Block a user