diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-12-16 22:27:10 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-12-16 22:27:10 -0800 |
| commit | a6e8a54f3e31f590284570a67a17e3f2a00feca5 (patch) | |
| tree | bf97216215b88c06a0946fec010fecb2f974f2b1 | |
| parent | b5bf0b2ccad217eb4a6ae61bc0371dd5a1e87afb (diff) | |
| -rw-r--r-- | src/renderer/src/components/Message.tsx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/renderer/src/components/Message.tsx b/src/renderer/src/components/Message.tsx index d46bdd5..f823f29 100644 --- a/src/renderer/src/components/Message.tsx +++ b/src/renderer/src/components/Message.tsx @@ -271,7 +271,25 @@ const Message: React.FC<MessageProps> = ({ message, channelNickname }) => { maxHeight: '300px', borderRadius: '6px', marginTop: '8px', - display: 'block' + display: 'block', + cursor: 'pointer' + }} + onClick={() => { + const fullscreenImg = document.createElement('img') + fullscreenImg.src = attachment.proxy_url || attachment.url + fullscreenImg.style.cssText = ` + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + object-fit: contain; + background: rgba(0, 0, 0, 0.9); + z-index: 9999; + cursor: pointer; + ` + fullscreenImg.onclick = () => document.body.removeChild(fullscreenImg) + document.body.appendChild(fullscreenImg) }} onError={(e) => { console.error('Attachment image failed to load:', attachment.filename) |
