diff --git a/net/web/src/User/Conversation/TopicItem/ImageAsset/ImageAsset.jsx b/net/web/src/User/Conversation/TopicItem/ImageAsset/ImageAsset.jsx
new file mode 100644
index 00000000..a18faf0a
--- /dev/null
+++ b/net/web/src/User/Conversation/TopicItem/ImageAsset/ImageAsset.jsx
@@ -0,0 +1,42 @@
+import React, { useRef, useEffect, useState } from 'react';
+import { Button, Modal } from 'antd';
+import ReactResizeDetector from 'react-resize-detector';
+import { SelectOutlined, ExpandOutlined, MinusCircleOutlined, PlayCircleOutlined } from '@ant-design/icons';
+import { ImageAssetWrapper } from './ImageAsset.styled';
+
+export function ImageAsset({ thumbUrl, fullUrl }) {
+
+ const [state, setState] = useState({ width: 0, height: 0, popout: false });
+
+ const updateState = (value) => {
+ setState((s) => ({ ...s, ...value }));
+ }
+
+ const onPopOut = () => {
+ updateState({ popout: true });
+ }
+
+ return (
+
+
+ {({ width, height }) => {
+ if (width != state.width || height != state.height) {
+ updateState({ width, height });
+ }
+ return
+ }}
+
+
+ { updateState({ popout: false })}}>
+
+
+
+ )
+}
+
diff --git a/net/web/src/User/Conversation/TopicItem/ImageAsset/ImageAsset.styled.js b/net/web/src/User/Conversation/TopicItem/ImageAsset/ImageAsset.styled.js
new file mode 100644
index 00000000..797d5ac3
--- /dev/null
+++ b/net/web/src/User/Conversation/TopicItem/ImageAsset/ImageAsset.styled.js
@@ -0,0 +1,30 @@
+import styled from 'styled-components';
+
+export const ImageAssetWrapper = styled.div`
+ position: relative;
+ height: 100%;
+
+ .viewer {
+ top: 0;
+ position: absolute;
+ }
+
+ .viewer:hover .overlay {
+ visibility: visible;
+ }
+
+ .overlay {
+ visibility: hidden;
+ position: relative;
+ background-color: black;
+ opacity: 0.5;
+ }
+
+ .expand {
+ padding-right: 2px;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ }
+`;
+
diff --git a/net/web/src/User/Conversation/TopicItem/TopicItem.jsx b/net/web/src/User/Conversation/TopicItem/TopicItem.jsx
index a79d5608..d6c0d290 100644
--- a/net/web/src/User/Conversation/TopicItem/TopicItem.jsx
+++ b/net/web/src/User/Conversation/TopicItem/TopicItem.jsx
@@ -3,6 +3,7 @@ import { TopicItemWrapper } from './TopicItem.styled';
import { useTopicItem } from './useTopicItem.hook';
import { VideoAsset } from './VideoAsset/VideoAsset';
import { AudioAsset } from './AudioAsset/AudioAsset';
+import { ImageAsset } from './ImageAsset/ImageAsset';
import { Avatar } from 'avatar/Avatar';
import { CommentOutlined } from '@ant-design/icons';
import { Carousel } from 'Carousel/Carousel';
@@ -18,10 +19,8 @@ export function TopicItem({ topic }) {
const renderAsset = (asset) => {
if (asset.image) {
- if (asset.image.thumb) {
- return
- }
- return
+ return
}
if (asset.video) {
return {
}, [thumbUrl, hdUrl, lqUrl]);
- const onFullScreen = () => {
+ const onPopOut = () => {
updateState({ inline: false, popout: true, popoutUrl: hdUrl, playing: false, inlineUrl: null });
}
@@ -51,7 +51,7 @@ export function VideoAsset({ thumbUrl, lqUrl, hdUrl }) {
- onFullScreen()}>
+
onPopOut()}>