fix send-message input
This commit is contained in:
parent
b2b849695b
commit
a6231610a7
@ -25,7 +25,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
height: 128px;
|
height: 128px;
|
||||||
max-width: 128px;
|
max-width: 128px;
|
||||||
margin-right: 16px;
|
margin-right: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drop-description {
|
.drop-description {
|
||||||
|
@ -94,6 +94,7 @@ $borderRadius: 8px;
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 12px 12px 12px 0;
|
padding: 12px 12px 12px 0;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
|
@ -3,7 +3,7 @@ const electronConsole = electronRemote.getGlobal('console') as Console;
|
|||||||
import Logger from '../../../../logger/logger';
|
import Logger from '../../../../logger/logger';
|
||||||
const LOG = Logger.create(__filename, electronConsole);
|
const LOG = Logger.create(__filename, electronConsole);
|
||||||
|
|
||||||
import React, { FC, useMemo, useRef } from 'react';
|
import React, { FC, useCallback, useMemo, useRef } from 'react';
|
||||||
import CombinedGuild from '../../guild-combined';
|
import CombinedGuild from '../../guild-combined';
|
||||||
import ElementsUtil, { IAlignment } from '../require/elements-util';
|
import ElementsUtil, { IAlignment } from '../require/elements-util';
|
||||||
import DownloadButton from '../components/button-download';
|
import DownloadButton from '../components/button-download';
|
||||||
@ -33,11 +33,27 @@ const ImageOverlay: FC<ImageOverlayProps> = (props: ImageOverlayProps) => {
|
|||||||
const [contextMenu, onContextMenu] = useContextClickContextMenu(
|
const [contextMenu, onContextMenu] = useContextClickContextMenu(
|
||||||
(_alignment: IAlignment, relativeToPos: { x: number; y: number }, close: () => void) => {
|
(_alignment: IAlignment, relativeToPos: { x: number; y: number }, close: () => void) => {
|
||||||
if (!isLoaded(resource)) return null;
|
if (!isLoaded(resource)) return null;
|
||||||
return <ImageContextMenu relativeToPos={relativeToPos} close={close} resourceName={resourceName} resourceBuff={resource.value.data} isPreview={false} />;
|
return (
|
||||||
|
<ImageContextMenu
|
||||||
|
relativeToPos={relativeToPos}
|
||||||
|
close={close}
|
||||||
|
resourceName={resourceName}
|
||||||
|
resourceBuff={resource.value.data}
|
||||||
|
isPreview={false}
|
||||||
|
/>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
[resource, resourceName],
|
[resource, resourceName],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const onBaseClick = useCallback(
|
||||||
|
(e: MouseEvent) => {
|
||||||
|
if (!rootRef.current) return 1;
|
||||||
|
return 2;
|
||||||
|
},
|
||||||
|
[rootRef],
|
||||||
|
);
|
||||||
|
|
||||||
const sizeText = useMemo(() => {
|
const sizeText = useMemo(() => {
|
||||||
if (isFailed(resource)) return 'Failed to load';
|
if (isFailed(resource)) return 'Failed to load';
|
||||||
if (!isLoaded(resource)) return 'Loading size...';
|
if (!isLoaded(resource)) return 'Loading size...';
|
||||||
@ -53,8 +69,12 @@ const ImageOverlay: FC<ImageOverlayProps> = (props: ImageOverlayProps) => {
|
|||||||
<div className="name">{resourceName}</div>
|
<div className="name">{resourceName}</div>
|
||||||
<div className="size">{sizeText}</div>
|
<div className="size">{sizeText}</div>
|
||||||
</div>
|
</div>
|
||||||
{/* TODO: I think this may break if the download button gets clicked before the resource is loaded... */}
|
{/* TODO: I think this may break if the download button gets clicked before the resource is loaded (and the downloadBuff is undefined)... */}
|
||||||
<DownloadButton downloadBuff={isLoaded(resource) ? resource.value.data : undefined} downloadBuffErr={isFailed(resource)} resourceName={resourceName} />
|
<DownloadButton
|
||||||
|
downloadBuff={isLoaded(resource) ? resource.value.data : undefined}
|
||||||
|
downloadBuffErr={isFailed(resource)}
|
||||||
|
resourceName={resourceName}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{contextMenu}
|
{contextMenu}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user