feat: Introduce configurable icon and card sizes for document views and desktop workspace.

This commit is contained in:
2025-12-01 11:45:58 +01:00
parent fea1bf68c5
commit 033026f57c
9 changed files with 39 additions and 27 deletions
@@ -24,7 +24,11 @@ import DocumentsPanelHeader, {
import { SelectionFloatingPanel } from '../SelectionFloatingActions';
import { createDocumentsTableHeaderActions } from './DocumentsToolbar';
import { useDocumentsFilter } from '../context/DocumentsFilterContext';
import { DEFAULT_GRID_ICON_SIZE } from '../../constants/documents';
import {
DEFAULT_GRID_ICON_SIZE,
DEFAULT_LIST_ICON_SIZE,
DEFAULT_DESKTOP_CARD_SIZE,
} from '../../constants/documents';
import type { Identifier } from '../../types/identifiers';
const EntryType = {
@@ -490,12 +494,12 @@ const DocumentsPanelInner: React.FC<DocumentsPanelInnerProps> = ({
switch (viewMode) {
case 'desk':
return <DesktopWorkspace {...viewProps} />;
return <DesktopWorkspace {...viewProps} defaultCardSize={DEFAULT_DESKTOP_CARD_SIZE} />;
case 'grid':
return <DocumentsGrid {...viewProps} gridIconSize={gridIconSize} />;
return <DocumentsGrid {...viewProps} iconSize={gridIconSize} />;
case 'list':
default:
return <DocumentsList {...viewProps} />;
return <DocumentsList {...viewProps} iconSize={DEFAULT_LIST_ICON_SIZE} />;
}
};