diff --git a/src/components/file/DashboardFile/FileViewer.tsx b/src/components/file/DashboardFile/FileViewer.tsx index bdabb700..9fa603ca 100644 --- a/src/components/file/DashboardFile/FileViewer.tsx +++ b/src/components/file/DashboardFile/FileViewer.tsx @@ -550,10 +550,11 @@ export default function FileViewer({ flexDirection: 'column', alignItems: 'center', justifyContent: 'flex-start', - width: '100%', - height: 'fit-content', + alignSelf: 'stretch', + flex: 1, minWidth: 0, minHeight: 0, + width: '100%', overflow: 'visible', paddingLeft: '4rem', paddingRight: '4rem', diff --git a/src/components/file/DashboardFileType/index.tsx b/src/components/file/DashboardFileType/index.tsx index 10417db5..0519c500 100644 --- a/src/components/file/DashboardFileType/index.tsx +++ b/src/components/file/DashboardFileType/index.tsx @@ -36,6 +36,24 @@ export function Placeholder({ text, Icon, ...props }: { text: string; Icon: Icon ); } +function FullscreenSizedMedia({ children }: { children: React.ReactNode }) { + return ( + + {children} + + ); +} + export default function DashboardFileType({ file, show, @@ -97,9 +115,6 @@ export default function DashboardFileType({ } const isAsciicast = file.type === 'application/x-asciicast' || file.name.endsWith('.cast'); - const mediaMax = fullscreen - ? { maxWidth: 'min(96vw, calc(100vw - 3rem))', maxHeight: 'calc(100vh - 7.5rem)' } - : undefined; if (type === 'video') { if (!fileUrl) return ; @@ -123,21 +138,24 @@ export default function DashboardFileType({ return ; } - return ( + const video = (