Skip to content

Let's use AI to Earn!

提示的问题1

bulaienaofutuojiesenzhang6db613c4fcf2
diff --git a/@types/resources.d.ts b/@types/resources.d.ts
index 8c3448fb..cc12b081 100644
--- a/@types/resources.d.ts
+++ b/@types/resources.d.ts
@@ -1826,6 +1826,8 @@ interface Resources {
"upload": {
"finishingUp": "正在完成...",
"uploadImageOrVideo": "上传图片或视频",
+ "uploadImage": "上传图片",
+ "uploadVideo": "上传视频",
"dragAndSelect": "拖放 & 选择图片或视频"
},
"validation": {
@@ -1839,6 +1841,8 @@ interface Resources {
"descriptionRequired": "描述是必须的",
"imageMaxExceeded": "{{platformName}}图片最多不能超过{{maxCount}}张",
"uploadImageOrVideo": "请上传图片或视频",
+ "uploadImage": "上传图片",
+ "uploadVideo": "上传视频",
"topicMaxExceeded": "{{platformName}}话题最多不能超过{{maxCount}}个",
"topicFormatError": "描述中的话题必须使用空格分割,如:\"#话题1 #话题2\"",
"titleRequired": "标题是必须的",
diff --git a/src/app/[lng]/profile/page.tsx b/src/app/[lng]/profile/page.tsx
index 94fcdb4d..17b8f094 100644
--- a/src/app/[lng]/profile/page.tsx
+++ b/src/app/[lng]/profile/page.tsx
@@ -457,57 +457,6 @@ export default function ProfilePage() {
};
- // 积分记录表格列
- const pointsColumns = [
- {
- title: t('points.pointsChange'),
- dataIndex: 'amount',
- key: 'amount',
- render: (amount: number) => (
- <span style={{ color: amount > 0 ? '#52c41a' : '#ff4d4f', fontWeight: 'bold' }}>
- {amount > 0 ? '+' : ''}{amount}
- </span>
- ),
- },
- {
- title: t('points.balance'),
- dataIndex: 'balance',
- key: 'balance',
- render: (balance: number) => (
- <span style={{ fontWeight: 'bold' }}>
- {balance}
- </span>
- ),
- },
- {
- title: t('points.changeType'),
- dataIndex: 'type',
- key: 'type',
- render: (type: string) => {
- const typeMap: { [key: string]: { color: string; text: string } } = {
- 'ai_service': { color: 'green', text: t('points.aiService' as any) },
- 'user_register': { color: 'blue', text: t('points.userRegister' as any) },
- 'publish': { color: 'purple', text: t('points.publish' as any) },
- 'point': { color: 'cyan', text: t('points.point' as any) },
- 'earn': { color: 'green', text: t('points.earn' as any) },
- 'spend': { color: 'red', text: t('points.spend' as any) },
- 'refund': { color: 'blue', text: t('points.refund' as any) },
- 'expire': { color: 'orange', text: t('points.expire' as any) }
- };
- const config = typeMap[type] || { color: 'default', text: type };
- return <span style={{ color: config.color, fontWeight: 'bold' }}>{config.text}</span>;
- },
- },
- {
- title: t('points.description'),
- dataIndex: 'description',
- key: 'description',
- ellipsis: true,
- },
- ];
-
-
-
// 个人信息内容
const renderProfileContent = () => (
<div style={{}}>
@@ -517,14 +466,14 @@ export default function ProfilePage() {
{isVip && (
<div style={{
display: 'flex',
- alignItems: 'flex-start',
+ alignItems: 'center',
justifyContent: 'flex-start',
gap: 8,
color: '#a66ae4',
fontWeight: 700,
}}>
<Image src={plusvip} alt="VIP" className={styles.vipBadgeTop} />
- <span>{t('vipHonorText' as any)}</span>
+ <span style={{ fontSize: 16 }}>{t('vipHonorText' as any)}</span>
</div>
)}
diff --git a/src/app/[lng]/profile/profile.module.css b/src/app/[lng]/profile/profile.module.css
index e063b2de..00da8a81 100644
--- a/src/app/[lng]/profile/profile.module.css
+++ b/src/app/[lng]/profile/profile.module.css
@@ -968,7 +968,7 @@
}
.vipBadgeTop {
- width: 20px;
+ width: 22px;
height: auto;
}
diff --git a/src/app/i18n/locales/en/publish.json b/src/app/i18n/locales/en/publish.json
index 914c423e..525df575 100644
--- a/src/app/i18n/locales/en/publish.json
+++ b/src/app/i18n/locales/en/publish.json
@@ -50,6 +50,8 @@
"upload": {
"finishingUp": "Finishing up...",
"uploadImageOrVideo": "Upload image or video",
+ "uploadImage": "Please upload image",
+ "uploadVideo": "Please upload video",
"dragAndSelect": "Drag & select image or video"
},
"validation": {
@@ -63,6 +65,8 @@
"descriptionRequired": "Description is required",
"imageMaxExceeded": "{{platformName}} images cannot exceed {{maxCount}}",
"uploadImageOrVideo": "Please upload image or video",
+ "uploadImage": "Please upload image",
+ "uploadVideo": "Please upload video",
"topicMaxExceeded": "{{platformName}} topics cannot exceed {{maxCount}}",
"topicFormatError": "Topics in description must be separated by spaces, such as: \"#topic1 #topic2\"",
"titleRequired": "Title is required",
diff --git a/src/app/i18n/locales/zh-CN/publish.json b/src/app/i18n/locales/zh-CN/publish.json
index 047d5b54..d8b120fa 100644
--- a/src/app/i18n/locales/zh-CN/publish.json
+++ b/src/app/i18n/locales/zh-CN/publish.json
@@ -50,6 +50,8 @@
"upload": {
"finishingUp": "正在完成...",
"uploadImageOrVideo": "上传图片或视频",
+ "uploadImage": "请上传图片",
+ "uploadVideo": "请上传视频",
"dragAndSelect": "拖放 & 选择图片或视频"
},
"validation": {
@@ -63,6 +65,8 @@
"descriptionRequired": "描述是必须的",
"imageMaxExceeded": "{{platformName}}图片最多不能超过{{maxCount}}张",
"uploadImageOrVideo": "请上传图片或视频",
+ "uploadImage": "请上传图片",
+ "uploadVideo": "请上传视频",
"topicMaxExceeded": "{{platformName}}话题最多不能超过{{maxCount}}个",
"topicFormatError": "描述中的话题必须使用空格分割,如:\"#话题1 #话题2\"",
"titleRequired": "标题是必须的",
diff --git a/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx b/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx
index 99adf9f8..b8706067 100644
--- a/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx
+++ b/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx
@@ -158,7 +158,7 @@ const PubParmasTextareaUpload = memo(
)}
</div>
) : (
- <Tooltip title={t("upload.uploadImageOrVideo")}>
+ <Tooltip title={ t("upload.uploadImageOrVideo") } >
<Dragger
accept={uploadAccept}
multiple={uploadAccept.includes("image")}
diff --git a/src/components/PublishDialog/hooks/usePubParamsVerify.tsx b/src/components/PublishDialog/hooks/usePubParamsVerify.tsx
index b04139b1..7ef13e18 100644
--- a/src/components/PublishDialog/hooks/usePubParamsVerify.tsx
+++ b/src/components/PublishDialog/hooks/usePubParamsVerify.tsx
@@ -98,7 +98,15 @@ export default function usePubParamsVerify(data: PubItem[]) {
v.params.images?.length === 0 &&
!v.params.video
) {
- return setErrorMsg(t("validation.uploadImageOrVideo"));
+ let msgs:any = t("validation.uploadImageOrVideo");
+ if (platInfo.pubTypes.has(PubType.ImageText) && platInfo.pubTypes.has(PubType.VIDEO)) {
+ msgs = t("validation.uploadImageOrVideo");
+ } else if (platInfo.pubTypes.has(PubType.ImageText)) {
+ msgs = t("validation.uploadImage");
+ } else if (platInfo.pubTypes.has(PubType.VIDEO)) {
+ msgs = t("validation.uploadVideo");
+ }
+ return setErrorMsg(msgs);
}
// 话题数量校验