make file, image viewer wide (#1444)

This commit is contained in:
Ajay Bura 2023-10-10 17:07:03 +11:00 committed by GitHub
parent 5940cf24a0
commit d0f2a865bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View file

@ -25,6 +25,7 @@ import { bytesToSize } from '../../../utils/common';
import { TextViewer } from '../../../components/text-viewer'; import { TextViewer } from '../../../components/text-viewer';
import { READABLE_TEXT_MIME_TYPES } from '../../../utils/mimeTypes'; import { READABLE_TEXT_MIME_TYPES } from '../../../utils/mimeTypes';
import { PdfViewer } from '../../../components/Pdf-viewer'; import { PdfViewer } from '../../../components/Pdf-viewer';
import * as css from './styles.css';
export type FileContentProps = { export type FileContentProps = {
body: string; body: string;
@ -94,7 +95,11 @@ function ReadTextFile({ body, mimeType, url, encInfo }: Omit<FileContentProps, '
clickOutsideDeactivates: true, clickOutsideDeactivates: true,
}} }}
> >
<Modal size="500" onContextMenu={(evt: any) => evt.stopPropagation()}> <Modal
className={css.ModalWide}
size="500"
onContextMenu={(evt: any) => evt.stopPropagation()}
>
<TextViewer <TextViewer
name={body} name={body}
text={textState.data} text={textState.data}
@ -159,7 +164,11 @@ function ReadPdfFile({ body, mimeType, url, encInfo }: Omit<FileContentProps, 'i
clickOutsideDeactivates: true, clickOutsideDeactivates: true,
}} }}
> >
<Modal size="500" onContextMenu={(evt: any) => evt.stopPropagation()}> <Modal
className={css.ModalWide}
size="500"
onContextMenu={(evt: any) => evt.stopPropagation()}
>
<PdfViewer <PdfViewer
name={body} name={body}
src={pdfState.data} src={pdfState.data}

View file

@ -81,7 +81,11 @@ export const ImageContent = as<'div', ImageContentProps>(
clickOutsideDeactivates: true, clickOutsideDeactivates: true,
}} }}
> >
<Modal size="500" onContextMenu={(evt: any) => evt.stopPropagation()}> <Modal
className={css.ModalWide}
size="500"
onContextMenu={(evt: any) => evt.stopPropagation()}
>
<ImageViewer <ImageViewer
src={srcState.data} src={srcState.data}
alt={body} alt={body}

View file

@ -31,6 +31,11 @@ export const AbsoluteFooter = style([
}, },
]); ]);
export const ModalWide = style({
minWidth: '85vw',
minHeight: '90vh',
});
export const MessageBase = style({ export const MessageBase = style({
position: 'relative', position: 'relative',
}); });