fix: copy share link to clipboard command display issue (#7411)

fix AF-1027
This commit is contained in:
pengx17
2024-07-02 15:28:30 +00:00
parent b8b30e79e5
commit ef7ba273ab
3 changed files with 9 additions and 6 deletions
@@ -1,4 +1,7 @@
import { registerAffineCommand } from '@affine/core/commands';
import {
PreconditionStrategy,
registerAffineCommand,
} from '@affine/core/commands';
import { useSharingUrl } from '@affine/core/hooks/affine/use-share-url';
import { useIsActiveView } from '@affine/core/modules/workbench';
import { WorkspaceFlavour } from '@affine/env/workspace';
@@ -28,7 +31,7 @@ export function useRegisterCopyLinkCommands({
registerAffineCommand({
id: `affine:share-private-link:${docId}`,
category: 'affine:general',
preconditionStrategy: () => isActiveView,
preconditionStrategy: PreconditionStrategy.Never,
keyBinding: {
binding: '$mod+Shift+c',
},