fix(mobile): change mobile docs display config and prevent opening doc when close menu (#12903)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
- Updated document explorer to hide quick favorite and document icons,
and display more detailed system properties for each document.
- Enhanced link behavior in the workbench to prevent unintended clicks
from triggering navigation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Cats Juice 2025-06-24 10:17:57 +08:00 committed by GitHub
parent 1686b92adb
commit d743082d83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -15,8 +15,13 @@ import { AllDocsHeader } from '../../views';
const AllDocs = () => {
const [explorerContextValue] = useState(() =>
createDocExplorerContext({
quickFavorite: true,
displayProperties: ['createdAt', 'updatedAt', 'tags'],
quickFavorite: false,
showDocIcon: false,
displayProperties: [
'system:createdAt',
'system:updatedAt',
'system:tags',
],
view: 'masonry',
showDragHandle: false,
groupBy: undefined,

View File

@ -61,6 +61,11 @@ export const WorkbenchLink = forwardRef<HTMLAnchorElement, WorkbenchLinkProps>(
const link = basename + stringTo;
const handleClick = useAsyncCallback(
async (event: React.MouseEvent<HTMLAnchorElement>) => {
// a trick to prevent click from modal overlay propagation
if (!event.currentTarget.contains(event.target as Node)) {
return;
}
onClick?.(event);
if (event.defaultPrevented) {
return;