Skip to content

Let's use AI to Earn!

feat: The release record details are compatible with scenari… (#251)

Gao34e481e694b9
diff --git a/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/RecordCore.tsx b/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/RecordCore.tsx
index 688ab293..f69558e0 100644
--- a/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/RecordCore.tsx
+++ b/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/RecordCore.tsx
@@ -229,34 +229,39 @@ const RecordCore = memo(
{publishRecord.errorMsg}
</div>
</div>
- <div className="recordDetails-center-right">
- {publishRecord.videoUrl
- ? (
- <>
- <Image
- src={getOssUrl(publishRecord.coverUrl || '')}
- preview={{
- destroyOnHidden: true,
- imageRender: () => (
- <video
- muted
- width="80%"
- height={500}
- controls
- src={publishRecord.videoUrl}
- />
- ),
- toolbarRender: () => null,
- }}
- />
- </>
- )
- : (
- <Image.PreviewGroup items={publishRecord.imgUrlList}>
- <Image src={getOssUrl(publishRecord.coverUrl || '')} />
- </Image.PreviewGroup>
- )}
- </div>
+ {
+ (publishRecord.videoUrl && publishRecord.imgUrlList.length !== 0)
+ && (
+ <div className="recordDetails-center-right">
+ {publishRecord.videoUrl
+ ? (
+ <>
+ <Image
+ src={getOssUrl(publishRecord.coverUrl || '')}
+ preview={{
+ destroyOnHidden: true,
+ imageRender: () => (
+ <video
+ muted
+ width="80%"
+ height={500}
+ controls
+ src={publishRecord.videoUrl}
+ />
+ ),
+ toolbarRender: () => null,
+ }}
+ />
+ </>
+ )
+ : (
+ <Image.PreviewGroup items={publishRecord.imgUrlList}>
+ <Image src={getOssUrl(publishRecord.coverUrl || '')} />
+ </Image.PreviewGroup>
+ )}
+ </div>
+ )
+ }
</div>
<ScrollButtonContainer>
<div className="recordDetails-info">
@@ -325,9 +330,14 @@ const RecordCore = memo(
<img src={platIcon} style={{ width: '25px', height: '25px' }} />
<div className="recordCore-left-date">{days.format('HH:mm')}</div>
</div>
- <div className="recordCore-right">
- <img src={getOssUrl(publishRecord.coverUrl || '')} />
- </div>
+ {
+ publishRecord.coverUrl
+ && (
+ <div className="recordCore-right">
+ <img src={getOssUrl(publishRecord.coverUrl || '')} />
+ </div>
+ )
+ }
</Button>
</Popover>
)
diff --git a/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/recordCore.module.scss b/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/recordCore.module.scss
index a11c44b8..d69f8c0d 100644
--- a/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/recordCore.module.scss
+++ b/project/web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/components/recordCore.module.scss
@@ -80,6 +80,7 @@
border-bottom: 1px solid var(--grayColor2);
&-left {
width: 100%;
+ min-height: 150px;
&-status {
margin-top: 15px;
}
diff --git a/project/web/src/components/PublishDialog/index.tsx b/project/web/src/components/PublishDialog/index.tsx
index 24d1cf06..afdd0d4c 100644
--- a/project/web/src/components/PublishDialog/index.tsx
+++ b/project/web/src/components/PublishDialog/index.tsx
@@ -550,8 +550,10 @@ const PublishDialog = memo(
onClose()
setCreateLoading(false)
- if (onPubSuccess)
+ if (onPubSuccess) {
onPubSuccess()
+ }
+ usePublishDialogStorageStore.getState().clearPubData()
}, [pubListChoosed])
const imperativeHandle: IPublishDialogRef = {