diff --git a/src/client/webapp/elements-styles/components/file-drop-target.scss b/src/client/webapp/elements-styles/components/file-drop-target.scss index 96cac36..06e699c 100644 --- a/src/client/webapp/elements-styles/components/file-drop-target.scss +++ b/src/client/webapp/elements-styles/components/file-drop-target.scss @@ -25,7 +25,7 @@ display: block; height: 128px; max-width: 128px; - margin-right: 16px; + margin-right: 32px; } .drop-description { diff --git a/src/client/webapp/elements-styles/sections/send-message.scss b/src/client/webapp/elements-styles/sections/send-message.scss index 23db4b9..5899785 100644 --- a/src/client/webapp/elements-styles/sections/send-message.scss +++ b/src/client/webapp/elements-styles/sections/send-message.scss @@ -94,6 +94,7 @@ $borderRadius: 8px; flex: 1; padding: 12px 12px 12px 0; max-height: 300px; + overflow-x: hidden; overflow-y: scroll; overflow-wrap: anywhere; white-space: pre; diff --git a/src/client/webapp/elements/overlays/overlay-image.tsx b/src/client/webapp/elements/overlays/overlay-image.tsx index 7510ff2..c1be13d 100644 --- a/src/client/webapp/elements/overlays/overlay-image.tsx +++ b/src/client/webapp/elements/overlays/overlay-image.tsx @@ -3,7 +3,7 @@ const electronConsole = electronRemote.getGlobal('console') as Console; import Logger from '../../../../logger/logger'; 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 ElementsUtil, { IAlignment } from '../require/elements-util'; import DownloadButton from '../components/button-download'; @@ -33,11 +33,27 @@ const ImageOverlay: FC = (props: ImageOverlayProps) => { const [contextMenu, onContextMenu] = useContextClickContextMenu( (_alignment: IAlignment, relativeToPos: { x: number; y: number }, close: () => void) => { if (!isLoaded(resource)) return null; - return ; + return ( + + ); }, [resource, resourceName], ); + const onBaseClick = useCallback( + (e: MouseEvent) => { + if (!rootRef.current) return 1; + return 2; + }, + [rootRef], + ); + const sizeText = useMemo(() => { if (isFailed(resource)) return 'Failed to load'; if (!isLoaded(resource)) return 'Loading size...'; @@ -53,8 +69,12 @@ const ImageOverlay: FC = (props: ImageOverlayProps) => {
{resourceName}
{sizeText}
- {/* 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)... */} + {contextMenu}