fix(mobile): disable AI chat block peek on mobile (#8929)

This commit is contained in:
doodlewind 2024-11-26 11:06:14 +00:00
parent 75516c7584
commit 6ac8cca440
No known key found for this signature in database
GPG Key ID: 30B1140CE1C07C99

View File

@ -11,7 +11,10 @@ import { ChatWithAIIcon } from '../_common/icon';
import { AIChatBlockStyles } from './styles';
@Peekable({
enableOn: ({ doc }: AIChatBlockComponent) => !doc.readonly,
enableOn: ({ doc }: AIChatBlockComponent) => {
// Disable on mobile and readonly mode
return !BUILD_CONFIG.isMobileEdition && !doc.readonly;
},
})
export class AIChatBlockComponent extends BlockComponent<AIChatBlockModel> {
static override styles = AIChatBlockStyles;