diff --git a/frontend/src/components/ViewerModal.tsx b/frontend/src/components/ViewerModal.tsx index d697137..a225cd2 100644 --- a/frontend/src/components/ViewerModal.tsx +++ b/frontend/src/components/ViewerModal.tsx @@ -168,8 +168,8 @@ export default function ViewerModal({ left: 0, right: 0, pt: 'max(env(safe-area-inset-top), 8px)', - px: 2, - pb: 2, + px: { xs: 1, sm: 2 }, + pb: { xs: 1, sm: 2 }, display: 'flex', justifyContent: 'space-between', alignItems: 'center', @@ -177,26 +177,54 @@ export default function ViewerModal({ zIndex: 1, }} > - + {asset.original_filename} - - - + + + {onShare && ( - - + + )} {onDelete && ( - - + + )} - - + + @@ -205,30 +233,34 @@ export default function ViewerModal({ {currentIndex > 0 && ( - + )} {currentIndex < assets.length - 1 && ( - + )} @@ -243,9 +275,10 @@ export default function ViewerModal({ src={currentUrl} alt={asset.original_filename} sx={{ - maxWidth: '95%', - maxHeight: '85%', + maxWidth: { xs: 'calc(100% - 16px)', sm: '95%' }, + maxHeight: { xs: 'calc(100vh - 160px)', sm: '85%' }, objectFit: 'contain', + px: { xs: 1, sm: 0 }, }} /> )} @@ -257,8 +290,9 @@ export default function ViewerModal({ controls autoPlay sx={{ - maxWidth: '95%', - maxHeight: '85%', + maxWidth: { xs: 'calc(100% - 16px)', sm: '95%' }, + maxHeight: { xs: 'calc(100vh - 160px)', sm: '85%' }, + px: { xs: 1, sm: 0 }, }} /> )} @@ -270,24 +304,25 @@ export default function ViewerModal({ bottom: 0, left: 0, right: 0, - px: 2, - pt: 2, + px: { xs: 1, sm: 2 }, + pt: { xs: 1, sm: 2 }, pb: 'max(env(safe-area-inset-bottom), 8px)', bgcolor: 'rgba(0,0,0,0.5)', color: 'white', display: 'flex', justifyContent: 'center', - gap: 2, + gap: { xs: 1, sm: 2 }, + flexWrap: 'wrap', }} > - + {currentIndex + 1} / {assets.length} - + {(asset.size_bytes / 1024 / 1024).toFixed(2)} MB {asset.width && asset.height && ( - + {asset.width} × {asset.height} )} diff --git a/frontend/src/pages/ShareViewPage.tsx b/frontend/src/pages/ShareViewPage.tsx index da3c05d..e382f84 100644 --- a/frontend/src/pages/ShareViewPage.tsx +++ b/frontend/src/pages/ShareViewPage.tsx @@ -71,20 +71,20 @@ export default function ShareViewPage() { display: 'flex', alignItems: 'center', background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', - p: 2, + p: { xs: 1, sm: 2 }, }} > - - + + Общий доступ к файлу @@ -135,7 +135,15 @@ export default function ShareViewPage() { {!loading && share && asset && ( - + {asset.original_filename}