Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-08-05 14:39:27 +01:00
import React from 'react';
import { Stack, Box } from '@mantine/core';
import FileSourceButtons from './FileSourceButtons';
import FileDetails from './FileDetails';
import SearchInput from './SearchInput';
import FileListArea from './FileListArea';
import HiddenFileInput from './HiddenFileInput';
import { useFileManagerContext } from './FileManagerContext';
2025-08-05 14:39:27 +01:00
const MobileLayout: React.FC = () => {
const {
activeSource,
selectedFiles,
modalHeight,
} = useFileManagerContext();
2025-08-05 14:39:27 +01:00
return (
<Stack h="100%" gap="sm" p="sm">
{/* Section 1: File Sources - Fixed at top */}
<Box style={{ flexShrink: 0 }}>
<FileSourceButtons horizontal={true} />
2025-08-05 14:39:27 +01:00
</Box>
<Box style={{ flexShrink: 0 }}>
<FileDetails compact={true} />
2025-08-05 14:39:27 +01:00
</Box>
{/* Section 3: Search Bar - Fixed above file list */}
{activeSource === 'recent' && (
<Box style={{ flexShrink: 0 }}>
<SearchInput />
2025-08-05 14:39:27 +01:00
</Box>
)}
{/* Section 4: File List - Fixed height scrollable area */}
<Box style={{ flexShrink: 0 }}>
<FileListArea
scrollAreaHeight={`calc(${modalHeight} - ${selectedFiles.length > 0 ? '300px' : '200px'})`}
scrollAreaStyle={{ maxHeight: '400px', minHeight: '150px' }}
/>
</Box>
{/* Hidden file input for local file selection */}
<HiddenFileInput />
2025-08-05 14:39:27 +01:00
</Stack>
);
};
export default MobileLayout;