feat: 支持视频上传、预览及移动端适配
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
1. 功能增强: - 支持视频文件的上传、存储及缩略图自动生成 - 新增视频播放组件,支持在画廊和时间线中预览视频 - 引入 STOMP 协议支持 WebSocket 实时通知功能 - 增加分享页面(SSR 友好),支持通过 shareId 访问公开内容 2. 移动端优化: - 新增 BottomNav 底部导航组件,优化移动端交互体验 - 引入 useIsMobile 钩子,实现响应式布局切换 - 优化时间线卡片在小屏幕下的显示效果 3. 架构与组件: - 新增 ClientOnly 组件解决 SSR 激活不一致问题 - 新增 ResponsiveGrid 响应式网格布局组件 - 完善 Nginx 配置,增加 MinIO 对象存储代理 - 优化图片懒加载组件 TimelineImage,支持低分辨率占位图
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ImageItem } from '@/pages/gallery/typings';
|
||||
import { formatBytes } from '@/utils/timelineUtils';
|
||||
import { DeleteOutlined, DownloadOutlined, EyeOutlined } from '@ant-design/icons';
|
||||
import { DeleteOutlined, DownloadOutlined, EyeOutlined, PlayCircleOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Checkbox, Spin } from 'antd';
|
||||
import React, { FC } from 'react';
|
||||
import '../index.css';
|
||||
@@ -37,7 +37,12 @@ const ListView: FC<ListViewProps> = ({
|
||||
onScroll={onScroll}
|
||||
style={{ maxHeight: 'calc(100vh - 200px)', overflowY: 'auto' }}
|
||||
>
|
||||
{imageList.map((item: ImageItem, index: number) => (
|
||||
{imageList.map((item: ImageItem, index: number) => {
|
||||
const imageUrl = item.thumbnailInstanceId
|
||||
? `/file/image/${item.thumbnailInstanceId}?Authorization=${getAuthization()}`
|
||||
: `/file/image/${item.instanceId}?Authorization=${getAuthization()}`;
|
||||
|
||||
return (
|
||||
<Card key={item.instanceId} className="list-item-card" size="small">
|
||||
<div className="list-item">
|
||||
{batchMode && (
|
||||
@@ -51,14 +56,21 @@ const ListView: FC<ListViewProps> = ({
|
||||
style={{
|
||||
width: imageSize.width,
|
||||
height: imageSize.height,
|
||||
backgroundImage: `url(/file/image/${item.instanceId}?Authorization=${getAuthization()})`,
|
||||
backgroundImage: `url(${imageUrl})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
position: 'relative',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}
|
||||
onClick={() => !batchMode && onPreview(index)}
|
||||
/>
|
||||
>
|
||||
{(item.duration || item.thumbnailInstanceId) && (
|
||||
<PlayCircleOutlined style={{ fontSize: '48px', color: 'rgba(255,255,255,0.8)' }} />
|
||||
)}
|
||||
</div>
|
||||
<div className="list-item-info">
|
||||
<div className="image-title" title={item.imageName}>
|
||||
{item.imageName}
|
||||
@@ -86,7 +98,7 @@ const ListView: FC<ListViewProps> = ({
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
))}
|
||||
)})}
|
||||
{loadingMore && (
|
||||
<div style={{ textAlign: 'center', padding: '20px' }}>
|
||||
<Spin />
|
||||
|
||||
Reference in New Issue
Block a user