make file, image viewer wide (#1444)
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user