Skip to content

Let's use AI to Earn!

up web

bulaienaofutuojiesenzhang0f1a86a8c7ee
diff --git a/aitoearn_web/aitoearn-web/.eslintignore b/aitoearn_web/aitoearn-web/.eslintignore
new file mode 100644
index 00000000..1ca4c483
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/.eslintignore
@@ -0,0 +1 @@
+/src/components/ImageEditorModal/tui-image-editor/
diff --git a/aitoearn_web/aitoearn-web/@types/resources.d.ts b/aitoearn_web/aitoearn-web/@types/resources.d.ts
index 468b40b0..b14ebea2 100644
--- a/aitoearn_web/aitoearn-web/@types/resources.d.ts
+++ b/aitoearn_web/aitoearn-web/@types/resources.d.ts
@@ -42,14 +42,18 @@ interface Resources {
"fetchError": "获取页面列表失败",
"submitError": "页面选择失败",
"submitSuccess": "页面选择成功",
- "selectAtLeastOne": "请至少选择一个页面"
+ "selectAtLeastOne": "请至少选择一个页面",
+ "noPagesMessage": "您还没有创建任何Facebook页面",
+ "createPageTip": "点击上方链接创建页面,然后点击刷新按钮",
+ "createPageLink": "创建Facebook页面",
+ "refresh": "刷新"
},
"listMode": {
"title": "发布计划列表",
"recordCount": "共 {{count}} 条发布计划",
"newWork": "新建作品",
"noRecords": "暂无发布计划",
- "queue": "列表",
+ "queue": "我的发布",
"sent": "发布历史",
"createdDaysAgo": "您于 {{days}} 天前创建",
"viewPost": "查看帖子",
@@ -65,6 +69,10 @@ interface Resources {
"error": "IP信息获取失败",
"tooltip": "ASN: {{asn}}\n组织: {{org}}"
},
+ "ipType": {
+ "direct": "直连",
+ "proxy": "代理"
+ },
"createSpace": {
"title": "新建空间",
"button": "新建空间",
@@ -102,12 +110,39 @@ interface Resources {
"platform": "平台",
"space": "所属列表"
},
+ "deleteAccount": "删除账户",
+ "messages": {
+ "ipLocationError": "获取IP地理位置信息失败",
+ "createSpaceFirst": "请先创建空间",
+ "deleteSuccess": "删除成功",
+ "facebookAuthFailed": "Facebook授权失败",
+ "unsupportedPlatform": "未支持的平台类型",
+ "accountListRefreshed": "账号列表已刷新",
+ "refreshAccountListFailed": "刷新账号列表失败",
+ "authFailed": "授权失败",
+ "pleaseRetry": "请重试",
+ "platformNotSupported": "暂不支持 {{platform}} 平台的直接授权",
+ "sortSuccess": "排序成功",
+ "sortFailed": "排序失败"
+ },
"rednote": "小红书",
"kwai": "快手",
"bilibili": "哔哩哔哩",
"wxgzh": "微信公众号",
"douyin": "抖音",
- "wxsph": "微信视频号"
+ "wxsph": "微信视频号",
+ "deleteConfirm": {
+ "title": "删除提示",
+ "content": "是否删除以下 {{count}} 个账号?",
+ "cancel": "取消",
+ "confirm": "确认"
+ },
+ "mobileOnlySupport": "移动端支持",
+ "reauthConfirm": {
+ "title": "会话已过期",
+ "content": "您的 {{platformName}} 账号 \"{{nickname}}\"(位于 {{spaceName}})会话已过期。是否重新登录?",
+ "loginAgain": "重新登录"
+ }
},
"cgmaterial": {
"header": {
@@ -394,10 +429,6 @@ interface Resources {
"collectCount": "收藏数",
"forwardCount": "分享数"
},
- "demo": {
- "demoText": "测试文字",
- "title": "测试页面标题"
- },
"engagement": {
"title": "互动数据",
"columns": {
@@ -432,6 +463,7 @@ interface Resources {
"header": {
"logo": "Aitoearn",
"nav": {
+ "home": "首页",
"marketplace": "市场",
"pricing": "价格",
"status": "状态",
@@ -747,6 +779,85 @@ interface Resources {
"backToAll": "返回全部",
"last90days": "近90天"
},
+ "imageEditor": {
+ "Load": "加载本地",
+ "Download": "下载当前",
+ "Custom": "自定义",
+ "Square": "正方形",
+ "Apply": "应用",
+ "Cancel": "取消",
+ "Free": "自由设定",
+ "Straight": "直线",
+ "Color": "颜色",
+ "Range": "粗细",
+ "Grayscale": "灰度",
+ "Invert": "旋转",
+ "Sepia": "深褐色",
+ "Sepia2": "深褐色2",
+ "Blur": "模糊",
+ "Sharpen": "锐化",
+ "Emboss": "浮雕",
+ "Remove White": "消除白色",
+ "Distance": "边距",
+ "Brightness": "亮度",
+ "Noise": "降噪",
+ "Pixelate": "像素化",
+ "Color Filter": "颜色过滤",
+ "Threshold": "阈值",
+ "Tint": "色调",
+ "Multiply": "复合",
+ "Flip X": "镜像",
+ "Flip Y": "翻转",
+ "Reset": "重置",
+ "Arrow-1": "箭头1",
+ "Arrow-2": "箭头2",
+ "Arrow-3": "箭头3",
+ "Star-1": "星形1",
+ "Star-2": "星形2",
+ "Polygon": "多边形",
+ "Location": "定位",
+ "Heart": "心形",
+ "Bubble": "气泡",
+ "Custom icon": "自定义图标",
+ "Load Mask Image": "加载水印",
+ "Width": "宽",
+ "Height": "高",
+ "Lock Aspect Ratio": "保持尺寸比例",
+ "Rectangle": "矩形",
+ "Circle": "圆形",
+ "Triangle": "三角形",
+ "Fill": "填充",
+ "Stroke": "画笔",
+ "Bold": "加粗",
+ "Italic": "斜体",
+ "Underline": "下划线",
+ "Left": "居左",
+ "Center": "居中",
+ "Right": "居右",
+ "Text size": "字体大小",
+ "Zoom In": "放大",
+ "Zoom Out": "缩小",
+ "ZoomIn": "放大",
+ "ZoomOut": "缩小",
+ "Hand": "拖动",
+ "Resize": "尺寸",
+ "Crop": "裁剪",
+ "Flip": "翻转",
+ "Rotate": "旋转",
+ "Draw": "画笔",
+ "Shape": "形状",
+ "Icon": "图标",
+ "Text": "文字",
+ "Mask": "水印",
+ "Filter": "滤镜",
+ "History": "历史动作",
+ "Undo": "撤退",
+ "Redo": "重做",
+ "Delete": "去除",
+ "DeleteAll": "全部去除",
+ "Blend": "混合",
+ "imageEditing": "图像编辑"
+ },
"income": {
"title": "我的收入",
"subtitle": "管理您的收入记录和提现申请",
@@ -795,6 +906,47 @@ interface Resources {
},
"myWallet": "我的钱包"
},
+ "interactive": {
+ "title": "互动管理",
+ "messages": {
+ "pleaseLoginFirst": "请先登录",
+ "commentSuccess": "评论成功",
+ "commentFailed": "评论失败,请重试",
+ "replySuccess": "回复成功",
+ "replyFailed": "回复失败,请重试"
+ },
+ "ui": {
+ "selectChannel": "请在左侧选择需要互动的频道",
+ "selectChannelDesc": "选择一个账号后,将自动加载该频道的最新作品与评论互动功能。",
+ "loadMore": "加载更多",
+ "noMorePosts": "没有更多作品",
+ "loading": "加载中...",
+ "sending": "发送中...",
+ "send": "发送",
+ "reply": "回复",
+ "expandReplies": "展开回复",
+ "collapseReplies": "收起回复",
+ "loadMoreReplies": "加载更多回复",
+ "loadMoreComments": "加载更多评论",
+ "commentPlaceholder": "输入评论...",
+ "replyPlaceholder": "回复@{name}",
+ "noImage": "无图片"
+ },
+ "stats": {
+ "likes": "点赞",
+ "comments": "评论",
+ "views": "浏览",
+ "shares": "分享",
+ "clicks": "点击",
+ "impressions": "曝光",
+ "favorites": "收藏"
+ },
+ "mediaTypes": {
+ "video": "视频",
+ "image": "图片",
+ "article": "文章"
+ }
+ },
"login": {
"welcomeBack": "哎呦赚",
"emailPlaceholder": "邮箱",
@@ -803,6 +955,10 @@ interface Resources {
"or": "或",
"forgotPassword": "忘记密码?",
"completeRegistration": "完成注册",
+ "emailCode": "邮箱验证码",
+ "emailCodeRequired": "请输入邮箱验证码",
+ "emailCodeLength": "验证码长度为6位",
+ "enterEmailCode": "请输入邮箱验证码",
"setPassword": "设置密码",
"passwordRequired": "请输入密码",
"passwordMinLength": "密码长度不能小于6位",
@@ -810,6 +966,7 @@ interface Resources {
"inviteCode": "邀请码(选填)",
"enterInviteCode": "请输入邀请码",
"waitingForActivation": "等待激活中...",
+ "registering": "注册中...",
"loginSuccess": "登录成功",
"loginFailed": "登录失败",
"loginError": "登录失败,请稍后重试",
@@ -1655,7 +1812,6 @@ interface Resources {
"status": "状态",
"createTime": "创建时间",
"expireTime": "过期时间",
- "xufeiTime": "续费时间",
"actions": "操作",
"viewDetails": "查看详情",
"goToPay": "去支付",
@@ -1774,6 +1930,44 @@ interface Resources {
"completelyFree": "🎁 完全免费,无需支付任何费用",
"claimNow": "立即领取",
"later": "稍后再说"
+ },
+ "vipHonorText": "您是尊贵的VIP用户",
+ "inviteCode": "邀请码",
+ "edit": "编辑",
+ "copy": "复制",
+ "copySuccess": "已复制",
+ "cancelAccount": "注销账户",
+ "cancelAccountWarning": "注销账户是不可逆的操作,一旦注销,您的所有数据将被永久删除,包括:",
+ "cancelAccountDataList": "个人资料和设置,所有发布的内容,积分和会员权益,订单和支付记录",
+ "cancelAccountCaution": "请谨慎操作!",
+ "cancelAccountSecurity": "为了您的账户安全,请先获取验证码进行身份验证。",
+ "verificationCode": "验证码",
+ "pleaseEnterVerificationCode": "请输入验证码",
+ "getVerificationCode": "获取验证码",
+ "resendAfter": "s后重发",
+ "confirmCancel": "确认注销",
+ "stats": {
+ "totalEarned": "累计赚钱",
+ "balance": "当前余额",
+ "points": "可用积分",
+ "coupons": "优惠券",
+ "currencyYuan": "元"
+ },
+ "deleteAccount": {
+ "title": "删除你的账户",
+ "desc": "删除账户后,你将无法继续使用 Aitoearn 服务,我们也会永久删除你的个人数据。",
+ "apply": "申请注销"
+ },
+ "messages": {
+ "getPointsRecordsFailed": "获取积分记录失败",
+ "verificationCodeSent": "验证码已发送",
+ "getVerificationCodeFailed": "获取验证码失败",
+ "accountCancelledSuccess": "账户注销成功",
+ "priceId": "价格ID"
+ },
+ "memberTypes": {
+ "oneTime": "一次性",
+ "trial": "试用"
}
},
"publish": {
@@ -1791,14 +1985,19 @@ interface Resources {
"delete": "删除"
},
"tips": {
- "workSaved": "请选择要发布的账户"
+ "workSaved": "请选择要发布的账户",
+ "pcNotSupported": "Web不支持该平台,请下载App进行发布",
+ "accountOffline": "该账号已离线,无法发布",
+ "tiktokForbidden": "该平台暂不支持发布"
},
"status": {
"publishFailed": "发布失败",
"publishing": "发布中",
"publishSuccess": "发布成功",
- "waitingPublish": "等待发布"
+ "waitingPublish": "等待发布",
+ "unknown": "未知状态"
},
+ "creationInfo": "您于 {{date}} 创建了此内容",
"form": {
"title": "标题",
"titlePlaceholder": "请输入标题",
@@ -1821,13 +2020,19 @@ interface Resources {
"categoryPlaceholder": "请选择视频分类",
"categoryPlaceholderDisabled": "请先选择国区",
"board": "Board",
- "boardPlaceholder": "请选择Board"
+ "boardPlaceholder": "请选择Board",
+ "location": "位置",
+ "searchLocation": "搜索位置",
+ "selectLocation": "请选择位置",
+ "description": "描述",
+ "descriptionPlaceholder": "开始写"
},
+ "writingAssistant": "写作助手",
"upload": {
"finishingUp": "正在完成...",
"uploadImageOrVideo": "上传图片或视频",
- "uploadImage": "上传图片",
- "uploadVideo": "上传视频",
+ "uploadImage": "请上传图片",
+ "uploadVideo": "请上传视频",
"dragAndSelect": "拖放 & 选择图片或视频"
},
"validation": {
@@ -1839,10 +2044,9 @@ interface Resources {
"titleMaxExceeded": "{{platformName}}标题最多{{maxCount}}字",
"descriptionMaxExceeded": "{{platformName}}描述最多{{maxCount}}字",
"descriptionRequired": "描述是必须的",
- "imageMaxExceeded": "{{platformName}}图片最多不能超过{{maxCount}}张",
"uploadImageOrVideo": "请上传图片或视频",
- "uploadImage": "上传图片",
- "uploadVideo": "上传视频",
+ "uploadImage": "请上传图片",
+ "uploadVideo": "请上传视频",
"topicMaxExceeded": "{{platformName}}话题最多不能超过{{maxCount}}个",
"topicFormatError": "描述中的话题必须使用空格分割,如:\"#话题1 #话题2\"",
"titleRequired": "标题是必须的",
@@ -1851,7 +2055,29 @@ interface Resources {
"sourceRequired": "转载时必须填写转载来源!",
"pageRequired": "您必须选择页面!",
"boardRequired": "您必须选择Board!",
- "coverSizeError": "封面最小尺寸400*400!"
+ "coverSizeError": "封面最小尺寸400*400!",
+ "imageOnly": "已有图片,仅可继续上传图片,不能上传视频!",
+ "videoOnly": "已有视频,仅可继续上传视频,不能上传图片!",
+ "imageVideoMixed": "图片和视频不能混合上传!",
+ "onlyImageOrVideo": "只能上传图片或视频文件!",
+ "videoMaxExceeded": "视频上传数量不能大于{{maxCount}}",
+ "imageMaxExceeded": "图片上传数量不能大于{{maxCount}}",
+ "instagramImageValidation": "在 Instagram 网格和动态中获得最佳效果,建议上传 4:5 比例的图片。",
+ "facebookReelDuration": "Facebook Reel视频时长需为3–90秒",
+ "facebookStoryDuration": "Facebook Story视频时长需为3–4小时",
+ "instagramVideoSize": "Instagram视频大小不能超过100MB",
+ "instagramReelDuration": "Instagram Reel视频时长需为5秒–15分钟",
+ "instagramStoryDuration": "Instagram Story视频时长需为3–60秒",
+ "threadsVideoSize": "Threads视频大小不能超过1GB",
+ "threadsVideoDuration": "Threads视频时长需为0秒以上且不超过5分钟",
+ "threadsImageMin": "Threads图片至少需要两张",
+ "pinterestVideoDuration": "Pinterest视频时长需为4秒–15分钟",
+ "pinterestVideoSize": "Pinterest视频大小不能超过1GB",
+ "tiktokVideoDuration": "TikTok视频时长需为3秒至10分钟",
+ "tiktokVideoSize": "TikTok视频大小不能超过1GB",
+ "tiktokVideoMinResolution": "TikTok视频最小分辨率为360x360",
+ "twitterVideoDuration": "Twitter视频时长需为0.5秒–140秒",
+ "twitterVideoSize": "Twitter视频大小不能超过512MB"
},
"preview": {
"title": "预览",
@@ -1885,7 +2111,17 @@ interface Resources {
"actions": {
"selectMaterial": "选择素材",
"selectDraft": "选择草稿",
- "cropCover": "裁剪封面"
+ "cropCover": "裁剪封面",
+ "contentModeration": "内容安全检测",
+ "checkingContent": "检测中...",
+ "contentSafe": "内容安全",
+ "riskLevel": "等级:",
+ "contentUnsafe": "内容不安全",
+ "preview": "点击查看"
+ },
+ "badges": {
+ "offline": "已离线",
+ "forbidden": "禁"
},
"tiktok": {
"creatorInfo": "创作者信息",
@@ -1914,7 +2150,8 @@ interface Resources {
"branded": "发布即表示您同意 TikTok 的品牌内容政策音乐使用确认。",
"both": "发布即表示您同意 TikTok 的品牌内容政策音乐使用确认。"
}
- }
+ },
+ "previewvideo": "预览视频"
},
"route": {
"home": "首页",
@@ -2042,6 +2279,8 @@ interface Resources {
"title": "PLUS会员",
"description": "开通会员解锁全部功能,立享8种权益",
"activateNow": "立即开通",
+ "upgrade": "开通会员",
+ "membership": "会员",
"pleaseLoginFirst": "请先登录",
"paymentOrderCreated": "支付订单创建成功",
"paymentLinkNotFound": "未获取到支付链接",
@@ -2076,6 +2315,167 @@ interface Resources {
"onceMonth": "一次性月度",
"month": "月度订阅",
"year": "年度订阅"
+ },
+ "planTitles": {
+ "month": "月费会员",
+ "year": "年费会员",
+ "onceMonth": "月度会员"
+ },
+ "selectDuration": "选择开通时长",
+ "autoRenewal": "自动续订,随时取消",
+ "priceUnits": {
+ "month": "/月",
+ "year": "/年"
+ },
+ "subscriptionManagement": "订阅管理",
+ "subscriptionPlanManagement": "订阅计划管理",
+ "subscriptionPlans": "订阅计划",
+ "purchaseHistory": "购买记录",
+ "myMembership": "我的会员",
+ "basicMembership": "基础会员",
+ "validUntil": "有效期至",
+ "activatedAutoRenewalPlans": "已开通自动续费套餐",
+ "activatedAutoRenewalPlansno": "未开通自动续费套餐",
+ "noAutoRenewalItems": "你还没有开通自动续费项目哦",
+ "viewMorePlans": "查看更多套餐",
+ "continuousAnnual": "连续包年",
+ "oneTimePurchase": "一次性购买",
+ "alipayPayment": "支付宝支付",
+ "noMoreContent": "没有内容了",
+ "previousPage": "上一页",
+ "nextPage": "下一页",
+ "pageInfo": "第 {current} 页,共 {total} 页",
+ "continuousMember": "连续会员",
+ "singleMember": "单月会员",
+ "autoRenewalEnabled": "自动续费已开启",
+ "autoRenewalDisabled": "自动续费未开启",
+ "nextRenewalDate": "下次续费时间",
+ "membershipExpires": "有效期至",
+ "currentPlan": "当前计划",
+ "modal": {
+ "title": "免费试用7天会员",
+ "highlight": "立得100积分",
+ "choosePlan": "选择合适你的套餐,或直接",
+ "buyPoints": "购买积分",
+ "pointsDetail": "积分详情",
+ "vipInfo": {
+ "details": "详情",
+ "subscription": "订阅管理",
+ "planType": "计划",
+ "monthly": "连续包月PLUS会员",
+ "monthly2": "月度会员",
+ "yearly": "连续包年PLUS会员",
+ "yearly2": "年度会员",
+ "singleMonth": "单月会员",
+ "trial": "试用中",
+ "cancelled": "已退订",
+ "expireTime": "到期时间",
+ "xufeiTime": "续费时间",
+ "remainingPoints": "剩余积分",
+ "buyPoints": "购买积分"
+ },
+ "tabs": {
+ "yearly": "连续包年",
+ "monthly": "连续包月",
+ "once": "单月购买"
+ },
+ "savings": {
+ "yearly": "省50%",
+ "monthly": "省25%"
+ },
+ "free": {
+ "title": "免费",
+ "price": "¥0",
+ "period": "每月",
+ "forever": "永久",
+ "currentPlan": "当前计划",
+ "freePlan": "免费计划",
+ "points": "每月签到赠送60积分",
+ "features": {
+ "dailyPoints": "每月最高10+次seedance等模型视频生成",
+ "maxPoints": "全网热门内容洞察",
+ "videos": "抖音、小红书、视频号、快手、哔哩哔哩、微信公众号TikTok、YouTube、Facebook、Instagram、Threads、Twitter(X)、Pinterest全平台支持",
+ "images": "无限制频道连接",
+ "storage": "内容搜索、评论搜索、智能互动管理"
+ }
+ },
+ "plans": {
+ "goumai": "购买",
+ "yearly": {
+ "title": "年度会员",
+ "bestValue": "最划算",
+ "price": "12",
+ "period": "每月",
+ "originalPrice": "$300/年",
+ "button": "$144/年 省50%",
+ "points": "760 积分/月(包含签到赠送60积分)",
+ "description": "每月最高150+次seedance等模型视频生成",
+ "features": {
+ "contentReview": "内容安全审核",
+ "dailyPoints": "限时nano banana等图片模型无限免费使用",
+ "multiModel": "GPT5,Gemini-2.5-Pro等大模型使用",
+ "textToVideo": "抖音、小红书、视频号、快手、哔哩唑哩,微信公众号、TikTok、YouTube、Facebook、Instagram.Threads、Twitter(X)、Pinterest全平台支持",
+ "aiGeneration": "无限制频道连接",
+ "noWatermark": "内容搜索、评论搜索、智能互动管理"
+ }
+ },
+ "monthly": {
+ "title": "月度会员",
+ "price": "19",
+ "period": "每月",
+ "originalPrice": "$25/月",
+ "button": "$19/月 省25%",
+ "points": "760 积分/月(包含签到赠送60积分)",
+ "description": "每月最高150+次seedance等模型视频生成"
+ },
+ "once": {
+ "title": "一次性月度会员",
+ "price": "25",
+ "period": "每月",
+ "button": "$25/月",
+ "points": "760 积分/月(包含签到赠送60积分)",
+ "description": "每月最高150+次seedance等模型视频生成",
+ "storage": "存储空间5G"
+ }
+ },
+ "trial": "7天免费试用",
+ "cancelAnytime": "包年可随时取消",
+ "cancelMonthly": "包月可随时取消"
+ },
+ "points": {
+ "title": "积分详情",
+ "current": "当前积分",
+ "remaining": "剩余积分",
+ "subscribed": "订阅积分",
+ "recharged": "充值积分",
+ "gifted": "赠送积分",
+ "validity": "积分有效期",
+ "tabs": {
+ "all": "全部",
+ "spend": "消耗",
+ "earn": "获得"
+ },
+ "noData": "没有内容了",
+ "disclaimer": "仅展示近1个月明细,数据更新可能有延时 积分规则",
+ "recordChange": "积分变动",
+ "recordTypes": {
+ "recharge": "充值",
+ "consume": "消耗",
+ "gift": "赠送",
+ "refund": "退款",
+ "expire": "过期",
+ "adjust": "调整"
+ }
+ },
+ "recharge": {
+ "title": "购买积分",
+ "current": "当前积分",
+ "price": "每1000积分售价15美元",
+ "amount": "购买积分",
+ "total": "总价",
+ "buyNow": "立即购买",
+ "range": "1K-50K",
+ "unit": "积分"
}
},
"wallet": {
diff --git a/aitoearn_web/aitoearn-web/package.json b/aitoearn_web/aitoearn-web/package.json
index 3e34e53f..e2a99108 100644
--- a/aitoearn_web/aitoearn-web/package.json
+++ b/aitoearn_web/aitoearn-web/package.json
@@ -27,7 +27,9 @@
"@react-oauth/google": "^0.12.2",
"@svgr/webpack": "^6.5.1",
"@szhsin/react-menu": "^4.4.1",
+ "@toast-ui/react-image-editor": "^3.15.2",
"@types/blueimp-md5": "^2.18.2",
+ "@types/react-beautiful-dnd": "^13.1.8",
"accept-language": "3.0.20",
"antd": "^5.25.2",
"axios": "^1.9.0",
@@ -47,6 +49,7 @@
"next-sitemap": "^4.2.3",
"qs": "^6.14.0",
"react": "^18",
+ "react-beautiful-dnd": "^13.1.1",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18",
@@ -56,9 +59,11 @@
"react-qrcode-logo": "^4.0.0",
"react-sortablejs": "^6.1.4",
"react-transition-group": "^4.4.5",
+ "react-use": "^17.6.0",
"sass": "^1.59.2",
"sortablejs": "^1.15.6",
"swiper": "^11.2.8",
+ "tui-image-editor": "^3.15.3",
"zustand": "^5.0.5"
},
"devDependencies": {
diff --git a/aitoearn_web/aitoearn-web/pnpm-lock.yaml b/aitoearn_web/aitoearn-web/pnpm-lock.yaml
index 4cc70351..d2332a20 100644
--- a/aitoearn_web/aitoearn-web/pnpm-lock.yaml
+++ b/aitoearn_web/aitoearn-web/pnpm-lock.yaml
@@ -38,9 +38,15 @@ importers:
'@szhsin/react-menu':
specifier: ^4.4.1
+ '@toast-ui/react-image-editor':
+ specifier: ^3.15.2
'@types/blueimp-md5':
specifier: ^2.18.2
version: 2.18.2
+ '@types/react-beautiful-dnd':
+ specifier: ^13.1.8
+ version: 13.1.8
accept-language:
specifier: 3.0.20
version: 3.0.20
@@ -98,9 +104,12 @@ importers:
react:
specifier: ^18
version: 18.3.1
+ react-beautiful-dnd:
+ specifier: ^13.1.1
react-dnd:
specifier: ^16.0.1
- version: 16.0.1(@types/[email protected])(@types/[email protected])([email protected])
react-dnd-html5-backend:
specifier: ^16.0.1
version: 16.0.1
@@ -125,6 +134,9 @@ importers:
react-transition-group:
specifier: ^4.4.5
+ react-use:
+ specifier: ^17.6.0
sass:
specifier: ^1.59.2
version: 1.89.1
@@ -134,6 +146,9 @@ importers:
swiper:
specifier: ^11.2.8
version: 11.2.10
+ tui-image-editor:
+ specifier: ^3.15.3
+ version: 3.15.3([email protected])
zustand:
specifier: ^5.0.5
version: 5.0.5(@types/[email protected])([email protected])
@@ -960,6 +975,10 @@ packages:
react: '>=16.6.0'
react-dom: '>=16.6.0'
+ '@mapbox/[email protected]':
+ resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}
+ hasBin: true
+
'@napi-rs/[email protected]':
resolution: {integrity: sha512-bCsCyeZEwVErsGmyPNSzwfwFn4OdxBj0mmv6hOFucB/k81Ojdu68RbZdxYsRQUPc9l6SU5F/cG+bXgWs3oUgsQ==}
@@ -1303,6 +1322,11 @@ packages:
react: '>=16.14.0'
react-dom: '>=16.14.0'
+ '@toast-ui/[email protected]':
+ resolution: {integrity: sha512-oVLidJ03RsFiS+QpqqLiOvhEw7nhdAeaNRL+UNvjW8He5lYP9wh/l4SkOMhH7UGI6bZq7W950Y19mGKK3fl5+Q==}
+ peerDependencies:
+ react: ^17.0.2
+
'@trysound/[email protected]':
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
engines: {node: '>=10.13.0'}
@@ -1332,6 +1356,14 @@ packages:
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-PQTyIulDkIDro8P+IHbKCsw7U2xxBYflVzW/FgWdCAePD9xGSidgA76/GeJ6lBKoblyhf9pBY763gbrN+1dI8g==}
+ peerDependencies:
+ '@types/react': '*'
+
+ '@types/[email protected]':
+ resolution: {integrity: sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==}
+
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
@@ -1353,11 +1385,17 @@ packages:
resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-E3TyFsro9pQuK4r8S/OL6G99eq7p8v29sX0PM7oT8Z+PJfZvSQTx4zTQbUJ+QZXioAF0e7TGBEcA1XhYhCweyQ==}
+
resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==}
peerDependencies:
'@types/react': ^18.0.0
+ '@types/[email protected]':
+ resolution: {integrity: sha512-GdFaVjEbYv4Fthm2ZLvj1VSCedV7TqE5y1kNwnjSdBOTXuRSgowux6J8TAct15T3CKBr63UMk+2CO7ilRhyrAQ==}
+
resolution: {integrity: sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==}
peerDependencies:
@@ -1558,15 +1596,28 @@ packages:
'@webassemblyjs/[email protected]':
resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==}
+ '@xobotyi/[email protected]':
+ resolution: {integrity: sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==}
+
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
+ resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==}
+ deprecated: Use your platform's native atob() and btoa() methods instead
+
+ resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
+
resolution: {integrity: sha512-xklPzRma4aoDEPk0ZfMjeuxB2FP4JBYlAR25OFUqCoOYDjYo6wGwAs49SnTN/MoB5VpnNX9tENfZ+vEIFmHQMQ==}
+ resolution: {integrity: sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==}
+
resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==}
engines: {node: '>=10.13.0'}
@@ -1578,6 +1629,20 @@ packages:
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
+ resolution: {integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==}
+ engines: {node: '>=0.4.0'}
+
+ resolution: {integrity: sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==}
+ engines: {node: '>=0.4.0'}
+ hasBin: true
+
+ resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==}
+ engines: {node: '>=0.4.0'}
+ hasBin: true
+
resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==}
engines: {node: '>=0.4.0'}
@@ -1588,6 +1653,10 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
+ resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
+ engines: {node: '>= 6.0.0'}
+
resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==}
engines: {node: '>= 14'}
@@ -1641,6 +1710,14 @@ packages:
react: '>=16.9.0'
react-dom: '>=16.9.0'
+ resolution: {integrity: sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==}
+
+ resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==}
+ engines: {node: '>=10'}
+ deprecated: This package is no longer supported.
+
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
@@ -1652,6 +1729,9 @@ packages:
resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-gUHx76KtnhEgB3HOuFYiCm3FIdEs6ocM2asHvNTkfu/Y09qQVrrVVaOKENmS2KkSaGoxgXNqC+ZVtR/n0MOkSA==}
+
resolution: {integrity: sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==}
engines: {node: '>= 0.4'}
@@ -1684,6 +1764,13 @@ packages:
resolution: {integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==}
+
+ resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==}
+ engines: {node: '>=0.8'}
+
resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==}
@@ -1701,6 +1788,12 @@ packages:
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==}
+
+ resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==}
+
resolution: {integrity: sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==}
engines: {node: '>=4'}
@@ -1734,6 +1827,9 @@ packages:
resolution: {integrity: sha512-JnkkL4GUpOvvanH9AZPX38CxhiLsXMBicBY2IAtqiVN8YulGDQybUydWA4W6yAMtw6iShtw+8HEF6cfrTHU+UQ==}
engines: {node: '>=0.10'}
+ resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==}
+
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
@@ -1753,6 +1849,9 @@ packages:
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==}
+
resolution: {integrity: sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
@@ -1795,6 +1894,13 @@ packages:
resolution: {integrity: sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==}
+ resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==}
+ engines: {node: '>=6'}
+
+ resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}
+
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
@@ -1810,6 +1916,10 @@ packages:
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
engines: {node: '>= 14.16.0'}
+ resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==}
engines: {node: '>=6.0'}
@@ -1830,6 +1940,10 @@ packages:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
+ resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==}
+ hasBin: true
+
resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==}
engines: {node: '>=0.1.90'}
@@ -1855,6 +1969,9 @@ packages:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
+ resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==}
+
resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
engines: {node: '>= 0.6'}
@@ -1875,6 +1992,9 @@ packages:
resolution: {integrity: sha512-tqTt5T4PzsMIZ430XGviK4vzYSoeNJ6CXODi6c/voxOT6IZqBht5/EKaSNnYiEjjRYxjVz7DQIsOsY0XNi8PIA==}
+ resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}
+
resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==}
engines: {node: '>=10'}
@@ -1889,6 +2009,12 @@ packages:
resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==}
+ resolution: {integrity: sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==}
+
+ resolution: {integrity: sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==}
+
resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==}
@@ -1907,6 +2033,16 @@ packages:
resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==}
engines: {node: '>=8.0.0'}
+ resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==}
+
+ resolution: {integrity: sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==}
+
+ resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
@@ -1916,6 +2052,13 @@ packages:
resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==}
+ resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
+ engines: {node: '>=0.10'}
+
+ resolution: {integrity: sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==}
+
resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==}
engines: {node: '>= 0.4'}
@@ -1948,6 +2091,10 @@ packages:
supports-color:
optional: true
+ resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
@@ -1967,11 +2114,18 @@ packages:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
+ resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}
+
resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==}
engines: {node: '>=0.10'}
hasBin: true
+ resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==}
engines: {node: '>=0.3.1'}
@@ -1995,6 +2149,10 @@ packages:
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
+ resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==}
+ deprecated: Use your platform's native DOMException instead
+
resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==}
engines: {node: '>= 4'}
@@ -2020,6 +2178,9 @@ packages:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
+ resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==}
+
resolution: {integrity: sha512-Tte/grDQRiETQP4xz3iZWSvoHrkCQtwqd6hs+mifXcjrCuo2iKWbajFObuLJVBlDIJlOzgQPd1hsaKt/3+OMkQ==}
@@ -2057,6 +2218,9 @@ packages:
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
+ resolution: {integrity: sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==}
+
resolution: {integrity: sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==}
engines: {node: '>= 0.4'}
@@ -2100,6 +2264,11 @@ packages:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'}
+ resolution: {integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==}
+ engines: {node: '>=4.0'}
+ hasBin: true
+
resolution: {integrity: sha512-FerU4DYccO4FgeYFFglz0SnaKRe1ejXQrDb8kWUkTAg036YWi+jUsgg4sIGNCDhAsDITsZaL4MzBWKB6f4G1Dg==}
peerDependencies:
@@ -2233,6 +2402,11 @@ packages:
resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==}
+ engines: {node: '>=4'}
+ hasBin: true
+
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
engines: {node: '>=0.10'}
@@ -2257,6 +2431,17 @@ packages:
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
engines: {node: '>=0.8.x'}
+ resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
+
+ resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==}
+ engines: {'0': node >=0.6.0}
+
+ resolution: {integrity: sha512-MhJXCD/ZugOGV5aPHIG0MY1q2EfrlzC2sasrAHj0HHXN50JTe1bHFrlRdkXBijCJ0dG81fGu/A/Pct9DyuwCzQ==}
+ engines: {node: '>=8.0.0'}
+
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
@@ -2277,9 +2462,15 @@ packages:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
+ resolution: {integrity: sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw==}
+
resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==}
+ resolution: {integrity: sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==}
+
resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
@@ -2340,10 +2531,21 @@ packages:
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
engines: {node: '>=14'}
+ resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==}
+
+ resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==}
+ engines: {node: '>= 0.12'}
+
resolution: {integrity: sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==}
engines: {node: '>= 6'}
+ resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==}
+ engines: {node: '>= 8'}
+
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
@@ -2357,6 +2559,11 @@ packages:
resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==}
+ resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
+ engines: {node: '>=10'}
+ deprecated: This package is no longer supported.
+
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'}
@@ -2376,6 +2583,9 @@ packages:
resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==}
+ resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==}
+
resolution: {integrity: sha512-vXjx4vRBjw6rd3Zg73IMyNLZuPjs8/lE9gJZs270YJJI0t5vlCpdsyX5E0TmSd+KcRWzwPbwjwd6bnNpF72sFQ==}
@@ -2395,6 +2605,10 @@ packages:
engines: {node: 20 || >=22}
hasBin: true
+ resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
+ deprecated: Glob versions prior to v9 are no longer supported
+
resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==}
engines: {node: '>=16 || 14 >=14.17'}
@@ -2417,6 +2631,15 @@ packages:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
+ resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==}
+ engines: {node: '>=4'}
+
+ resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==}
+ engines: {node: '>=6'}
+ deprecated: this library is no longer supported
+
resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==}
engines: {node: '>= 0.4'}
@@ -2440,6 +2663,9 @@ packages:
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==}
+
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
@@ -2447,16 +2673,30 @@ packages:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
+ resolution: {integrity: sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==}
+
resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==}
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
+ resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==}
+ engines: {node: '>=0.8', npm: '>=1.3.7'}
+
+ resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
+ engines: {node: '>= 6'}
+
resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}
engines: {node: '>= 14'}
+ resolution: {integrity: sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==}
+
resolution: {integrity: sha512-f3frU3pIxD50/Tz20zx9TD9HobKYg47fmAETb117GKGPrhwcSSPJDoCposXlVycVebQ9GQohC3Efbpq7/nnJ5w==}
@@ -2505,14 +2745,28 @@ packages:
resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
engines: {node: '>=0.8.19'}
+ resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
+ deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
+
+ resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
+
resolution: {integrity: sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+ resolution: {integrity: sha512-lhYo5qNTQp3EvSSp3sRvXMbVQTLrvGV6DycRMJ5dm2BLMiJ30wpXKdDdgX+GmJZ5uQMucwRKHamXSst3Sj/Giw==}
+
resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==}
+ engines: {node: '>=4'}
+
resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==}
engines: {node: '>= 0.4'}
@@ -2615,6 +2869,9 @@ packages:
resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
+
resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==}
engines: {node: '>= 0.4'}
@@ -2633,6 +2890,9 @@ packages:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
+ resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==}
+
resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==}
engines: {node: '>= 0.4'}
@@ -2645,6 +2905,9 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
+ resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==}
+
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
@@ -2652,6 +2915,18 @@ packages:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
+ resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==}
+
+ resolution: {integrity: sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g==}
+ engines: {node: '>=8'}
+ peerDependencies:
+ canvas: ^2.5.0
+ peerDependenciesMeta:
+ canvas:
+ optional: true
+
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
engines: {node: '>=6'}
@@ -2674,9 +2949,15 @@ packages:
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
+ resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==}
+
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
+ resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
+
resolution: {integrity: sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==}
@@ -2689,6 +2970,10 @@ packages:
engines: {node: '>=6'}
hasBin: true
+ resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==}
+ engines: {node: '>=0.6.0'}
+
resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==}
engines: {node: '>=4.0'}
@@ -2706,6 +2991,10 @@ packages:
resolution: {integrity: sha512-rx5X+Yds6MmIxGS+VVQBWhylPYxkOYmKXrWqQHc2rj2ewsoWMZS7OaTXk9UE8y95XV+D5CqLjaEj+IJgRmrIaw==}
+ resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==}
+ engines: {node: '>= 0.8.0'}
+
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -2741,6 +3030,9 @@ packages:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
+ resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}
+
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
@@ -2758,6 +3050,10 @@ packages:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
+ resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
@@ -2765,6 +3061,9 @@ packages:
resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==}
+ resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==}
+
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
@@ -2784,6 +3083,10 @@ packages:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
+ resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==}
engines: {node: 20 || >=22}
@@ -2802,14 +3105,31 @@ packages:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
+ resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
engines: {node: '>=16 || 14 >=14.17'}
+ resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==}
+ engines: {node: '>= 8'}
+
+ resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}
+ engines: {node: '>=10'}
+ hasBin: true
+
resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==}
engines: {node: '>=10'}
@@ -2818,6 +3138,15 @@ packages:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
+ resolution: {integrity: sha512-1UxuyYGdoQHcGg87Lkqm3FzefucTa0NAiOcuRsDmysep3c1LVCRK2krrUDafMWtjSG04htvAmvg96+SDknOmgQ==}
+
+ resolution: {integrity: sha512-+6bHaC8dSDGALM1HJjOHVXpuastdu2xFoZlC77Jh4cg+33Zcgm+Gxd+1xsnpZK14eyHObSp82+ll5y3SX75liw==}
+ peerDependencies:
+ react: '*'
+ react-dom: '*'
+
resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@@ -2874,9 +3203,24 @@ packages:
resolution: {integrity: sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA==}
+ resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==}
+ engines: {node: '>=6'}
+ hasBin: true
+
+ resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}
+ deprecated: This package is no longer supported.
+
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
+ resolution: {integrity: sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==}
+
+ resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==}
+
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
@@ -2912,6 +3256,13 @@ packages:
resolution: {integrity: sha512-xmaHk+pwv4T6QKoq553KeJlkZUV6WBVGU/dO7rppA7YFIvGf+xB1OQAkw8mcORtxtSHpiK5JiTQ+d7Bme/Y7Wg==}
+ resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
+
+ resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==}
+ engines: {node: '>= 0.8.0'}
+
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
@@ -2942,6 +3293,9 @@ packages:
resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==}
+ resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==}
+
resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}
@@ -2949,6 +3303,10 @@ packages:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
@@ -2968,6 +3326,9 @@ packages:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
+
resolution: {integrity: sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ==}
@@ -2982,6 +3343,9 @@ packages:
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==}
+
resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==}
engines: {node: '>= 0.4'}
@@ -2993,6 +3357,10 @@ packages:
resolution: {integrity: sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==}
+ resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==}
+ engines: {node: '>= 0.8.0'}
+
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
@@ -3015,6 +3383,9 @@ packages:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
+ resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==}
+
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -3026,9 +3397,16 @@ packages:
resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==}
engines: {node: '>=0.6'}
+ resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
+ engines: {node: '>=0.6'}
+
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
+ resolution: {integrity: sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==}
+
resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
@@ -3264,6 +3642,13 @@ packages:
resolution: {integrity: sha512-L6wBhp64fAr/FPhjfkuf9Lx6dAbfkznROcBMj55tVamw6ddTvhcgoqu89a3lUJCaALJkZe/mTcQoNM0P09RpQg==}
hasBin: true
+ resolution: {integrity: sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==}
+ deprecated: 'react-beautiful-dnd is now deprecated. Context and options: https://github.com/atlassian/react-beautiful-dnd/issues/2672'
+ peerDependencies:
+ react: ^16.8.5 || ^17.0.0 || ^18.0.0
+ react-dom: ^16.8.5 || ^17.0.0 || ^18.0.0
+
resolution: {integrity: sha512-Wu3dw5aDJmOGw8WjH1I1/yTH+vlXEL4vmjk5p+MHxP8HuHJS1lAGeIdG/hze1AvNeXWo/JgULV87LyQOr+r5jw==}
@@ -3313,6 +3698,9 @@ packages:
resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
+ resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
+
resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==}
@@ -3322,6 +3710,18 @@ packages:
react: '>=18.0.0'
react-dom: '>=18.0.0'
+ resolution: {integrity: sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==}
+ peerDependencies:
+ react: ^16.8.3 || ^17 || ^18
+ react-dom: '*'
+ react-native: '*'
+ peerDependenciesMeta:
+ react-dom:
+ optional: true
+ react-native:
+ optional: true
+
resolution: {integrity: sha512-fc7cBosfhnbh53Mbm6a45W+F735jwZ1UFIYSrIqcO/gRIFoDyZeMtgKlpV4DdyQfbCzdh5LoALLTDRxhMpTyXQ==}
peerDependencies:
@@ -3342,10 +3742,26 @@ packages:
react: '>=16.8.0'
react-dom: '>=16.8.0'
+ resolution: {integrity: sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==}
+ peerDependencies:
+ react: '*'
+ tslib: '*'
+
+ resolution: {integrity: sha512-OmedEScUMKFfzn1Ir8dBxiLLSOzhKe/dPZwVxcujweSj45aNM7BEGPb9BEVIgVEqEXx6f3/TsXzwIktNgUR02g==}
+ peerDependencies:
+ react: '*'
+ react-dom: '*'
+
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
+ engines: {node: '>= 6'}
+
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
@@ -3379,6 +3795,24 @@ packages:
resolution: {integrity: sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==}
hasBin: true
+ resolution: {integrity: sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==}
+ engines: {node: '>=0.10.0'}
+ peerDependencies:
+ request: ^2.34
+
+ resolution: {integrity: sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==}
+ engines: {node: '>=0.12.0'}
+ deprecated: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
+ peerDependencies:
+ request: ^2.34
+
+ resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==}
+ engines: {node: '>= 6'}
+ deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
+
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
engines: {node: '>=0.10.0'}
@@ -3409,11 +3843,19 @@ packages:
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
+ resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
+ deprecated: Rimraf versions prior to v4 are no longer supported
+ hasBin: true
+
resolution: {integrity: sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==}
engines: {node: '>=14'}
hasBin: true
+ resolution: {integrity: sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==}
+
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
@@ -3443,6 +3885,10 @@ packages:
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
+ resolution: {integrity: sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
@@ -3454,6 +3900,10 @@ packages:
resolution: {integrity: sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==}
engines: {node: '>= 10.13.0'}
+ resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==}
@@ -3469,6 +3919,9 @@ packages:
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
+ resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
+
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
engines: {node: '>= 0.4'}
@@ -3477,6 +3930,10 @@ packages:
resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==}
+ engines: {node: '>=6.9'}
+
resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==}
engines: {node: '>= 0.4'}
@@ -3505,10 +3962,19 @@ packages:
resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
+
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
+ resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==}
+
+ resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==}
+
resolution: {integrity: sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==}
@@ -3519,10 +3985,19 @@ packages:
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
+ resolution: {integrity: sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==}
+ engines: {node: '>=0.10.0'}
+ hasBin: true
+
resolution: {integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==}
@@ -3530,6 +4005,22 @@ packages:
resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==}
deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility'
+ resolution: {integrity: sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==}
+
+ resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==}
+
+ resolution: {integrity: sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==}
+
+ resolution: {integrity: sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==}
+
+ resolution: {integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==}
engines: {node: '>= 0.4'}
@@ -3572,6 +4063,9 @@ packages:
resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
+
resolution: {integrity: sha512-4/Fc8WshjKl/6MctVvdcdH3pQpbSP3J481hMUo9qMSpEK+piDYKYg8oSTGGKFMt2AyeZCQCnGF1uMq3i/xg/wQ==}
@@ -3631,6 +4125,9 @@ packages:
resolution: {integrity: sha512-RMeVUUjTQH+6N3ckimK93oxz6Sn5la4aDlgPzB+rBrG/smPdCTicXyhxa+woIpopz+jewEloiEE3lKo1h9w2YQ==}
engines: {node: '>= 4.7.0'}
+ resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
+
resolution: {integrity: sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -3639,6 +4136,10 @@ packages:
resolution: {integrity: sha512-ZL6DDuAlRlLGghwcfmSn9sK3Hr6ArtyudlSAiCqQ6IfE+b+HHbydbYDIG15IfS5do+7XQQBdBiubF/cV2dnDzg==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==}
engines: {node: '>= 10.13.0'}
@@ -3664,6 +4165,10 @@ packages:
resolution: {integrity: sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==}
engines: {node: '>=12.22'}
@@ -3685,15 +4190,29 @@ packages:
resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==}
+ resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==}
+ engines: {node: '>=0.8'}
+
+ resolution: {integrity: sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==}
+ engines: {node: '>=6'}
+
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
+ resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==}
+
resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==}
engines: {node: '>=18.12'}
peerDependencies:
typescript: '>=4.8.4'
+ resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==}
+
resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}
@@ -3703,6 +4222,25 @@ packages:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
+ resolution: {integrity: sha512-5NEHTDFKillDNPy6MCgpXDNBTB7SZkHBFOF6vXfCDIFZcBdFYFXTd2xvAVvIeM3UYFRWu27xUf/Kxl5f9+RooQ==}
+
+ resolution: {integrity: sha512-q5sE9NQ5NR9lYpilYjcI7Sdv0KCogo+W8fZY+AYTj/HYg+9fscYy3UuJ6UQiV1bF+ARCLwFRWC8UcOt9kuUctQ==}
+
+ resolution: {integrity: sha512-7B5YUxe2eSSh+8YrlREmjqkgeFFKrVkdy0D/G0dWCJIQ2WLPQ/Bkm02WXQeWJiFPzgvargZjn7eAe80p3qBHPQ==}
+
+ resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
+
+ resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==}
+
+ resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==}
+ engines: {node: '>= 0.8.0'}
+
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
@@ -3763,10 +4301,34 @@ packages:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
+ resolution: {integrity: sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0
+
+ resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
+
+ resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==}
+ deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
+ hasBin: true
+
+ resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==}
+ engines: {'0': node >=0.6.0}
+
resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==}
+ deprecated: Use your platform's native performance.now() and performance.timeOrigin.
+
+ resolution: {integrity: sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==}
+
resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==}
engines: {node: '>=10.13.0'}
@@ -3774,6 +4336,9 @@ packages:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
+ resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
+
resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==}
engines: {node: '>=10.13.0'}
@@ -3788,9 +4353,18 @@ packages:
webpack-cli:
optional: true
+ resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==}
+
+ resolution: {integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==}
+
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
+ resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==}
+
resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==}
engines: {node: '>= 0.4'}
@@ -3812,6 +4386,9 @@ packages:
engines: {node: '>= 8'}
hasBin: true
+ resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}
+
resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
engines: {node: '>=0.10.0'}
@@ -3824,6 +4401,21 @@ packages:
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+
+ resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==}
+ engines: {node: '>=8.3.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: ^5.0.2
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
resolution: {integrity: sha512-uLdfmBHCG4ftZdgLHhzP7qFTt8/pOv4Hpr1lWcX0HKLZdvhu5f7zThLlPFHnXH7mHbFT+6LCaf82UB3zbLpweQ==}
@@ -3837,6 +4429,9 @@ packages:
resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==}
hasBin: true
+ resolution: {integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==}
+
resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==}
engines: {node: '>=4.0.0'}
@@ -3845,9 +4440,15 @@ packages:
resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==}
engines: {node: '>=4.0'}
+ resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==}
+
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
+ resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
+
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
engines: {node: '>= 6'}
@@ -4829,6 +5430,22 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
+ dependencies:
+ detect-libc: 2.1.2
+ https-proxy-agent: 5.0.1
+ make-dir: 3.1.0
+ node-fetch: 2.7.0([email protected])
+ nopt: 5.0.0
+ npmlog: 5.0.1
+ rimraf: 3.0.2
+ semver: 7.7.2
+ tar: 6.2.1
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ optional: true
+
'@napi-rs/[email protected]':
dependencies:
'@emnapi/core': 1.4.3
@@ -5144,6 +5761,17 @@ snapshots:
react-dom: 18.3.1([email protected])
react-transition-state: 2.3.1([email protected]([email protected]))([email protected])
+ dependencies:
+ fabric: 4.6.0([email protected])
+ react: 18.3.1
+ tui-image-editor: 3.15.3([email protected])
+ transitivePeerDependencies:
+ - bufferutil
+ - encoding
+ - supports-color
+ - utf-8-validate
+
'@trysound/[email protected]': {}
@@ -5173,6 +5801,13 @@ snapshots:
'@types/[email protected]': {}
+ dependencies:
+ '@types/react': 18.3.23
+ hoist-non-react-statics: 3.3.2
+
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
'@types/[email protected]': {}
@@ -5189,10 +5824,21 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]':
+ dependencies:
+ '@types/react': 18.3.23
+
dependencies:
'@types/react': 18.3.23
+ '@types/[email protected]':
+ dependencies:
+ '@types/hoist-non-react-statics': 3.3.7(@types/[email protected])
+ '@types/react': 18.3.23
+ hoist-non-react-statics: 3.3.2
+ redux: 4.2.1
+
dependencies:
'@types/react': 18.3.23
@@ -5425,14 +6071,28 @@ snapshots:
'@webassemblyjs/ast': 1.14.1
'@xtuc/long': 4.2.2
+ '@xobotyi/[email protected]': {}
+
'@xtuc/[email protected]': {}
'@xtuc/[email protected]': {}
+ optional: true
+
+ optional: true
+
dependencies:
bcp47: 1.1.2
+ dependencies:
+ acorn: 6.4.2
+ acorn-walk: 6.2.0
+ optional: true
+
dependencies:
acorn: 8.15.0
@@ -5441,10 +6101,26 @@ snapshots:
dependencies:
acorn: 8.14.1
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ dependencies:
+ debug: 4.4.1
+ transitivePeerDependencies:
+ - supports-color
+ optional: true
+
@@ -5547,6 +6223,15 @@ snapshots:
- luxon
- moment
+ optional: true
+
+ dependencies:
+ delegates: 1.0.0
+ readable-stream: 3.6.2
+ optional: true
+
@@ -5556,6 +6241,9 @@ snapshots:
call-bound: 1.0.4
is-array-buffer: 3.0.5
+ optional: true
+
dependencies:
call-bind: 1.0.8
@@ -5620,6 +6308,14 @@ snapshots:
+ dependencies:
+ safer-buffer: 2.1.2
+ optional: true
+
+ optional: true
+
@@ -5632,6 +6328,12 @@ snapshots:
dependencies:
possible-typed-array-names: 1.1.0
+ optional: true
+
+ optional: true
+
@@ -5672,6 +6374,11 @@ snapshots:
+ dependencies:
+ tweetnacl: 0.14.5
+ optional: true
+
@@ -5691,6 +6398,9 @@ snapshots:
dependencies:
fill-range: 7.1.1
+ optional: true
+
dependencies:
caniuse-lite: 1.0.30001741
@@ -5731,6 +6441,19 @@ snapshots:
+ dependencies:
+ '@mapbox/node-pre-gyp': 1.0.11([email protected])
+ nan: 2.23.0
+ simple-get: 3.1.1
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+ optional: true
+
+ optional: true
+
dependencies:
ansi-styles: 4.3.0
@@ -5759,6 +6482,9 @@ snapshots:
dependencies:
readdirp: 4.1.2
+ optional: true
+
@@ -5773,6 +6499,9 @@ snapshots:
+ optional: true
+
@@ -5789,6 +6518,9 @@ snapshots:
+ optional: true
+
@@ -5808,6 +6540,9 @@ snapshots:
dependencies:
browserslist: 4.25.4
+ optional: true
+
dependencies:
'@types/parse-json': 4.0.2
@@ -5826,6 +6561,14 @@ snapshots:
+ dependencies:
+ tiny-invariant: 1.2.0
+
+ dependencies:
+ hyphenate-style-name: 1.1.0
+
dependencies:
boolbase: 1.0.0
@@ -5853,12 +6596,35 @@ snapshots:
dependencies:
css-tree: 1.1.3
+ optional: true
+
+ optional: true
+
+ dependencies:
+ cssom: 0.3.8
+ optional: true
+
+ dependencies:
+ assert-plus: 1.0.0
+ optional: true
+
+ dependencies:
+ abab: 2.0.6
+ whatwg-mimetype: 2.3.0
+ whatwg-url: 7.1.0
+ optional: true
+
dependencies:
call-bound: 1.0.4
@@ -5887,6 +6653,11 @@ snapshots:
dependencies:
ms: 2.1.3
+ dependencies:
+ mimic-response: 2.1.0
+ optional: true
+
@@ -5905,9 +6676,15 @@ snapshots:
+ optional: true
+
optional: true
+ optional: true
+
@@ -5939,6 +6716,11 @@ snapshots:
+ dependencies:
+ webidl-conversions: 4.0.2
+ optional: true
+
dependencies:
domelementtype: 2.3.0
@@ -5969,6 +6751,12 @@ snapshots:
+ dependencies:
+ jsbn: 0.1.1
+ safer-buffer: 2.1.2
+ optional: true
+
dependencies:
tslib: 2.3.0
@@ -6001,6 +6789,10 @@ snapshots:
dependencies:
is-arrayish: 0.2.1
+ dependencies:
+ stackframe: 1.3.4
+
dependencies:
array-buffer-byte-length: 1.0.2
@@ -6108,6 +6900,16 @@ snapshots:
+ dependencies:
+ esprima: 4.0.1
+ estraverse: 4.3.0
+ esutils: 2.0.3
+ optionator: 0.8.3
+ optionalDependencies:
+ source-map: 0.6.1
+ optional: true
+
dependencies:
'@next/eslint-plugin-next': 15.3.2
@@ -6316,6 +7118,9 @@ snapshots:
acorn-jsx: 5.3.2([email protected])
eslint-visitor-keys: 4.2.0
+ optional: true
+
dependencies:
estraverse: 5.3.0
@@ -6332,6 +7137,22 @@ snapshots:
+ optional: true
+
+ optional: true
+
+ optionalDependencies:
+ canvas: 2.11.2([email protected])
+ transitivePeerDependencies:
+ - bufferutil
+ - encoding
+ - supports-color
+ - utf-8-validate
+
@@ -6356,8 +7177,12 @@ snapshots:
+
+
dependencies:
reusify: 1.1.0
@@ -6409,6 +7234,16 @@ snapshots:
cross-spawn: 7.0.6
signal-exit: 4.1.0
+ optional: true
+
+ dependencies:
+ asynckit: 0.4.0
+ combined-stream: 1.0.8
+ mime-types: 2.1.35
+ optional: true
+
dependencies:
asynckit: 0.4.0
@@ -6417,6 +7252,11 @@ snapshots:
hasown: 2.0.2
mime-types: 2.1.35
+ dependencies:
+ minipass: 3.3.6
+ optional: true
+
@@ -6432,6 +7272,19 @@ snapshots:
+ dependencies:
+ aproba: 2.1.0
+ color-support: 1.1.3
+ console-control-strings: 1.1.0
+ has-unicode: 2.0.1
+ object-assign: 4.1.1
+ signal-exit: 3.0.7
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
+ wide-align: 1.1.5
+ optional: true
+
@@ -6462,6 +7315,11 @@ snapshots:
dependencies:
resolve-pkg-maps: 1.0.0
+ dependencies:
+ assert-plus: 1.0.0
+ optional: true
+
dependencies:
arrify: 2.0.1
@@ -6487,6 +7345,16 @@ snapshots:
package-json-from-dist: 1.0.1
path-scurry: 2.0.0
+ dependencies:
+ fs.realpath: 1.0.0
+ inflight: 1.0.6
+ inherits: 2.0.4
+ minimatch: 3.1.2
+ once: 1.4.0
+ path-is-absolute: 1.0.1
+ optional: true
+
dependencies:
fs.realpath: 1.0.0
@@ -6507,6 +7375,15 @@ snapshots:
+ optional: true
+
+ dependencies:
+ ajv: 6.12.6
+ har-schema: 2.0.0
+ optional: true
+
@@ -6525,6 +7402,9 @@ snapshots:
dependencies:
has-symbols: 1.1.0
+ optional: true
+
dependencies:
function-bind: 1.1.2
@@ -6533,6 +7413,11 @@ snapshots:
dependencies:
react-is: 16.13.1
+ dependencies:
+ whatwg-encoding: 1.0.5
+ optional: true
+
dependencies:
void-elements: 3.1.0
@@ -6544,6 +7429,21 @@ snapshots:
domutils: 3.2.2
entities: 4.5.0
+ dependencies:
+ assert-plus: 1.0.0
+ jsprim: 1.4.2
+ sshpk: 1.18.0
+ optional: true
+
+ dependencies:
+ agent-base: 6.0.2
+ debug: 4.4.1
+ transitivePeerDependencies:
+ - supports-color
+ optional: true
+
dependencies:
agent-base: 7.1.3
@@ -6551,6 +7451,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
+
dependencies:
'@babel/runtime': 7.27.6
@@ -6593,14 +7495,30 @@ snapshots:
+ dependencies:
+ once: 1.4.0
+ wrappy: 1.0.2
+ optional: true
+
+ optional: true
+
+ dependencies:
+ css-in-js-utils: 3.1.0
+
dependencies:
es-errors: 1.3.0
hasown: 2.0.2
side-channel: 1.1.0
+ optional: true
+
dependencies:
call-bind: 1.0.8
@@ -6707,6 +7625,9 @@ snapshots:
dependencies:
which-typed-array: 1.1.19
+ optional: true
+
@@ -6722,6 +7643,9 @@ snapshots:
+ optional: true
+
dependencies:
define-data-property: 1.1.4
@@ -6741,12 +7665,52 @@ snapshots:
merge-stream: 2.0.0
supports-color: 8.1.1
+
dependencies:
argparse: 2.0.1
+ optional: true
+
+ dependencies:
+ abab: 2.0.6
+ acorn: 7.4.1
+ acorn-globals: 4.3.4
+ array-equal: 1.0.2
+ cssom: 0.4.4
+ cssstyle: 2.3.0
+ data-urls: 1.1.0
+ domexception: 1.0.1
+ escodegen: 1.14.3
+ html-encoding-sniffer: 1.0.2
+ nwsapi: 2.2.22
+ parse5: 5.1.0
+ pn: 1.1.0
+ request: 2.88.2
+ request-promise-native: 1.0.9([email protected])
+ saxes: 3.1.11
+ symbol-tree: 3.2.4
+ tough-cookie: 3.0.1
+ w3c-hr-time: 1.0.2
+ w3c-xmlserializer: 1.1.2
+ webidl-conversions: 4.0.2
+ whatwg-encoding: 1.0.5
+ whatwg-mimetype: 2.3.0
+ whatwg-url: 7.1.0
+ ws: 7.5.10
+ xml-name-validator: 3.0.0
+ optionalDependencies:
+ canvas: 2.11.2([email protected])
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+ optional: true
+
@@ -6759,8 +7723,14 @@ snapshots:
+ optional: true
+
+ optional: true
+
dependencies:
string-convert: 0.2.1
@@ -6771,6 +7741,14 @@ snapshots:
+ dependencies:
+ assert-plus: 1.0.0
+ extsprintf: 1.3.0
+ json-schema: 0.4.0
+ verror: 1.10.0
+ optional: true
+
dependencies:
array-includes: 3.1.9
@@ -6792,6 +7770,12 @@ snapshots:
dependencies:
php-parser: 3.1.5
+ dependencies:
+ prelude-ls: 1.1.2
+ type-check: 0.3.2
+ optional: true
+
dependencies:
prelude-ls: 1.2.1
@@ -6851,6 +7835,9 @@ snapshots:
+ optional: true
+
@@ -6865,10 +7852,17 @@ snapshots:
dependencies:
yallist: 3.1.1
+ dependencies:
+ semver: 6.3.1
+ optional: true
+
+
@@ -6884,6 +7878,9 @@ snapshots:
dependencies:
mime-db: 1.52.0
+ optional: true
+
dependencies:
'@isaacs/brace-expansion': 5.0.0
@@ -6902,14 +7899,47 @@ snapshots:
+ dependencies:
+ yallist: 4.0.0
+ optional: true
+
+ optional: true
+
+ dependencies:
+ minipass: 3.3.6
+ yallist: 4.0.0
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ dependencies:
+ '@jridgewell/sourcemap-codec': 1.5.5
+ css-tree: 1.1.3
+ csstype: 3.1.3
+ fastest-stable-stringify: 2.0.2
+ inline-style-prefixer: 7.0.1
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ rtl-css-js: 1.16.1
+ stacktrace-js: 2.0.2
+ stylis: 4.3.6
+
@@ -6963,10 +7993,29 @@ snapshots:
+ dependencies:
+ abbrev: 1.1.1
+ optional: true
+
+ dependencies:
+ are-we-there-yet: 2.0.0
+ console-control-strings: 1.1.0
+ gauge: 3.0.2
+ set-blocking: 2.0.0
+ optional: true
+
dependencies:
boolbase: 1.0.0
+ optional: true
+
+ optional: true
+
@@ -7011,6 +8060,21 @@ snapshots:
+ dependencies:
+ wrappy: 1.0.2
+ optional: true
+
+ dependencies:
+ deep-is: 0.1.4
+ fast-levenshtein: 2.0.6
+ levn: 0.3.0
+ prelude-ls: 1.1.2
+ type-check: 0.3.2
+ word-wrap: 1.2.5
+ optional: true
+
dependencies:
deep-is: 0.1.4
@@ -7052,12 +8116,18 @@ snapshots:
domhandler: 5.0.3
parse5: 7.3.0
+ optional: true
+
dependencies:
entities: 6.0.0
+ optional: true
+
@@ -7074,6 +8144,9 @@ snapshots:
+ optional: true
+
@@ -7082,6 +8155,9 @@ snapshots:
+ optional: true
+
@@ -7092,6 +8168,9 @@ snapshots:
+ optional: true
+
@@ -7112,6 +8191,11 @@ snapshots:
+ dependencies:
+ punycode: 2.3.1
+ optional: true
+
@@ -7120,8 +8204,13 @@ snapshots:
dependencies:
side-channel: 1.1.0
+ optional: true
+
+
dependencies:
safe-buffer: 5.2.1
@@ -7451,11 +8540,25 @@ snapshots:
is-stream: 2.0.1
process.argv: 0.6.1
+ dependencies:
+ '@babel/runtime': 7.27.6
+ css-box-model: 1.2.1
+ memoize-one: 5.2.1
+ raf-schd: 4.0.3
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ redux: 4.2.1
+ use-memo-one: 1.1.3([email protected])
+ transitivePeerDependencies:
+ - react-native
+
dependencies:
dnd-core: 16.0.1
dependencies:
'@react-dnd/invariant': 4.0.2
'@react-dnd/shallowequal': 4.0.2
@@ -7464,6 +8567,7 @@ snapshots:
hoist-non-react-statics: 3.3.2
react: 18.3.1
optionalDependencies:
+ '@types/hoist-non-react-statics': 3.3.7(@types/[email protected])
'@types/node': 20.19.0
'@types/react': 18.3.23
@@ -7493,6 +8597,8 @@ snapshots:
+
@@ -7501,6 +8607,18 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
+ dependencies:
+ '@babel/runtime': 7.27.6
+ '@types/react-redux': 7.1.34
+ hoist-non-react-statics: 3.3.2
+ loose-envify: 1.4.0
+ prop-types: 15.8.1
+ react: 18.3.1
+ react-is: 17.0.2
+ optionalDependencies:
+ react-dom: 18.3.1([email protected])
+
dependencies:
'@types/sortablejs': 1.15.8
@@ -7524,10 +8642,41 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
+ dependencies:
+ react: 18.3.1
+ tslib: 2.8.1
+
+ dependencies:
+ '@types/js-cookie': 2.2.7
+ '@xobotyi/scrollbar-width': 1.9.5
+ copy-to-clipboard: 3.3.3
+ fast-deep-equal: 3.1.3
+ fast-shallow-equal: 1.0.0
+ js-cookie: 2.2.1
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ react-universal-interface: 0.6.2([email protected])([email protected])
+ resize-observer-polyfill: 1.5.1
+ screenfull: 5.2.0
+ set-harmonic-interval: 1.0.1
+ throttle-debounce: 3.0.1
+ ts-easing: 0.2.0
+ tslib: 2.8.1
+
dependencies:
loose-envify: 1.4.0
+ dependencies:
+ inherits: 2.0.4
+ string_decoder: 1.3.0
+ util-deprecate: 1.0.2
+ optional: true
+
@@ -7575,6 +8724,44 @@ snapshots:
dependencies:
jsesc: 3.0.2
+ dependencies:
+ lodash: 4.17.21
+ request: 2.88.2
+ optional: true
+
+ dependencies:
+ request: 2.88.2
+ request-promise-core: 1.1.4([email protected])
+ stealthy-require: 1.1.1
+ tough-cookie: 2.5.0
+ optional: true
+
+ dependencies:
+ aws-sign2: 0.7.0
+ aws4: 1.13.2
+ caseless: 0.12.0
+ combined-stream: 1.0.8
+ extend: 3.0.2
+ forever-agent: 0.6.1
+ form-data: 2.3.3
+ har-validator: 5.1.5
+ http-signature: 1.2.0
+ is-typedarray: 1.0.0
+ isstream: 0.1.2
+ json-stringify-safe: 5.0.1
+ mime-types: 2.1.35
+ oauth-sign: 0.9.0
+ performance-now: 2.1.0
+ qs: 6.5.3
+ safe-buffer: 5.2.1
+ tough-cookie: 2.5.0
+ tunnel-agent: 0.6.0
+ uuid: 3.4.0
+ optional: true
+
@@ -7601,10 +8788,19 @@ snapshots:
+ dependencies:
+ glob: 7.2.3
+ optional: true
+
dependencies:
glob: 9.3.5
+ dependencies:
+ '@babel/runtime': 7.27.6
+
dependencies:
queue-microtask: 1.2.3
@@ -7642,6 +8838,11 @@ snapshots:
+ dependencies:
+ xmlchars: 2.2.0
+ optional: true
+
dependencies:
loose-envify: 1.4.0
@@ -7659,6 +8860,8 @@ snapshots:
ajv-formats: 2.1.1([email protected])
ajv-keywords: 5.1.0([email protected])
+
dependencies:
compute-scroll-into-view: 3.1.1
@@ -7671,6 +8874,9 @@ snapshots:
dependencies:
randombytes: 2.1.0
+ optional: true
+
dependencies:
define-data-property: 1.1.4
@@ -7687,6 +8893,8 @@ snapshots:
functions-have-names: 1.2.3
has-property-descriptors: 1.0.2
+
dependencies:
dunder-proto: 1.0.1
@@ -7727,8 +8935,21 @@ snapshots:
side-channel-map: 1.0.1
side-channel-weakmap: 1.0.2
+ optional: true
+
+ optional: true
+
+ dependencies:
+ decompress-response: 4.2.1
+ once: 1.4.0
+ simple-concat: 1.0.1
+ optional: true
+
@@ -7738,12 +8959,47 @@ snapshots:
buffer-from: 1.1.2
source-map: 0.6.1
+
+ dependencies:
+ asn1: 0.2.6
+ assert-plus: 1.0.0
+ bcrypt-pbkdf: 1.0.2
+ dashdash: 1.14.1
+ ecc-jsbn: 0.1.2
+ getpass: 0.1.7
+ jsbn: 0.1.1
+ safer-buffer: 2.1.2
+ tweetnacl: 0.14.5
+ optional: true
+
+ dependencies:
+ stackframe: 1.3.4
+
+
+ dependencies:
+ source-map: 0.5.6
+ stackframe: 1.3.4
+
+ dependencies:
+ error-stack-parser: 2.1.4
+ stack-generator: 2.0.10
+ stacktrace-gps: 3.1.2
+
+ optional: true
+
dependencies:
es-errors: 1.3.0
@@ -7815,6 +9071,11 @@ snapshots:
define-properties: 1.2.1
es-object-atoms: 1.1.1
+ dependencies:
+ safe-buffer: 5.2.1
+ optional: true
+
dependencies:
iconv-lite: 0.4.24
@@ -7864,12 +9125,25 @@ snapshots:
+ optional: true
+
dependencies:
'@pkgr/core': 0.2.7
+ dependencies:
+ chownr: 2.0.0
+ fs-minipass: 2.1.0
+ minipass: 5.0.0
+ minizlib: 2.1.2
+ mkdirp: 1.0.4
+ yallist: 4.0.0
+ optional: true
+
dependencies:
'@jridgewell/trace-mapping': 0.3.30
@@ -7888,6 +9162,8 @@ snapshots:
+
@@ -7907,12 +9183,32 @@ snapshots:
+ dependencies:
+ psl: 1.15.0
+ punycode: 2.3.1
+ optional: true
+
+ dependencies:
+ ip-regex: 2.1.0
+ psl: 1.15.0
+ punycode: 2.3.1
+ optional: true
+
+ dependencies:
+ punycode: 2.3.1
+ optional: true
+
dependencies:
typescript: 5.8.3
+
dependencies:
'@types/json5': 0.0.29
@@ -7924,6 +9220,34 @@ snapshots:
+
+
+ dependencies:
+ fabric: 4.6.0([email protected])
+ tui-code-snippet: 2.3.3
+ tui-color-picker: 2.2.8
+ transitivePeerDependencies:
+ - bufferutil
+ - encoding
+ - supports-color
+ - utf-8-validate
+
+ dependencies:
+ safe-buffer: 5.2.1
+ optional: true
+
+ optional: true
+
+ dependencies:
+ prelude-ls: 1.1.2
+ optional: true
+
dependencies:
prelude-ls: 1.2.1
@@ -8015,8 +9339,37 @@ snapshots:
dependencies:
punycode: 2.3.1
+ dependencies:
+ react: 18.3.1
+
+ optional: true
+
+ optional: true
+
+ dependencies:
+ assert-plus: 1.0.0
+ core-util-is: 1.0.2
+ extsprintf: 1.3.0
+ optional: true
+
+ dependencies:
+ browser-process-hrtime: 1.0.0
+ optional: true
+
+ dependencies:
+ domexception: 1.0.1
+ webidl-conversions: 4.0.2
+ xml-name-validator: 3.0.0
+ optional: true
+
dependencies:
glob-to-regexp: 0.4.1
@@ -8024,6 +9377,9 @@ snapshots:
+ optional: true
+
@@ -8058,11 +9414,26 @@ snapshots:
- esbuild
- uglify-js
+ dependencies:
+ iconv-lite: 0.4.24
+ optional: true
+
+ optional: true
+
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
+ dependencies:
+ lodash.sortby: 4.7.0
+ tr46: 1.0.1
+ webidl-conversions: 4.0.2
+ optional: true
+
dependencies:
is-bigint: 1.1.0
@@ -8108,6 +9479,11 @@ snapshots:
dependencies:
isexe: 2.0.0
+ dependencies:
+ string-width: 4.2.3
+ optional: true
+
@@ -8122,6 +9498,12 @@ snapshots:
string-width: 5.1.2
strip-ansi: 7.1.0
+ optional: true
+
+ optional: true
+
dependencies:
xml-js: 1.6.11
@@ -8132,6 +9514,9 @@ snapshots:
dependencies:
sax: 1.4.1
+ optional: true
+
dependencies:
sax: 1.4.1
@@ -8139,8 +9524,14 @@ snapshots:
+ optional: true
+
+ optional: true
+
diff --git a/aitoearn_web/aitoearn-web/src/api/accountSort.ts b/aitoearn_web/aitoearn-web/src/api/accountSort.ts
new file mode 100644
index 00000000..76420638
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/api/accountSort.ts
@@ -0,0 +1,34 @@
+// 账户和分组排序API接口
+import http from "@/utils/request";
+
+export interface SortRankItem {
+ id: string;
+ rank: number;
+}
+
+export interface SortRankRequest {
+ list: SortRankItem[];
+}
+
+export interface AccountSortRankRequest {
+ groupId: string;
+ list: SortRankItem[];
+}
+
+/**
+ * 更新分组排序
+ * @param data 排序数据
+ * @returns
+ */
+export const apiUpdateAccountGroupSortRank = (data: SortRankRequest) => {
+ return http.put("accountGroup/sortRank", data);
+};
+
+/**
+ * 更新账户排序
+ * @param data 排序数据
+ * @returns
+ */
+export const apiUpdateAccountSortRank = (data: AccountSortRankRequest) => {
+ return http.put("account/sortRank", data);
+};
diff --git a/aitoearn_web/aitoearn-web/src/api/ai.ts b/aitoearn_web/aitoearn-web/src/api/ai.ts
index 56f0a86a..46951cbc 100644
--- a/aitoearn_web/aitoearn-web/src/api/ai.ts
+++ b/aitoearn_web/aitoearn-web/src/api/ai.ts
@@ -82,6 +82,14 @@ export const getVideoTaskStatus = (taskId: string) => {
return http.get(`ai/video/generations/${taskId}`);
};
+// 获取视频生成历史记录
+export const getVideoGenerations = (params?: {
+ page?: number;
+ pageSize?: number;
+}) => {
+ return http.get("ai/video/generations", { params });
+};
+
// 保留旧的接口以保持向后兼容性(可选)
// 文生图 - 旧接口(已废弃)
export const textToImage = (data: {
diff --git a/aitoearn_web/aitoearn-web/src/api/apiReq.ts b/aitoearn_web/aitoearn-web/src/api/apiReq.ts
index 9d165170..92eb1dff 100644
--- a/aitoearn_web/aitoearn-web/src/api/apiReq.ts
+++ b/aitoearn_web/aitoearn-web/src/api/apiReq.ts
@@ -58,6 +58,20 @@ export const checkRegistStatusApi = (data: RegistCheckParams) => {
});
};
+// 邮箱注册接口
+export const mailRegistApi = (data: {
+ mail: string;
+ code: string;
+ password: string;
+ inviteCode?: string;
+}) => {
+ const hash = md5(data.password);
+ return http.post<LoginResponse>("login/mail/regist", {
+ ...data,
+ password: hash,
+ });
+};
+
// 发送重置密码邮件
export const sendResetPasswordMailApi = (data: { mail: string }) => {
return http.post<LoginResponse>("login/repassword/mail", data);
diff --git a/aitoearn_web/aitoearn-web/src/api/plat/bilibili.ts b/aitoearn_web/aitoearn-web/src/api/plat/bilibili.ts
index 1aae5435..2f12f03a 100644
--- a/aitoearn_web/aitoearn-web/src/api/plat/bilibili.ts
+++ b/aitoearn_web/aitoearn-web/src/api/plat/bilibili.ts
@@ -4,11 +4,15 @@ import { BiblPartItem } from "@/components/PublishDialog/publishDialog.type";
/**
* 获取B站登录地址
+ * @param type 授权类型
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const apiGetBilibiliLoginUrl = (type: "h5" | "pc") => {
+export const apiGetBilibiliLoginUrl = (type: "h5" | "pc", spaceId?: string) => {
+ const params = spaceId ? { spaceId } : {};
return http.get<{ code: number; data: { taskId: string; url: string } }>(
`plat/bilibili/auth/url/${type}`,
+ params
);
};
diff --git a/aitoearn_web/aitoearn-web/src/api/plat/kwai.ts b/aitoearn_web/aitoearn-web/src/api/plat/kwai.ts
index b4730999..3e233b29 100644
--- a/aitoearn_web/aitoearn-web/src/api/plat/kwai.ts
+++ b/aitoearn_web/aitoearn-web/src/api/plat/kwai.ts
@@ -3,13 +3,16 @@ import { GetKwaiAuthStatusRes } from "@/api/plat/types/kwai.types";
/**
* 创建快手授权
+ * @param type 授权类型
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const createKwaiAuth = (type: "h5" | "pc") => {
+export const createKwaiAuth = (type: "h5" | "pc", spaceId?: string) => {
+ const params = spaceId ? { spaceId } : {};
return http.get<{
url: string;
taskId: string;
- }>(`plat/kwai/auth/url/${type}`);
+ }>(`plat/kwai/auth/url/${type}`, params);
};
// 获取账号授权状态
diff --git a/aitoearn_web/aitoearn-web/src/api/plat/threads.ts b/aitoearn_web/aitoearn-web/src/api/plat/threads.ts
new file mode 100644
index 00000000..d156dbf3
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/api/plat/threads.ts
@@ -0,0 +1,29 @@
+// Threads API接口
+import http from "@/utils/request";
+
+export interface ThreadsLocationItem {
+ id: string;
+ label: string;
+}
+
+export interface ThreadsLocationsResponse {
+ data: ThreadsLocationItem[];
+ code: number;
+}
+
+/**
+ * 获取Threads位置列表
+ * @param accountId 账户ID
+ * @param keyword 搜索关键词(可选)
+ * @returns
+ */
+export const apiGetThreadsLocations = (accountId: string, keyword?: string) => {
+ const params: any = { accountId };
+ if (keyword) {
+ params.keyword = keyword;
+ }
+ return http.get<ThreadsLocationsResponse>(
+ `plat/meta/threads/locations`,
+ params
+ );
+};
diff --git a/aitoearn_web/aitoearn-web/src/api/platAuth.ts b/aitoearn_web/aitoearn-web/src/api/platAuth.ts
index 50b12890..1c0da4ab 100644
--- a/aitoearn_web/aitoearn-web/src/api/platAuth.ts
+++ b/aitoearn_web/aitoearn-web/src/api/platAuth.ts
@@ -2,11 +2,15 @@ import http from "@/utils/request";
import { request } from "@/utils/request";
// 获取 YouTube 授权 URL
-export const getYouTubeAuthUrlApi = (mail: string) => {
+export const getYouTubeAuthUrlApi = (mail: string, spaceId?: string) => {
+ const params: any = { type: 'pc' };
+ if (spaceId) {
+ params.spaceId = spaceId;
+ }
return request({
url: 'plat/youtube/auth/url',
method: 'GET',
- params: { type: 'pc' },
+ params,
});
};
@@ -65,16 +69,21 @@ export const getYouTubeChannelSectionsApi = (data: any) => {
/**
* 获取facebook授权状态
- * @param taskId 任务ID
+ * @param mail 邮箱
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const getFacebookAuthUrlApi = (mail: string) => {
+export const getFacebookAuthUrlApi = (mail: string, spaceId?: string) => {
+ const data: any = {
+ platform: 'facebook',
+ };
+ if (spaceId) {
+ data.spaceId = spaceId;
+ }
return request({
url: 'plat/meta/auth/url',
method: 'POST',
- data: {
- platform: 'facebook',
- },
+ data,
});
};
@@ -91,16 +100,21 @@ export const checkMetaAuthApi = ( taskId:any ) => {
/**
* 获取instagram授权状态
- * @param taskId 任务ID
+ * @param mail 邮箱
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const getInstagramAuthUrlApi = (mail: string) => {
+export const getInstagramAuthUrlApi = (mail: string, spaceId?: string) => {
+ const data: any = {
+ platform: 'instagram',
+ };
+ if (spaceId) {
+ data.spaceId = spaceId;
+ }
return request({
url: 'plat/meta/auth/url',
method: 'POST',
- data: {
- platform: 'instagram',
- },
+ data,
});
};
@@ -108,44 +122,60 @@ export const getInstagramAuthUrlApi = (mail: string) => {
/**
* 获取threads授权状态
- * @param taskId 任务ID
+ * @param mail 邮箱
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const getThreadsAuthUrlApi = (mail: string) => {
+export const getThreadsAuthUrlApi = (mail: string, spaceId?: string) => {
+ const data: any = {
+ platform: 'threads',
+ };
+ if (spaceId) {
+ data.spaceId = spaceId;
+ }
return request({
url: 'plat/meta/auth/url',
method: 'POST',
- data: {
- platform: 'threads',
- },
+ data,
});
};
/**
* 获取linkedin授权链接
* 逻辑与facebook一致,仅platform传linkedin
+ * @param mail 邮箱
+ * @param spaceId 空间ID(可选)
*/
-export const getLinkedInAuthUrlApi = (mail: string) => {
+export const getLinkedInAuthUrlApi = (mail: string, spaceId?: string) => {
+ const data: any = {
+ platform: 'linkedin',
+ };
+ if (spaceId) {
+ data.spaceId = spaceId;
+ }
return request({
url: 'plat/meta/auth/url',
method: 'POST',
- data: {
- platform: 'linkedin',
- },
+ data,
});
};
/**
* 获取tiktok授权状态
- * @param taskId 任务ID
+ * @param mail 邮箱
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const getTiktokAuthUrlApi = (mail: string) => {
+export const getTiktokAuthUrlApi = (mail: string, spaceId?: string) => {
+ const data: any = { type: 'pc' };
+ if (spaceId) {
+ data.spaceId = spaceId;
+ }
return request({
url: 'plat/tiktok/auth/url',
method: 'POST',
- data: { type: 'pc' },
+ data,
});
};
@@ -158,11 +188,15 @@ export const checkTiktokAuthApi = ( taskId:any ) => {
// 微信授权
-export const getWxGzhAuthUrlApi = (mail: string) => {
+export const getWxGzhAuthUrlApi = (mail: string, spaceId?: string) => {
+ const params: any = { type: 'pc' };
+ if (spaceId) {
+ params.spaceId = spaceId;
+ }
return request({
url: 'plat/wxGzh/auth/url/pc',
method: 'GET',
- params: { type: 'pc' },
+ params,
});
};
@@ -175,14 +209,20 @@ export const checkWxGzAuthApi = ( taskId:any ) => {
/**
- * 获取facebook授权状态
- * @param taskId 任务ID
+ * 获取pinterest授权状态
+ * @param mail 邮箱
+ * @param spaceId 空间ID(可选)
* @returns
*/
-export const getPinterestAuthUrlApi = (mail: string) => {
+export const getPinterestAuthUrlApi = (mail: string, spaceId?: string) => {
+ const params: any = {};
+ if (spaceId) {
+ params.spaceId = spaceId;
+ }
return request({
url: 'plat/pinterest/getAuth',
method: 'GET',
+ params,
});
};
diff --git a/aitoearn_web/aitoearn-web/src/api/twitter.ts b/aitoearn_web/aitoearn-web/src/api/twitter.ts
index 305e6666..ec4eb758 100644
--- a/aitoearn_web/aitoearn-web/src/api/twitter.ts
+++ b/aitoearn_web/aitoearn-web/src/api/twitter.ts
@@ -2,12 +2,15 @@ import http from "@/utils/request";
import { request } from "@/utils/request";
// 获取 Twitter 授权 URL
-export const getTwitterAuthUrlApi = (mail: string) => {
+export const getTwitterAuthUrlApi = (mail: string, spaceId?: string) => {
+ const data: any = {};
+ if (spaceId) {
+ data.spaceId = spaceId;
+ }
return request({
url: 'plat/twitter/auth/url',
method: 'POST',
- data: {
- },
+ data,
});
};
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx
index 0d600a27..92725958 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx
@@ -13,6 +13,9 @@ import { SocialAccount } from "@/api/types/account.type";
import AllPlatIcon from "@/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon";
import { useTransClient } from "@/app/i18n/client";
import { useUserStore } from "@/store/user";
+import Image from "next/image";
+
+import rightArrow from "@/assets/images/jiantou.png";
interface AccountPageCoreProps {
searchParams?: {
@@ -43,6 +46,8 @@ export default function AccountPageCore({
// 移动端下载提示弹窗开关
const [showMobileDownload, setShowMobileDownload] = useState(false);
+ // 微信浏览器提示弹窗开关
+ const [showWechatBrowserTip, setShowWechatBrowserTip] = useState(false);
useEffect(() => {
accountInit();
@@ -68,18 +73,39 @@ export default function AccountPageCore({
}
}, [searchParams]);
+ /**
+ * 检测是否为微信浏览器
+ */
+ const isWechatBrowser = () => {
+ if (typeof window === "undefined") return false;
+ const ua = window.navigator.userAgent.toLowerCase();
+ return ua.includes('micromessenger');
+ };
+
/**
* 在移动端首次进入 accounts 页面时,展示下载提示弹窗
* - 条件:屏幕宽度 <= 768
* - 只在当前会话展示一次(使用 sessionStorage 标记)
+ * - 如果是微信浏览器,先显示微信浏览器提示
*/
useEffect(() => {
if (typeof window === "undefined") return;
const isMobile = window.innerWidth <= 768;
const hasShown = sessionStorage.getItem("accountsMobileDownloadShown");
+ const hasShownWechatTip = sessionStorage.getItem("accountsWechatTipShown");
+
if (isMobile) {
- setShowMobileDownload(true);
- sessionStorage.setItem("accountsMobileDownloadShown", "1");
+ // 如果是微信浏览器且未显示过微信提示,先显示微信提示
+ if (isWechatBrowser() && !hasShownWechatTip) {
+ setShowWechatBrowserTip(true);
+ sessionStorage.setItem("accountsWechatTipShown", "1");
+ } else if (!hasShown) {
+ // 非微信浏览器或已显示过微信提示,显示下载提示
+ setShowMobileDownload(true);
+ sessionStorage.setItem("accountsMobileDownloadShown", "1");
+ }
+
+
}
}, []);
@@ -88,6 +114,19 @@ export default function AccountPageCore({
*/
const closeMobileDownload = () => setShowMobileDownload(false);
+ /**
+ * 关闭微信浏览器提示弹窗
+ */
+ const closeWechatBrowserTip = () => {
+ setShowWechatBrowserTip(false);
+ // 关闭微信提示后,显示下载提示
+ const hasShown = sessionStorage.getItem("accountsMobileDownloadShown");
+ if (!hasShown) {
+ setShowMobileDownload(true);
+ sessionStorage.setItem("accountsMobileDownloadShown", "1");
+ }
+ };
+
/**
* 生成下载链接(根据语言)
*/
@@ -114,6 +153,22 @@ export default function AccountPageCore({
};
})();
+ const wechatBrowserTexts = (() => {
+ const lang = userStore.lang;
+ if (lang === "zh-CN") {
+ return {
+ title: "请在浏览器中打开",
+ desc: "请点击右上角,通过浏览器打开",
+ cta: "我知道了",
+ };
+ }
+ return {
+ title: "Please open in browser",
+ desc: "Please click the top-right corner to open via browser",
+ cta: "I understand",
+ };
+ })();
+
const handleAddAccountSuccess = (accountInfo: SocialAccount) => {
setAddAccountModalOpen(false);
// 可以在这里添加成功提示或其他逻辑
@@ -176,6 +231,41 @@ export default function AccountPageCore({
autoTriggerPlatform={targetPlatform}
/>
+ {/* 微信浏览器提示(遮罩 + 箭头指向右上角) */}
+ {showWechatBrowserTip && (
+ <>
+ <div className={styles.mobileDownloadOverlay} onClick={closeWechatBrowserTip} />
+ <Image src={rightArrow} alt="rightArrow" width={120} height={120} className={styles.rightArrow} />
+ <div className={styles.wechatTipContainer}>
+ <div className={styles.wechatTipContent}>
+ <div className={styles.wechatTipTitle}>{wechatBrowserTexts.title}</div>
+ <div className={styles.wechatTipSteps}>
+ <div className={styles.wechatTipStep}>
+ <span className={styles.stepNumber}>1</span>
+ <span className={styles.stepText}>
+ {userStore.lang === "zh-CN" ? "点击右上角的" : "Click the top-right corner's"}
+ <span className={styles.dotsButton}>⋯</span>
+ {userStore.lang === "zh-CN" ? "按钮" : "button"}
+ </span>
+ </div>
+ <div className={styles.wechatTipStep}>
+ <span className={styles.stepNumber}>2</span>
+ <span className={styles.stepText}>
+ {userStore.lang === "zh-CN" ? "选择" : "Select"}
+ <span className={styles.browserButton}>🌐</span>
+ {userStore.lang === "zh-CN" ? "在浏览器中打开" : "Open in browser"}
+ </span>
+ </div>
+ </div>
+ <button className={styles.wechatTipClose} onClick={closeWechatBrowserTip}>
+ {wechatBrowserTexts.cta}
+ </button>
+ </div>
+
+ </div>
+ </>
+ )}
+
{/* 移动端下载提示(遮罩 + 底部弹窗) */}
{showMobileDownload && (
<>
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accounts.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accounts.module.scss
index 958f1ff7..341fae9d 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accounts.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/accounts.module.scss
@@ -98,4 +98,139 @@
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
+}
+
+// 微信浏览器提示:容器
+.wechatTipContainer {
+ position: fixed;
+ inset: 0;
+ z-index: 1001;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ pointer-events: none;
+}
+
+// 微信浏览器提示:内容区域
+.wechatTipContent {
+ background: rgba(255, 255, 255, 0.95);
+ border-radius: 16px;
+ padding: 24px;
+ margin: 20px;
+ max-width: 320px;
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
+ backdrop-filter: blur(10px);
+ pointer-events: auto;
+ animation: tipFadeIn 0.3s ease-out;
+}
+
+.wechatTipTitle {
+ font-size: 18px;
+ font-weight: 700;
+ color: #111827;
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+.wechatTipSteps {
+ margin-bottom: 20px;
+}
+
+.wechatTipStep {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-bottom: 12px;
+ font-size: 14px;
+ color: #374151;
+ line-height: 1.5;
+}
+
+.stepNumber {
+ background: #4f46e5;
+ color: white;
+ width: 24px;
+ height: 24px;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 12px;
+ font-weight: 600;
+ flex-shrink: 0;
+}
+
+.stepText {
+ flex: 1;
+}
+
+.dotsButton {
+ background: #374151;
+ color: white;
+ padding: 2px 8px;
+ border-radius: 4px;
+ font-size: 12px;
+ margin: 0 4px;
+ display: inline-block;
+}
+
+.browserButton {
+ background: #374151;
+ color: white;
+ padding: 2px 6px;
+ border-radius: 4px;
+ font-size: 12px;
+ margin: 0 4px;
+ display: inline-block;
+}
+
+.wechatTipClose {
+ width: 100%;
+ background: #4f46e5;
+ color: white;
+ border: none;
+ padding: 12px;
+ border-radius: 8px;
+ font-weight: 600;
+ cursor: pointer;
+ transition: background 0.2s ease;
+
+ &:hover {
+ background: #4338ca;
+ }
+}
+
+// 微信浏览器提示:箭头指向右上角
+.rightArrow {
+ position: fixed;
+ top: 10%;
+ right: 20px;
+ z-index: 1002;
+ pointer-events: none;
+ background-color: #E9F6FF;
+ animation: arrowPulse 2s ease-in-out infinite;
+ border-radius: 50%;
+ padding: 10px;
+}
+
+@keyframes arrowPulse {
+ 0%, 100% {
+ opacity: 0.8;
+ transform: translateY(-50%) scale(1);
+ }
+ 50% {
+ opacity: 1;
+ transform: translateY(-50%) scale(1.1);
+ }
+}
+
+@keyframes tipFadeIn {
+ from {
+ opacity: 0;
+ transform: scale(0.9);
+ }
+ to {
+ opacity: 1;
+ transform: scale(1);
+ }
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss
index 2d5c6e53..a343b6e9 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.module.scss
@@ -47,6 +47,46 @@
flex-wrap: wrap;
gap: 8px;
width: 100%;
+ position: relative;
+ }
+
+ .accountSidebar-groupSort {
+ position: absolute;
+ right: -15px;
+ top: 50%;
+ transform: translateY(-50%);
+ opacity: 0;
+ transition: opacity 0.2s;
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ }
+
+ .accountSidebar-groupLabel:hover .accountSidebar-groupSort {
+ opacity: 1;
+ }
+
+ .accountSidebar-ipType {
+ display: inline-block;
+ background-color: var(--grayColor2);
+ color: #8A5BF2;
+ padding: 1px 2px;
+ border-radius: 4px;
+ font-size: 10px;
+ font-weight: 500;
+ margin-right: 4px;
+ }
+
+ .accountSidebar-ipType[data-type="direct"] {
+ background-color: #e6f7ff;
+ color: #1890ff;
+ // border: 1px solid #91d5ff;
+ }
+
+ .accountSidebar-ipType[data-type="proxy"] {
+ background-color: #fff7e6;
+ color: #fa8c16;
+ // border: 1px solid #ffd591;
}
.accountSidebar-groupName {
@@ -127,6 +167,39 @@
background: #fff;
transition: 0.3s;
color: #333;
+ position: relative;
+
+ .accountList-item-dragHandle {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 20px;
+ height: 20px;
+ margin-right: 8px;
+ cursor: grab;
+ color: var(--grayColor5);
+ opacity: 0;
+ transition: opacity 0.2s;
+ flex-shrink: 0;
+
+ &:active {
+ cursor: grabbing;
+ }
+
+ &:hover {
+ color: var(--grayColor7);
+ }
+ }
+
+ &:hover .accountList-item-dragHandle {
+ opacity: 1;
+ }
+
+ &--dragging {
+ transform: rotate(5deg);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
+ z-index: 1000;
+ }
.ant-avatar {
flex-shrink: 0;
}
@@ -177,6 +250,37 @@
filter: grayscale(100%) !important;
opacity: 0.5 !important;
}
+
+ &--mobile-only {
+ position: relative;
+ filter: grayscale(100%) !important;
+ opacity: 0.6 !important;
+ }
+ }
+ }
+
+ .accountList-item-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.3);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 10;
+ cursor: pointer;
+
+ &-text {
+ color: white;
+ font-size: 12px;
+ font-weight: 500;
+ text-align: center;
+ background: rgba(0, 0, 0, 0.6);
+ padding: 4px 8px;
+ border-radius: 4px;
+ white-space: nowrap;
}
}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx
index e65a2a9c..67635156 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/AccountSidebar.tsx
@@ -2,6 +2,7 @@ import {
ForwardedRef,
forwardRef,
memo,
+ useCallback,
useEffect,
useMemo,
useRef,
@@ -19,6 +20,20 @@ import {
Input,
message,
} from "antd";
+import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
+
+// 六点拖拽图标组件
+const SixDotsIcon = () => (
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none">
+ <circle cx="2" cy="2" r="1" fill="currentColor" />
+ <circle cx="6" cy="2" r="1" fill="currentColor" />
+ <circle cx="10" cy="2" r="1" fill="currentColor" />
+ <circle cx="2" cy="6" r="1" fill="currentColor" />
+ <circle cx="6" cy="6" r="1" fill="currentColor" />
+ <circle cx="10" cy="6" r="1" fill="currentColor" />
+ </svg>
+);
+
// import { accountLogin, acpAccountLoginCheck } from "@/icp/account";
import {
CheckCircleOutlined,
@@ -26,6 +41,9 @@ import {
UserOutlined,
WarningOutlined,
DeleteOutlined,
+ UpOutlined,
+ DownOutlined,
+ DragOutlined,
} from "@ant-design/icons";
import { useShallow } from "zustand/react/shallow";
import { useAccountStore } from "@/store/account";
@@ -43,8 +61,22 @@ import {
extractCountry,
} from "@/utils/ipLocation";
import { createAccountGroupApi, updateAccountApi } from "@/api/account";
+import { apiUpdateAccountGroupSortRank, apiUpdateAccountSortRank } from "@/api/accountSort";
import AddAccountModal from "../AddAccountModal";
import DeleteUserConfirmModal from "./DeleteUserConfirmModal";
+// 导入各平台授权函数
+import { kwaiSkip } from "@/app/[lng]/accounts/plat/kwaiLogin";
+import { bilibiliSkip } from "@/app/[lng]/accounts/plat/BilibiliLogin";
+import { youtubeSkip } from "@/app/[lng]/accounts/plat/YoutubeLogin";
+import { twitterSkip } from "@/app/[lng]/accounts/plat/TwtterLogin";
+import { tiktokSkip } from "@/app/[lng]/accounts/plat/TiktokLogin";
+import { facebookSkip, FacebookPagesModal } from "@/app/[lng]/accounts/plat/FacebookLogin";
+import { instagramSkip } from "@/app/[lng]/accounts/plat/InstagramLogin";
+import { threadsSkip } from "@/app/[lng]/accounts/plat/ThreadsLogin";
+import { wxGzhSkip } from "@/app/[lng]/accounts/plat/WxGzh";
+import { pinterestSkip } from "@/app/[lng]/accounts/plat/PinterestLogin";
+import { linkedinSkip } from "@/app/[lng]/accounts/plat/LinkedinLogin";
+import DownloadAppModal from "@/components/common/DownloadAppModal";
export interface IAccountSidebarRef {}
@@ -57,6 +89,8 @@ export interface IAccountSidebarProps {
excludePlatforms?: PlatType[];
// 侧边栏内容顶部扩展内容
sidebarTopExtra?: React.ReactNode;
+ // 是否在interactive页面(用于应用特殊的平台过滤和蒙层效果)
+ isInteractivePage?: boolean;
}
const AccountStatusView = ({ account }: { account: SocialAccount }) => {
@@ -129,7 +163,7 @@ const AccountPopoverInfo = ({
style={{ marginLeft: 18, border: "none" }}
onClick={() => onDeleteClick?.(accountInfo)}
>
- 删除账户
+ {t("deleteAccount" as any)}
</Button>
</p>
</div>
@@ -145,6 +179,7 @@ const AccountSidebar = memo(
onAccountChange,
excludePlatforms = [],
sidebarTopExtra,
+ isInteractivePage = false,
}: IAccountSidebarProps,
ref: ForwardedRef<IAccountSidebarRef>,
) => {
@@ -199,12 +234,48 @@ const AccountSidebar = memo(
const snapshotReadyRef = useRef(false);
const allUser = useRef("-1");
- // 在组件内部过滤账号列表,而不是在 useAccountStore 中过滤
+ // 掉线账号重新登录确认弹窗状态
+ const [showReauthConfirm, setShowReauthConfirm] = useState(false);
+ const [reauthAccount, setReauthAccount] = useState<SocialAccount | null>(null);
+
+ // Facebook页面选择弹窗状态
+ const [showFacebookPagesModal, setShowFacebookPagesModal] = useState(false);
+
+ // App下载提示弹窗状态
+ const [showAppDownloadModal, setShowAppDownloadModal] = useState(false);
+ const [mobileOnlyPlatform, setMobileOnlyPlatform] = useState<string>("");
+
+ // 排序相关状态
+ const [isGroupSorting, setIsGroupSorting] = useState(false);
+ const [isAccountSorting, setIsAccountSorting] = useState(false);
+
+ // 本地账户排序状态,用于临时存储拖拽后的顺序
+ const [localAccountSort, setLocalAccountSort] = useState<Record<string, string[]>>({});
+
+ // 自动保存定时器引用
+ const saveTimeoutRef = useRef<NodeJS.Timeout | null>(null);
+
+ // 在组件内部过滤账号列表,根据页面类型决定过滤逻辑
const accountList = useMemo(() => {
- return fullAccountList.filter(
- (account) => !excludePlatforms.includes(account.type),
- );
- }, [fullAccountList, excludePlatforms]);
+ if (isInteractivePage) {
+ // 在interactive页面,只显示指定的平台
+ const allowedPlatforms = [
+ PlatType.Facebook,
+ PlatType.Instagram,
+ PlatType.Threads,
+ PlatType.Douyin,
+ PlatType.Xhs
+ ];
+ return fullAccountList.filter(
+ (account) => !excludePlatforms.includes(account.type) && allowedPlatforms.includes(account.type),
+ );
+ } else {
+ // 在其他页面,正常过滤
+ return fullAccountList.filter(
+ (account) => !excludePlatforms.includes(account.type),
+ );
+ }
+ }, [fullAccountList, excludePlatforms, isInteractivePage]);
const defaultActiveKey = useMemo(() => {
return accountGroupList.find((v) => v.isDefault)?.id;
@@ -218,7 +289,7 @@ const AccountSidebar = memo(
const info = await getIpLocation();
setIpLocationInfo(info);
} catch (error) {
- console.error("获取IP地理位置信息失败:", error);
+ console.error(t("messages.ipLocationError" as any), error);
} finally {
setIpLocationLoading(false);
}
@@ -228,10 +299,188 @@ const AccountSidebar = memo(
fetchIpLocation();
}, []);
+ // 处理离线账户点击,显示确认弹窗
+ const handleOfflineAccountClick = useCallback((account: SocialAccount) => {
+ setReauthAccount(account);
+ setShowReauthConfirm(true);
+ }, []);
+
+ // 确认重新登录
+ const handleConfirmReauth = useCallback(async () => {
+ if (!reauthAccount) return;
+
+ const platform = reauthAccount.type;
+ const targetSpaceId = reauthAccount.groupId; // 使用账户原本的空间ID
+
+ setShowReauthConfirm(false);
+
+ try {
+ // 根据平台类型调用对应的授权函数,传递目标空间ID
+ switch (platform) {
+ case PlatType.KWAI:
+ await kwaiSkip(platform, targetSpaceId);
+ break;
+ case PlatType.BILIBILI:
+ await bilibiliSkip(platform, targetSpaceId);
+ break;
+ case PlatType.YouTube:
+ await youtubeSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Twitter:
+ await twitterSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Tiktok:
+ await tiktokSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Facebook:
+ try {
+ await facebookSkip(platform, targetSpaceId);
+ // Facebook授权成功后显示页面选择弹窗
+ setShowFacebookPagesModal(true);
+ } catch (error) {
+ console.error(t('messages.facebookAuthFailed' as any), error);
+ }
+ break;
+ case PlatType.Instagram:
+ await instagramSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Threads:
+ await threadsSkip(platform, targetSpaceId);
+ break;
+ case PlatType.WxGzh:
+ await wxGzhSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Pinterest:
+ await pinterestSkip(platform, targetSpaceId);
+ break;
+ case PlatType.LinkedIn:
+ await linkedinSkip(platform, targetSpaceId);
+ break;
+ default:
+ console.warn(`${t('messages.unsupportedPlatform' as any)}: ${platform}`);
+ message.warning(t('messages.platformNotSupported' as any, { platform }));
+ return;
+ }
+
+ // 授权完成后刷新账号列表
+ setTimeout(async () => {
+ try {
+ await getAccountList();
+ console.log(t('messages.accountListRefreshed' as any));
+ } catch (error) {
+ console.error(t('messages.refreshAccountListFailed' as any), error);
+ }
+ }, 3000); // 等待3秒让授权完成
+ } catch (error) {
+ console.error(t('messages.authFailed' as any), error);
+ message.error(t('messages.authFailed' as any) + ',' + t('messages.pleaseRetry' as any));
+ } finally {
+ setReauthAccount(null);
+ }
+ }, [reauthAccount, getAccountList, t]);
+
+ // 处理Facebook页面选择成功
+ const handleFacebookPagesSuccess = () => {
+ setShowFacebookPagesModal(false);
+ // 可以在这里添加成功提示或其他逻辑
+ };
+
+ // 分组排序函数
+ const handleGroupSort = async (groupId: string, direction: 'up' | 'down') => {
+ const sortedGroups = [...accountGroupList].sort((a, b) => (a.rank || 0) - (b.rank || 0));
+ const currentIndex = sortedGroups.findIndex(g => g.id === groupId);
+
+ if (currentIndex === -1) return;
+
+ const newIndex = direction === 'up' ? currentIndex - 1 : currentIndex + 1;
+ if (newIndex < 0 || newIndex >= sortedGroups.length) return;
+
+ // 交换位置
+ [sortedGroups[currentIndex], sortedGroups[newIndex]] = [sortedGroups[newIndex], sortedGroups[currentIndex]];
+
+ // 更新rank
+ const updateList = sortedGroups.map((group, index) => ({
+ id: group.id,
+ rank: index
+ }));
+
+ try {
+ await apiUpdateAccountGroupSortRank({ list: updateList });
+ await getAccountGroup();
+ message.success(t("messages.sortSuccess" as any));
+ } catch (error) {
+ message.error(t("messages.sortFailed" as any));
+ }
+ };
+
+ // 账户拖拽排序
+ const handleAccountDragEnd = (result: any) => {
+ if (!result.destination) return;
+
+ const { source, destination } = result;
+ const groupId = source.droppableId;
+
+ // 获取该分组的账户列表
+ const groupAccounts = isInteractivePage ?
+ accountList.filter(account => account.groupId === groupId) :
+ accountGroupList.find(g => g.id === groupId)?.children || [];
+
+ // 获取当前分组的本地排序,如果没有则使用原始排序
+ const currentSort = localAccountSort[groupId] || groupAccounts
+ .sort((a, b) => (a.rank || 0) - (b.rank || 0))
+ .map(account => account.id);
+
+ // 创建新的排序数组
+ const newSort = [...currentSort];
+ const [movedId] = newSort.splice(source.index, 1);
+ newSort.splice(destination.index, 0, movedId);
+
+ // 更新本地排序状态
+ setLocalAccountSort(prev => ({
+ ...prev,
+ [groupId]: newSort
+ }));
+
+
+ const updateList = newSort.map((accountId, index) => ({
+ id: accountId,
+ rank: index
+ }));
+
+ apiUpdateAccountSortRank({ groupId, list: updateList });
+
+ // // 清除之前的定时器
+ // if (saveTimeoutRef.current) {
+ // clearTimeout(saveTimeoutRef.current);
+ // }
+
+ // // 设置新的定时器,2秒后自动保存
+ // saveTimeoutRef.current = setTimeout(async () => {
+ // try {
+ // const updateList = newSort.map((accountId, index) => ({
+ // id: accountId,
+ // rank: index
+ // }));
+
+ // await apiUpdateAccountSortRank({ groupId, list: updateList });
+ // // 保存成功后清除本地排序状态,让界面使用服务器数据
+ // setLocalAccountSort(prev => {
+ // const newState = { ...prev };
+ // delete newState[groupId];
+ // return newState;
+ // });
+ // // await getAccountList();
+ // } catch (error) {
+ // console.error('自动保存排序失败:', error);
+ // message.error(t("messages.sortFailed" as any));
+ // }
+ // }, 2000);
+ };
+
// 添加账号流程
const openAddAccountFlow = async () => {
if (accountGroupList.length === 0) {
- message.error("请先创建空间");
+ message.error(t("messages.createSpaceFirst" as any));
return;
}
@@ -277,6 +526,15 @@ const AccountSidebar = memo(
maybeAssign();
}, [fullAccountList]);
+ // 组件卸载时清理定时器
+ useEffect(() => {
+ return () => {
+ if (saveTimeoutRef.current) {
+ clearTimeout(saveTimeoutRef.current);
+ }
+ };
+ }, []);
+
return (
<>
<UserManageModal
@@ -416,13 +674,24 @@ const AccountSidebar = memo(
) : (
<div className="accountSidebar-content">
{sidebarTopExtra}
- <Collapse
- key={defaultActiveKey}
- defaultActiveKey={defaultActiveKey}
- items={accountGroupList.map((v) => {
+ <DragDropContext onDragEnd={handleAccountDragEnd}>
+ <Collapse
+ key={defaultActiveKey}
+ defaultActiveKey={defaultActiveKey}
+ items={accountGroupList
+ .sort((a, b) => (a.rank || 0) - (b.rank || 0))
+ .map((v) => {
// 为默认分组添加IP和地址信息
const isDefaultGroup = v.isDefault;
const showIpInfo = isDefaultGroup && ipLocationInfo;
+
+ // 计算过滤后的账户数量和在线数量
+ const groupAccounts = isInteractivePage ?
+ accountList.filter(account => account.groupId === v.id) :
+ v.children || [];
+ const totalCount = groupAccounts.length;
+ const onlineCount = groupAccounts.filter(account => account.status === AccountStatus.USABLE).length;
+
return {
key: v.id,
label: (
@@ -432,17 +701,13 @@ const AccountSidebar = memo(
{v.name}
</span>
<span className="accountSidebar-userCount">
- {v.children?.length}/
- {
- v.children?.map(
- (v) => v.status === AccountStatus.USABLE,
- ).length
- }
+ {totalCount}/{onlineCount}
</span>
{/* 根据proxyIp判断显示IP信息 */}
{!v.proxyIp || v.proxyIp === "" ? (
// 本地IP显示
<div className="accountSidebar-ipInfo">
+ <span className="accountSidebar-ipType" data-type="direct">{t("ipType.direct")}</span>
{ipLocationLoading ? (
<span className="accountSidebar-ipLoading">
{t("ipInfo.loading")}
@@ -469,6 +734,7 @@ const AccountSidebar = memo(
v.ip &&
v.location && (
<div className="accountSidebar-ipInfo">
+ <span className="accountSidebar-ipType" data-type="proxy">{t("ipType.proxy")}</span>
<Tooltip
title={`IP: ${v.ip}\n位置: ${v.location}`}
>
@@ -479,46 +745,122 @@ const AccountSidebar = memo(
</div>
)
)}
+ {/* 分组排序按钮 */}
+ <div className="accountSidebar-groupSort">
+ <Tooltip title="上移">
+ <Button
+ type="text"
+ size="small"
+ icon={<UpOutlined />}
+ onClick={(e) => {
+ e.stopPropagation();
+ handleGroupSort(v.id, 'up');
+ }}
+ />
+ </Tooltip>
+ <Tooltip title="下移">
+ <Button
+ type="text"
+ size="small"
+ icon={<DownOutlined />}
+ onClick={(e) => {
+ e.stopPropagation();
+ handleGroupSort(v.id, 'down');
+ }}
+ />
+ </Tooltip>
+ </div>
</div>
</>
),
children: (
- <ul key={v.id} className="accountList">
- {v.children?.map((account) => {
+ <Droppable droppableId={v.id}>
+ {(provided) => (
+ <ul
+ key={v.id}
+ className="accountList"
+ {...provided.droppableProps}
+ ref={provided.innerRef}
+ >
+ {(() => {
+ // 获取该分组的账户列表
+ const groupAccounts = isInteractivePage ?
+ accountList.filter(account => account.groupId === v.id) :
+ v.children || [];
+
+ // 获取本地排序,如果没有则使用原始排序
+ const localSort = localAccountSort[v.id];
+ let sortedAccounts = groupAccounts.sort((a, b) => (a.rank || 0) - (b.rank || 0));
+
+ // 如果有本地排序,则按照本地排序重新排列
+ if (localSort && localSort.length > 0) {
+ const accountMap = new Map(sortedAccounts.map(account => [account.id, account]));
+ sortedAccounts = localSort
+ .map(id => accountMap.get(id))
+ .filter(Boolean) as typeof sortedAccounts;
+ }
+
+ return sortedAccounts.map((account, index) => {
if (excludePlatforms.includes(account.type))
return "";
const platInfo = AccountPlatInfoMap.get(
account.type,
)!;
+
+ // 检查是否为需要蒙层的平台(仅在interactive页面)
+ const isMobileOnlyPlatform = isInteractivePage && (account.type === PlatType.Douyin || account.type === PlatType.Xhs);
+
return (
- <li
- className={[
- "accountList-item",
- `${activeAccountId === account.id ? "accountList-item--active" : ""}`,
- // 失效状态
- account.status === AccountStatus.DISABLE &&
- "accountList-item--disable",
- ].join(" ")}
- key={account.id}
- onClick={async () => {
- if (
- account.status === AccountStatus.DISABLE
- ) {
- // TODO 账户登录
- // const res = await accountLogin(account.type);
- // if (!res) return;
- // message.success("账号登录成功!");
- // return;
- }
- onAccountChange(account);
- }}
- >
- <Avatar
- style={{backgroundColor: 'aliceblue'}}
- src={getOssUrl(account.avatar)}
- size="large"
- />
- <div className="accountList-item-right">
+ <Draggable key={account.id} draggableId={account.id} index={index}>
+ {(provided, snapshot) => (
+ <li
+ className={[
+ "accountList-item",
+ `${activeAccountId === account.id ? "accountList-item--active" : ""}`,
+ // 失效状态
+ account.status === AccountStatus.DISABLE &&
+ "accountList-item--disable",
+ // 移动端平台蒙层状态(仅在interactive页面)
+ isMobileOnlyPlatform && "accountList-item--mobile-only",
+ // 拖拽状态
+ snapshot.isDragging && "accountList-item--dragging",
+ ].join(" ")}
+ ref={provided.innerRef}
+ {...provided.draggableProps}
+ >
+ {/* 拖拽手柄 */}
+ <div
+ className="accountList-item-dragHandle"
+ {...provided.dragHandleProps}
+ onClick={(e) => e.stopPropagation()}
+ >
+ <SixDotsIcon />
+ </div>
+ <Avatar
+ style={{backgroundColor: 'aliceblue'}}
+ src={getOssUrl(account.avatar)}
+ size="large"
+ />
+ <div
+ className="accountList-item-right"
+ onClick={async () => {
+ // 如果是移动端平台,显示下载提示
+ if (isMobileOnlyPlatform) {
+ setMobileOnlyPlatform(account.type === PlatType.Douyin ? "抖音" : "小红书");
+ setShowAppDownloadModal(true);
+ return;
+ }
+
+ if (
+ account.status === AccountStatus.DISABLE
+ ) {
+ // 掉线账户直接触发重新授权
+ await handleOfflineAccountClick(account);
+ return;
+ }
+ onAccountChange(account);
+ }}
+ >
<div
className="accountList-item-right-name"
title={account.nickname}
@@ -548,14 +890,30 @@ const AccountSidebar = memo(
</Popover>
</div>
</div>
+
+ {/* 移动端平台蒙层(仅在interactive页面) */}
+ {isMobileOnlyPlatform && (
+ <div className="accountList-item-overlay">
+ <div className="accountList-item-overlay-text">
+ {t('mobileOnlySupport' as any)}
+ </div>
+ </div>
+ )}
</li>
+ )}
+ </Draggable>
);
- })}
- </ul>
+ });
+ })()}
+ {provided.placeholder}
+ </ul>
+ )}
+ </Droppable>
),
};
})}
/>
+ </DragDropContext>
</div>
)}
@@ -590,9 +948,58 @@ const AccountSidebar = memo(
onDeleteSuccess={async () => {
await getAccountList();
setDeleteTarget(null);
- message.success("删除成功");
+ message.success(t("messages.deleteSuccess" as any));
}}
/>
+
+ {/* Facebook页面选择弹窗 */}
+ <FacebookPagesModal
+ open={showFacebookPagesModal}
+ onClose={() => setShowFacebookPagesModal(false)}
+ onSuccess={handleFacebookPagesSuccess}
+ />
+
+ {/* App下载提示弹窗(仅在interactive页面显示) */}
+ {isInteractivePage && (
+ <DownloadAppModal
+ visible={showAppDownloadModal}
+ onClose={() => setShowAppDownloadModal(false)}
+ platform={mobileOnlyPlatform}
+ zIndex={1000}
+ />
+ )}
+
+ {/* 掉线账号重新登录确认弹窗 */}
+ <Modal
+ open={showReauthConfirm}
+ title={t("reauthConfirm.title" as any)}
+ onCancel={() => {
+ setShowReauthConfirm(false);
+ setReauthAccount(null);
+ }}
+ footer={
+ <Button
+ type="primary"
+ onClick={handleConfirmReauth}
+ >
+ {t("reauthConfirm.loginAgain" as any)}
+ </Button>
+ }
+ >
+ <div className={styles.reauthConfirm}>
+ {reauthAccount && (
+ <div>
+ <p style={{ marginBottom: '16px' }}>
+ {t("reauthConfirm.content" as any, {
+ platformName: AccountPlatInfoMap.get(reauthAccount.type)?.name || reauthAccount.type,
+ nickname: reauthAccount.nickname,
+ spaceName: accountGroupList.find(group => group.id === reauthAccount.groupId)?.name || t("defaultSpace")
+ })}
+ </p>
+ </div>
+ )}
+ </div>
+ </Modal>
</div>
</>
);
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx
index 229718cc..df9afe35 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx
@@ -4,6 +4,7 @@ import { Button, Modal } from "antd";
import { deleteAccountsApi } from "@/api/account";
import AvatarPlat from "@/components/AvatarPlat";
import { SocialAccount } from "@/api/types/account.type";
+import { useTransClient } from "@/app/i18n/client";
export interface IDeleteUserConfirmModalRef {}
@@ -26,17 +27,19 @@ const DeleteUserConfirmModal = memo(
ref: ForwardedRef<IDeleteUserConfirmModalRef>,
) => {
const [deleteLoading, setDeleteLoading] = useState(false);
+ const { t } = useTransClient("account");
return (
<Modal
open={open}
- title="删除提示"
+ title={t("deleteConfirm.title" as any)}
width={500}
zIndex={1002}
+ onCancel={() => onClose()}
rootClassName={styles.userManageDeleteHitModal}
footer={
<>
- <Button onClick={() => onClose()}>取消</Button>
+ <Button onClick={() => onClose()}>{t("deleteConfirm.cancel" as any)}</Button>
<Button
type="primary"
loading={deleteLoading}
@@ -51,17 +54,13 @@ const DeleteUserConfirmModal = memo(
onClose();
}}
>
- 确认
+ {t("deleteConfirm.confirm" as any)}
</Button>
</>
}
>
<p>
- 是否删除以下
- <span style={{ color: "var(--errerColor)" }}>
- {deleteUsers.length}
- </span>
- 个账号?
+ {t("deleteConfirm.content" as any, { count: deleteUsers.length } as any)}
</p>
<div className={styles["userManageDeleteHitModal-users"]}>
{deleteUsers.map((v) => {
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx
index 904e9a94..21b1c2a4 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AccountSidebar/UserManageModal.tsx
@@ -257,10 +257,6 @@ const UserManageModal = memo(
const [cutLoading, setCutLoading] = useState(false);
const [isAddAccountOpen, setIsAddAccountOpen] = useState(false);
const [targetGroupIdForModal, setTargetGroupIdForModal] = useState<string | undefined>(undefined);
- const preAccountIds = useRef<Set<string>>(new Set());
- const pendingGroupIdRef = useRef<string | null>(null);
- const isAssigningRef = useRef(false);
- const snapshotReadyRef = useRef(false);
const columns = useMemo(() => {
const columns: TableProps<SocialAccount>["columns"] = [
@@ -417,46 +413,11 @@ const UserManageModal = memo(
setIsAddAccountOpen(true);
} else {
// 如果选择的是具体空间,直接使用该空间
- pendingGroupIdRef.current = currentGroupId;
setTargetGroupIdForModal(currentGroupId);
- if ((useAccountStore.getState().accountList || []).length === 0) {
- await getAccountList();
- }
- preAccountIds.current = new Set(
- (useAccountStore.getState().accountList || []).map((v) => v.id),
- );
- snapshotReadyRef.current = true;
setIsAddAccountOpen(true);
}
};
- useEffect(() => {
- const maybeAssign = async () => {
- if (!pendingGroupIdRef.current) return;
- if (isAssigningRef.current) return;
- if (!snapshotReadyRef.current) return;
- const currList = accountList || [];
- const newAccounts = currList.filter((a) => !preAccountIds.current.has(a.id));
- if (newAccounts.length === 0) return;
- isAssigningRef.current = true;
- try {
- const targetGroupId = pendingGroupIdRef.current!;
- for (const acc of newAccounts) {
- try {
- await updateAccountApi({ id: acc.id, groupId: targetGroupId });
- } catch {}
- }
- await getAccountList();
- message.success(t("accountAddedToSpace" as any));
- } finally {
- pendingGroupIdRef.current = null;
- preAccountIds.current = new Set();
- isAssigningRef.current = false;
- snapshotReadyRef.current = false;
- }
- };
- maybeAssign();
- }, [accountList]);
return (
<>
@@ -557,15 +518,8 @@ const UserManageModal = memo(
setTargetGroupIdForModal(undefined);
}}
onAddSuccess={async (acc) => {
- try {
- if (pendingGroupIdRef.current) {
- await updateAccountApi({ id: acc.id, groupId: pendingGroupIdRef.current });
- message.success(t("accountAddedToSpace" as any));
- }
- } finally {
- pendingGroupIdRef.current = null;
- await getAccountList();
- }
+ // 账号已经在授权时直接添加到指定空间,无需额外移动
+ await getAccountList();
}}
targetGroupId={targetGroupIdForModal}
showSpaceSelector={activeGroup === allUser.current}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
index 1b05210d..49bbb1d3 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
@@ -19,7 +19,6 @@ import { useAccountStore } from "@/store/account";
import { useShallow } from "zustand/react/shallow";
import { getIpLocation, IpLocationInfo } from "@/utils/ipLocation";
import DownloadAppModal from "@/components/common/DownloadAppModal";
-import { updateAccountApi } from "@/api/account";
const { Text } = Typography;
@@ -220,23 +219,23 @@ const AddAccountModal = memo(
switch (key) {
case PlatType.KWAI:
- await kwaiSkip(key);
+ await kwaiSkip(key, selectedSpaceId);
break;
case PlatType.BILIBILI:
- await bilibiliSkip(key);
+ await bilibiliSkip(key, selectedSpaceId);
break;
case PlatType.YouTube:
- await youtubeSkip(key);
+ await youtubeSkip(key, selectedSpaceId);
break;
case PlatType.Twitter:
- await twitterSkip(key);
+ await twitterSkip(key, selectedSpaceId);
break;
case PlatType.Tiktok:
- await tiktokSkip(key);
+ await tiktokSkip(key, selectedSpaceId);
break;
case PlatType.Facebook:
try {
- await facebookSkip(key);
+ await facebookSkip(key, selectedSpaceId);
// Facebook授权成功后显示页面选择弹窗
handleFacebookAuthSuccess();
} catch (error) {
@@ -244,80 +243,31 @@ const AddAccountModal = memo(
}
break;
case PlatType.Instagram:
- await instagramSkip(key);
+ await instagramSkip(key, selectedSpaceId);
break;
case PlatType.Threads:
- await threadsSkip(key);
+ await threadsSkip(key, selectedSpaceId);
break;
case PlatType.WxGzh:
- await wxGzhSkip(key);
+ await wxGzhSkip(key, selectedSpaceId);
break;
case PlatType.Pinterest:
- await pinterestSkip(key);
+ await pinterestSkip(key, selectedSpaceId);
break;
case PlatType.LinkedIn:
- await linkedinSkip(key);
+ await linkedinSkip(key, selectedSpaceId);
break;
}
- // 如果指定了目标空间,等待授权完成后移动新账号
- if (selectedSpaceId) {
- // 检查选中的空间是否是默认空间
- const targetGroup = accountGroupList.find(group => group.id === selectedSpaceId);
- const isDefaultSpace = targetGroup?.isDefault;
-
- // console.log('移动空间调试信息:', {
- // selectedSpaceId,
- // targetGroupName: targetGroup?.name,
- // isDefaultSpace,
- // showSpaceSelector,
- // spaceSelectionRequired
- // });
-
- // 只有当选择了非默认空间时才移动账号
- if (!isDefaultSpace) {
- console.log('准备移动账号到空间:', targetGroup?.name);
- setTimeout(async () => {
- try {
- // 刷新账号列表
- await getAccountList();
-
- // 获取最新的账号组列表
- const currentState = useAccountStore.getState();
- const defaultGroup = currentState.accountGroupList.find(group => group.isDefault);
-
- if (defaultGroup) {
- // 找到相同平台类型的最后一个账号(最新添加的)
- const sameTypeAccounts = defaultGroup.children.filter(account => account.type === key);
- const latestAccount = sameTypeAccounts[sameTypeAccounts.length - 1];
-
- if (latestAccount) {
- console.log('找到最新账号:', latestAccount.account, '平台:', key);
-
- // 将新账号移动到指定空间
- console.log('移动账号:', latestAccount.account, '到空间:', targetGroup?.name);
- await updateAccountApi({
- id: latestAccount.id,
- groupId: selectedSpaceId
- });
- } else {
- console.log('未找到相同平台类型的账号');
- }
-
- // 再次刷新账号列表以更新UI
- await getAccountList();
- console.log('账号移动完成');
- }
- } catch (error) {
- console.error('移动账号到指定空间失败:', error);
- }
- }, 3000); // 等待3秒让授权完成
- } else {
- console.log('选择的是默认空间,无需移动账号');
+ // 授权完成后刷新账号列表
+ setTimeout(async () => {
+ try {
+ await getAccountList();
+ console.log('账号列表已刷新');
+ } catch (error) {
+ console.error('刷新账号列表失败:', error);
}
- } else {
- console.log('未选择空间,不移动账号');
- }
+ }, 2000); // 等待3秒让授权完成
};
return (
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/RecordCore.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/RecordCore.tsx
index 9d033e8c..7cae924b 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/RecordCore.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/RecordCore.tsx
@@ -164,6 +164,12 @@ const RecordCore = memo(
<div className="recordDetails-center-left-status">
<PubStatus status={publishRecord.status} />
</div>
+ <div
+ title={publishRecord.errorMsg}
+ className="recordDetails-center-left-failMsg"
+ >
+ {publishRecord.errorMsg}
+ </div>
</div>
<div className="recordDetails-center-right">
{publishRecord.videoUrl ? (
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss
index daa15d4f..0f7cb56a 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss
@@ -64,6 +64,11 @@
&-status {
margin-top: 15px;
}
+ &-failMsg {
+ margin-top: 5px;
+ font-size: var(--fs-xs);
+ color: var(--error-color);
+ }
}
&-right {
img {
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/QueueItem.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/QueueItem.tsx
new file mode 100644
index 00000000..5d632cbf
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/QueueItem.tsx
@@ -0,0 +1,223 @@
+import { memo } from "react";
+import { Button, Tag } from "antd";
+import {
+ CheckCircleOutlined,
+ ClockCircleOutlined,
+ CloseCircleOutlined,
+ LoadingOutlined,
+ SendOutlined,
+ MessageOutlined
+} from "@ant-design/icons";
+import { PublishRecordItem, PublishStatus } from "@/api/plat/types/publish.types";
+import { AccountPlatInfoMap } from "@/app/config/platConfig";
+import { useAccountStore } from "@/store/account";
+import { useShallow } from "zustand/react/shallow";
+import { getOssUrl } from "@/utils/oss";
+import { getDays } from "@/app/[lng]/accounts/components/CalendarTiming/calendarTiming.utils";
+import { useTransClient } from "@/app/i18n/client";
+import styles from "./queueItem.module.scss";
+
+interface QueueItemProps {
+ record: PublishRecordItem;
+ onRetry?: (record: PublishRecordItem) => void;
+ onEdit?: (record: PublishRecordItem) => void;
+ onMore?: (record: PublishRecordItem) => void;
+}
+
+const QueueItem = memo(({ record, onRetry, onEdit, onMore }: QueueItemProps) => {
+ const { t } = useTransClient("publish");
+ const { accountMap } = useAccountStore(
+ useShallow((state) => ({
+ accountMap: state.accountMap,
+ })),
+ );
+
+ const account = accountMap.get(record.accountId);
+ const platInfo = AccountPlatInfoMap.get(record.accountType);
+ const days = getDays(record.publishTime);
+
+ const getStatusInfo = () => {
+ switch (record.status) {
+ case PublishStatus.FAIL:
+ return {
+ color: "error",
+ text: t("status.publishFailed"),
+ icon: <CloseCircleOutlined />
+ };
+ case PublishStatus.PUB_LOADING:
+ return {
+ color: "cyan",
+ text: t("status.publishing"),
+ icon: <LoadingOutlined />
+ };
+ case PublishStatus.RELEASED:
+ return {
+ color: "success",
+ text: t("status.publishSuccess"),
+ icon: <CheckCircleOutlined />
+ };
+ case PublishStatus.UNPUBLISH:
+ return {
+ color: "processing",
+ text: t("status.waitingPublish"),
+ icon: <ClockCircleOutlined />
+ };
+ default:
+ return {
+ color: "default",
+ text: t("status.unknown"),
+ icon: null
+ };
+ }
+ };
+
+ const statusInfo = getStatusInfo();
+
+ return (
+ <div className={styles.queueItem}>
+ {/* 状态头部 */}
+ <div className={styles.statusHeader}>
+ <div className={styles.statusInfo}>
+
+ <div className={styles.dateTime}>
+ <span className={styles.date}>{days.format("MMM DD")}</span>
+ <span className={styles.time}>{days.format("h:mm A")}</span>
+ </div>
+ <span className={styles.statusText}>{statusInfo.text}</span>
+ </div>
+ {/* <div className={styles.statusBadge}>
+ <Tag color={statusInfo.color} icon={statusInfo.icon}>
+ {statusInfo.text}
+ </Tag>
+ </div> */}
+ <div className={styles.commentIcon}>
+ {/* <MessageOutlined /> */}
+ </div>
+ </div>
+
+ {/* 错误信息横幅 */}
+ {record.status === PublishStatus.FAIL && record.errorMsg && (
+ <div className={styles.errorBanner}>
+ <div className={styles.errorIcon}>
+ <CloseCircleOutlined />
+ </div>
+ <div className={styles.errorMessage}>
+ {record.errorMsg}
+ </div>
+ </div>
+ )}
+
+ {/* 主要内容区域 */}
+ <div className={styles.contentArea}>
+
+ <div style={{display: 'flex', flexDirection: 'row', justifyContent: 'space-between', gap: '12px'}}>
+
+ {/* 账户信息 */}
+
+ <div style={{display: 'flex', flexDirection: 'column', gap: '12px'}}>
+
+ <div className={styles.accountInfo}>
+ <div className={styles.avatarContainer}>
+ <img
+ src={getOssUrl(account?.avatar || "")}
+ alt="avatar"
+ className={styles.avatar}
+ />
+ <div className={styles.platformIcon}>
+ <img
+ src={platInfo?.icon}
+ alt="platform"
+ className={styles.platIcon}
+ />
+ </div>
+ </div>
+ <div className={styles.accountDetails}>
+ <div className={styles.accountName}>{account?.nickname}</div>
+ <div className={styles.accountHandle}>@{account?.account}</div>
+ </div>
+
+ </div>
+
+ <div className={styles.postText}>{record.desc}</div>
+ </div>
+
+
+ {/* 发布内容 */}
+ <div className={styles.postContent}>
+
+
+ {/* 媒体内容 */}
+ {(record.coverUrl || record.imgUrlList?.length > 0) && (
+ <div className={styles.mediaContainer}>
+ {record.videoUrl ? (
+ <div className={styles.videoThumbnail}>
+ <img
+ src={getOssUrl(record.coverUrl || "")}
+ alt="video thumbnail"
+ className={styles.mediaImage}
+ />
+ <div className={styles.playButton}>
+ <div className={styles.playIcon}>▶</div>
+ </div>
+ </div>
+ ) : (
+ <div className={styles.imageContainer}>
+ <img
+ src={getOssUrl(record.coverUrl || record.imgUrlList?.[0] || "")}
+ alt="post image"
+ className={styles.mediaImage}
+ />
+ </div>
+ )}
+ </div>
+ )}
+
+ </div>
+
+ </div>
+
+
+
+ </div>
+
+ {/* 底部信息 */}
+ <div className={styles.footer}>
+ <div className={styles.creationInfo}>
+ {t("creationInfo", { date: days.format("YYYY-MM-DD") })}
+ </div>
+ <div className={styles.actionButtons}>
+ {record.status === PublishStatus.FAIL && (
+ <Button
+ type="primary"
+ icon={<SendOutlined />}
+ onClick={() => onRetry?.(record)}
+ className={styles.retryButton}
+ >
+ {t("buttons.publishNow")}
+ </Button>
+ )}
+ {record.workLink && (
+ <Button
+ icon={<SendOutlined />}
+ onClick={async () => {
+ try {
+ await navigator.clipboard.writeText(record.workLink);
+ // 可以添加一个提示消息
+ } catch (err) {
+ console.error('复制链接失败:', err);
+ }
+ }}
+ className={styles.copyButton}
+ >
+ {t("buttons.copyLink")}
+ </Button>
+ )}
+ </div>
+ </div>
+ </div>
+ );
+});
+
+QueueItem.displayName = "QueueItem";
+
+export default QueueItem;
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx
index c8c5b510..04c525ed 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/SentList.tsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { List, Card, Avatar, Typography, Space, Tag, Button, Skeleton, Empty } from 'antd';
-import { EyeOutlined, LikeOutlined, MessageOutlined, ShareAltOutlined, HeartOutlined } from '@ant-design/icons';
+import { EyeOutlined, LikeOutlined, MessageOutlined, ShareAltOutlined, HeartOutlined, BarChartOutlined, AimOutlined, EyeInvisibleOutlined } from '@ant-design/icons';
import { useTransClient } from '@/app/i18n/client';
import { getSentPosts } from '@/api/sent';
import { SentPost } from '@/api/types/sent.types';
@@ -162,31 +162,41 @@ const SentList: React.FC<SentListProps> = ({ platform, uid, onDataChange, accoun
<div className={styles.engagementMetrics}>
<div className={styles.metricsRow}>
<div className={styles.metricItem}>
- <div className={styles.metricIcon}>👍</div>
+ <div className={styles.metricIcon}><LikeOutlined /></div>
<div className={styles.metricLabel}>Likes</div>
<div className={styles.metricValue}>{post.likeCount}</div>
</div>
<div className={styles.metricItem}>
- <div className={styles.metricIcon}>🔄</div>
+ <div className={styles.metricIcon}><ShareAltOutlined /></div>
<div className={styles.metricLabel}>Shares</div>
<div className={styles.metricValue}>{post.shareCount}</div>
</div>
<div className={styles.metricItem}>
- <div className={styles.metricIcon}>👁️</div>
+ <div className={styles.metricIcon}><EyeOutlined /></div>
<div className={styles.metricLabel}>Views</div>
<div className={styles.metricValue}>{post.viewCount }</div>
</div>
<div className={styles.metricItem}>
- <div className={styles.metricIcon}>💬</div>
+ <div className={styles.metricIcon}><MessageOutlined /></div>
<div className={styles.metricLabel}>Comments</div>
<div className={styles.metricValue}>{post.commentCount }</div>
</div>
<div className={styles.metricItem}>
- <div className={styles.metricIcon}>❤️</div>
+ <div className={styles.metricIcon}><HeartOutlined /></div>
<div className={styles.metricLabel}>Favorites</div>
<div className={styles.metricValue}>{post.favoriteCount}</div>
</div>
- <div className={styles.chartIcon}>📊</div>
+ <div className={styles.metricItem}>
+ <div className={styles.metricIcon}><AimOutlined /></div>
+ <div className={styles.metricLabel}>Click</div>
+ <div className={styles.metricValue}>{post.clickCount || 0}</div>
+ </div>
+ <div className={styles.metricItem}>
+ <div className={styles.metricIcon}><EyeInvisibleOutlined /></div>
+ <div className={styles.metricLabel}>Impression</div>
+ <div className={styles.metricValue}>{post.impressionCount || 0}</div>
+ </div>
+ <div className={styles.chartIcon}><BarChartOutlined /></div>
</div>
</div>
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx
index ab823632..dca8f539 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/index.tsx
@@ -11,6 +11,7 @@ import CalendarRecord from "@/app/[lng]/accounts/components/CalendarTiming/Calen
import { HTML5Backend } from "react-dnd-html5-backend";
import { DndProvider } from "react-dnd";
import SentList from "./SentList";
+import QueueItem from "./QueueItem";
import { useAccountStore } from "@/store/account";
export interface IListModeRef {}
@@ -47,27 +48,27 @@ const ListMode = memo(
);
useEffect(() => {
- getPubRecord();
+ getPubRecord(0);
}, [getPubRecord]);
const renderRecordItem = (record: PublishRecordItem) => {
- const days = getDays(record.publishTime);
-
return (
- <List.Item
+ <QueueItem
key={record.id}
- className={styles.listItem}
- actions={[
- <div key="time" className={styles.timeInfo}>
- <span className={styles.date}>{days.format("MM-DD")}</span>
- <span className={styles.time}>{days.format("HH:mm")}</span>
- </div>
- ]}
- >
- <div className={styles.recordWrapper}>
- <CalendarRecord publishRecord={record} />
- </div>
- </List.Item>
+ record={record}
+ onRetry={(record) => {
+ // TODO: 实现重试逻辑
+ console.log('Retry record:', record);
+ }}
+ onEdit={(record) => {
+ // TODO: 实现编辑逻辑
+ console.log('Edit record:', record);
+ }}
+ onMore={(record) => {
+ // TODO: 实现更多操作逻辑
+ console.log('More actions for record:', record);
+ }}
+ />
);
};
@@ -94,11 +95,9 @@ const ListMode = memo(
<div className={styles.tabContent}>
<DndProvider backend={HTML5Backend}>
{sortedRecords.length > 0 ? (
- <List
- dataSource={sortedRecords}
- renderItem={renderRecordItem}
- className={styles.recordList}
- />
+ <div className={styles.queueList}>
+ {sortedRecords.map(renderRecordItem)}
+ </div>
) : (
<Empty
description={t('listMode.noRecords' as any)}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/listMode.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/listMode.module.scss
index b7c85e42..e3421ba6 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/listMode.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/listMode.module.scss
@@ -138,6 +138,13 @@
padding: 0 5px 0 0;
}
+ .queueList {
+ height: 100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 0;
+ }
+
.listContent {
height: 100%;
padding: 0 5px 0 0;
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/queueItem.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/queueItem.module.scss
new file mode 100644
index 00000000..a0eebac1
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/ListMode/queueItem.module.scss
@@ -0,0 +1,370 @@
+.queueItem {
+ background: white;
+ border-radius: 12px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
+ border: 1px solid #f0f0f0;
+ overflow: hidden;
+ transition: all 0.3s ease;
+ margin-bottom: 16px;
+
+ &:hover {
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
+ transform: translateY(-2px);
+ }
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+}
+
+.statusHeader {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+ padding: 16px 20px 12px 20px;
+ border-bottom: 1px solid #f5f5f5;
+
+ .statusInfo {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+
+ .statusText {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ }
+
+ .dateTime {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+
+ .date {
+ font-size: 14px;
+ color: #666;
+ font-weight: 500;
+ }
+
+ .time {
+ font-size: 14px;
+ color: #666;
+ font-weight: 500;
+ }
+ }
+ }
+
+ .statusBadge {
+ flex-shrink: 0;
+ }
+
+ .commentIcon {
+ font-size: 16px;
+ color: #999;
+ cursor: pointer;
+ padding: 4px;
+ border-radius: 4px;
+ transition: all 0.2s ease;
+
+ &:hover {
+ background: #f5f5f5;
+ color: #666;
+ }
+ }
+}
+
+.errorBanner {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ padding: 12px 20px;
+ background: #fff2f0;
+ border-bottom: 1px solid #ffccc7;
+
+ .errorIcon {
+ color: #ff4d4f;
+ font-size: 16px;
+ flex-shrink: 0;
+ }
+
+ .errorMessage {
+ color: #ff4d4f;
+ font-size: 14px;
+ line-height: 1.4;
+ flex: 1;
+ }
+}
+
+.contentArea {
+ padding: 20px;
+
+ .accountInfo {
+ display: flex;
+ align-items: flex-start;
+ gap: 12px;
+ margin-bottom: 16px;
+
+ .avatarContainer {
+ position: relative;
+ flex-shrink: 0;
+
+ .avatar {
+ width: 48px;
+ height: 48px;
+ border-radius: 50%;
+ object-fit: cover;
+ border: 2px solid #f0f0f0;
+ }
+
+ .platformIcon {
+ position: absolute;
+ bottom: -2px;
+ right: -2px;
+ width: 20px;
+ height: 20px;
+ background: white;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 2px solid white;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+
+ .platIcon {
+ width: 12px;
+ height: 12px;
+ object-fit: contain;
+ }
+ }
+ }
+
+ .accountDetails {
+ flex: 1;
+ min-width: 0;
+
+ .accountName {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333;
+ margin-bottom: 4px;
+ line-height: 1.3;
+ }
+
+ .accountHandle {
+ font-size: 14px;
+ color: #666;
+ line-height: 1.4;
+ }
+ }
+ }
+
+ .postContent {
+ position: relative;
+
+ .postText {
+ font-size: 16px;
+ color: #333;
+ line-height: 1.5;
+ margin-bottom: 16px;
+ word-wrap: break-word;
+ }
+
+ .mediaContainer {
+ margin-bottom: 16px;
+
+ .videoThumbnail {
+ position: relative;
+ border-radius: 8px;
+ overflow: hidden;
+ background: #f5f5f5;
+ max-width: 300px;
+
+ .mediaImage {
+ width: 100%;
+ height: auto;
+ display: block;
+ border-radius: 8px;
+ }
+
+ .playButton {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 48px;
+ height: 48px;
+ background: rgba(0, 0, 0, 0.7);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ transition: all 0.2s ease;
+
+ &:hover {
+ background: rgba(0, 0, 0, 0.8);
+ transform: translate(-50%, -50%) scale(1.1);
+ }
+
+ .playIcon {
+ color: white;
+ font-size: 16px;
+ margin-left: 2px;
+ }
+ }
+ }
+
+ .imageContainer {
+ border-radius: 8px;
+ overflow: hidden;
+ background: #f5f5f5;
+ max-width: 300px;
+
+ .mediaImage {
+ width: 100%;
+ height: auto;
+ display: block;
+ border-radius: 8px;
+ }
+ }
+ }
+
+ .shareIcon {
+ position: absolute;
+ top: 0;
+ right: 0;
+ font-size: 16px;
+ color: #999;
+ cursor: pointer;
+ padding: 4px;
+ border-radius: 4px;
+ transition: all 0.2s ease;
+
+ &:hover {
+ background: #f5f5f5;
+ color: #666;
+ }
+
+ .shareSymbol {
+ font-size: 14px;
+ font-weight: bold;
+ }
+ }
+ }
+}
+
+.footer {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16px 20px;
+ border-top: 1px solid #f0f0f0;
+ background: #fafafa;
+
+ .creationInfo {
+ font-size: 14px;
+ color: #999;
+ }
+
+ .actionButtons {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+
+ .retryButton {
+ font-size: 14px;
+ height: 32px;
+ border-radius: 6px;
+ font-weight: 500;
+ }
+
+ .copyButton {
+ font-size: 14px;
+ height: 32px;
+ border-radius: 6px;
+ font-weight: 500;
+ border: 1px solid #d9d9d9;
+ background: white;
+ transition: all 0.2s ease;
+
+ &:hover {
+ border-color: #1890ff;
+ background: #f6ffed;
+ }
+ }
+ }
+}
+
+// 响应式设计
+@media (max-width: 768px) {
+ .queueItem {
+ margin-bottom: 12px;
+ }
+
+ .statusHeader {
+ padding: 12px 16px 8px 16px;
+ }
+
+ .contentArea {
+ padding: 16px;
+
+ .accountInfo {
+ margin-bottom: 12px;
+
+ .avatarContainer {
+ .avatar {
+ width: 40px;
+ height: 40px;
+ }
+
+ .platformIcon {
+ width: 18px;
+ height: 18px;
+
+ .platIcon {
+ width: 10px;
+ height: 10px;
+ }
+ }
+ }
+
+ .accountDetails {
+ .accountName {
+ font-size: 15px;
+ }
+
+ .accountHandle {
+ font-size: 13px;
+ }
+ }
+ }
+
+ .postContent {
+ .postText {
+ font-size: 15px;
+ margin-bottom: 12px;
+ }
+
+ .mediaContainer {
+ margin-bottom: 12px;
+ max-width: 250px;
+ }
+ }
+ }
+
+ .footer {
+ padding: 12px 16px;
+ flex-direction: column;
+ gap: 12px;
+ align-items: flex-start;
+
+ .creationInfo {
+ font-size: 13px;
+ }
+
+ .actionButtons {
+ width: 100%;
+ justify-content: flex-end;
+ }
+ }
+}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx
index c7f1ae50..2aa04cf4 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx
@@ -37,6 +37,8 @@ import { useCalendarTiming } from "@/app/[lng]/accounts/components/CalendarTimin
import AvatarPlat from "@/components/AvatarPlat";
import AllPlatIcon from "@/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon";
import ListMode from "@/app/[lng]/accounts/components/CalendarTiming/ListMode";
+import { usePublishDialog } from "@/components/PublishDialog/usePublishDialog";
+import dayjs from "dayjs";
export interface ICalendarTimingRef {}
export interface ICalendarTimingProps {}
@@ -236,6 +238,11 @@ const CalendarTiming = memo(
icon={<PlusOutlined />}
onClick={() => {
setPublishDialogOpen(true);
+ usePublishDialog
+ .getState()
+ .setPubTime(
+ dayjs(Date.now()).format("YYYY-MM-DD HH:mm:ss"),
+ );
}}
>
{t("newWork")}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/useCalendarTiming.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/useCalendarTiming.ts
index 8b20abd0..5555fabf 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/useCalendarTiming.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/useCalendarTiming.ts
@@ -50,7 +50,7 @@ export const useCalendarTiming = create(
},
// 获取发布记录数据
- async getPubRecord() {
+ async getPubRecord(status?: number) {
try {
methods.setListLoading(true);
const date = getDays(get().calendarRef?.getApi().getDate() || new Date());
@@ -60,6 +60,7 @@ export const useCalendarTiming = create(
const res = await getPublishList({
time: [startOfMonth.utc().format(), endOfMonth.utc().format()],
accountType: useAccountStore.getState().accountActive?.type,
+ status: status,
});
methods.setListLoading(false);
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/BilibiliLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/BilibiliLogin.ts
index 2e8562e1..7727dca2 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/BilibiliLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/BilibiliLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* b站被点击
* @param platType
*/
-export async function bilibiliSkip(platType: PlatType) {
+export async function bilibiliSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.BILIBILI) return;
- const res: any = await apiGetBilibiliLoginUrl('pc');
+ const res: any = await apiGetBilibiliLoginUrl('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/FacebookLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/FacebookLogin.ts
index 586eeeb1..7cd6f037 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/FacebookLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/FacebookLogin.ts
@@ -11,10 +11,10 @@ import { useUserStore } from "@/store/user";
* Facebook被点击
* @param platType
*/
-export async function facebookSkip(platType: PlatType) {
+export async function facebookSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.Facebook) return;
- const res: any = await getFacebookAuthUrlApi('pc');
+ const res: any = await getFacebookAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/InstagramLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/InstagramLogin.ts
index 31f3800d..c230a450 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/InstagramLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/InstagramLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* b站被点击
* @param platType
*/
-export async function instagramSkip(platType: PlatType) {
+export async function instagramSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.Instagram) return;
- const res: any = await getInstagramAuthUrlApi('pc');
+ const res: any = await getInstagramAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.ts
index 7fdda97b..479917a2 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/LinkedinLogin.ts
@@ -7,10 +7,10 @@ import { useAccountStore } from "@/store/account";
* LinkedIn 被点击
* @param platType 平台类型
*/
-export async function linkedinSkip(platType: PlatType) {
+export async function linkedinSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.LinkedIn) return;
- const res: any = await getLinkedInAuthUrlApi('pc');
+ const res: any = await getLinkedInAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return;
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/PinterestLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/PinterestLogin.ts
index e1ecfcf1..21b5e110 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/PinterestLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/PinterestLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* Pinterest被点击
* @param platType
*/
-export async function pinterestSkip(platType: PlatType) {
+export async function pinterestSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.Pinterest) return;
- const res: any = await getPinterestAuthUrlApi('pc');
+ const res: any = await getPinterestAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/ThreadsLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/ThreadsLogin.ts
index 80b7d6a9..07ee17b4 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/ThreadsLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/ThreadsLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* b站被点击
* @param platType
*/
-export async function threadsSkip(platType: PlatType) {
+export async function threadsSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.Threads) return;
- const res: any = await getThreadsAuthUrlApi('pc');
+ const res: any = await getThreadsAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TiktokLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TiktokLogin.ts
index 6ec3bb55..dbab29fa 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TiktokLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TiktokLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* Tiktok被点击
* @param platType
*/
-export async function tiktokSkip(platType: PlatType) {
+export async function tiktokSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.Tiktok) return;
- const res: any = await getTiktokAuthUrlApi('pc');
+ const res: any = await getTiktokAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TwtterLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TwtterLogin.ts
index e9b27452..c0b72fe8 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TwtterLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/TwtterLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* b站被点击
* @param platType
*/
-export async function twitterSkip(platType: PlatType) {
+export async function twitterSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.Twitter) return;
- const res: any = await getTwitterAuthUrlApi('pc');
+ const res: any = await getTwitterAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/WxGzh.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/WxGzh.ts
index 8b8554bf..12ce90e9 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/WxGzh.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/WxGzh.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* 微信被点击
* @param platType
*/
-export async function wxGzhSkip(platType: PlatType) {
+export async function wxGzhSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.WxGzh) return;
- const res: any = await getWxGzhAuthUrlApi('pc');
+ const res: any = await getWxGzhAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/YoutubeLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/YoutubeLogin.ts
index 0fee7a9a..a3fc113a 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/YoutubeLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/YoutubeLogin.ts
@@ -9,10 +9,10 @@ import { useUserStore } from "@/store/user";
* b站被点击
* @param platType
*/
-export async function youtubeSkip(platType: PlatType) {
+export async function youtubeSkip(platType: PlatType, spaceId?: string) {
if (platType !== PlatType.YouTube) return;
- const res: any = await getYouTubeAuthUrlApi('pc');
+ const res: any = await getYouTubeAuthUrlApi('pc', spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/kwaiLogin.ts b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/kwaiLogin.ts
index bd6f3b4e..6e871b30 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/kwaiLogin.ts
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/accounts/plat/kwaiLogin.ts
@@ -4,8 +4,8 @@ import { sleep } from "@/utils";
import { useAccountStore } from "@/store/account";
import { useUserStore } from "@/store/user";
-export async function kwaiSkip(platType: PlatType) {
- const res = await createKwaiAuth("pc");
+export async function kwaiSkip(platType: PlatType, spaceId?: string) {
+ const res = await createKwaiAuth("pc", spaceId);
if (res?.code == 1) {
useUserStore.getState().logout();
return
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/interactive/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/interactive/page.tsx
index a5d17835..065a3adf 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/interactive/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/interactive/page.tsx
@@ -22,7 +22,6 @@ export default function InteractivePage() {
const { lng } = useParams();
const { userInfo, token } = useUserStore();
const { t } = useTransClient('interactive' as any);
- const tt = t as any;
// 账户侧边栏相关
const { accountInit, accountActive, setAccountActive } = useAccountStore(
@@ -119,7 +118,7 @@ export default function InteractivePage() {
}
// 如果已有 platform 则不覆盖用户手动选择
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [accountActive?.account]);
+ }, [accountActive?.id]);
const PostCard = ({ item }: { item: EngagementPostItem }) => {
return (
@@ -128,7 +127,7 @@ export default function InteractivePage() {
{item.thumbnail ? (
<img src={item.thumbnail} alt={item.title} />
) : (
- <div className={styles.thumbPlaceholder}>No Image</div>
+ <div className={styles.thumbPlaceholder}>{t('ui.noImage')}</div>
)}
{/* {item.mediaType === 'video' && (
<span className={styles.playIcon}>
@@ -136,7 +135,7 @@ export default function InteractivePage() {
</span>
)} */}
<span className={styles.mediaType}>
- <Tag color={item.mediaType==='video'?'blue':item.mediaType==='image'?'green':'purple'}>{item.mediaType}</Tag>
+ <Tag color={item.mediaType==='video'?'blue':item.mediaType==='image'?'green':'purple'}>{t(`mediaTypes.${item.mediaType}` as any)}</Tag>
</span>
</a>
<div className={styles.postMeta}>
@@ -172,11 +171,11 @@ export default function InteractivePage() {
};
const loadCommentsV2 = async (postId: string, before?: string, after?: string) => {
- if (!accountActive?.account || !platform) return;
+ if (!accountActive?.id || !platform) return;
setCommentLoading(true);
try {
const res = await apiGetPostComments({
- accountId: accountActive.account,
+ accountId: accountActive.id,
platform: platform as any,
postId,
pagination: { before, after, limit: 20 }
@@ -193,13 +192,13 @@ export default function InteractivePage() {
};
const expandReplies = async (commentId: string) => {
- if (!accountActive?.account || !platform) return;
+ if (!accountActive?.id || !platform) return;
setRepliesByComment((prev) => ({
...prev,
[commentId]: { ...(prev[commentId] || { list: [], cursor: {}, expanded: true }), loading: true, expanded: true },
}));
const res = await apiGetCommentReplies({
- accountId: accountActive.account,
+ accountId: accountActive.id,
platform: platform as any,
commentId,
pagination: { limit: 20 },
@@ -224,10 +223,10 @@ export default function InteractivePage() {
const loadMoreReplies = async (commentId: string) => {
const state = repliesByComment[commentId];
- if (!state?.cursor?.after || !accountActive?.account || !platform) return;
+ if (!state?.cursor?.after || !accountActive?.id || !platform) return;
setRepliesByComment((prev) => ({ ...prev, [commentId]: { ...(prev[commentId] as any), loading: true } }));
const res = await apiGetCommentReplies({
- accountId: accountActive.account,
+ accountId: accountActive.id,
platform: platform as any,
commentId,
pagination: { after: state.cursor.after, limit: 20 },
@@ -247,18 +246,18 @@ export default function InteractivePage() {
* 提交帖子评论
*/
const submitPostComment = async () => {
- if (!commentPost || !replyText.trim() || !accountActive?.account || !platform || sending) return;
+ if (!commentPost || !replyText.trim() || !accountActive?.id || !platform || sending) return;
setSending(true);
try {
- const res = await apiPublishPostComment({ accountId: accountActive.account, platform: platform as any, postId: commentPost.postId, message: replyText.trim() });
+ const res = await apiPublishPostComment({ accountId: accountActive.id, platform: platform as any, postId: commentPost.postId, message: replyText.trim() });
if (res) {
setReplyText('');
setReplyTarget(null);
await loadCommentsV2(commentPost.postId);
- message.success('已评论');
+ message.success(t('messages.commentSuccess'));
}
} catch (error) {
- message.error('评论失败,请重试');
+ message.error(t('messages.commentFailed'));
} finally {
setSending(false);
}
@@ -268,18 +267,18 @@ export default function InteractivePage() {
* 提交评论回复
*/
const submitReply = async (parentId?: string) => {
- if (!commentPost || !replyText.trim() || !accountActive?.account || !platform || sending) return;
+ if (!commentPost || !replyText.trim() || !accountActive?.id || !platform || sending) return;
setSending(true);
try {
- const res = await apiPublishCommentReply({ accountId: accountActive.account, platform: platform as any, commentId: parentId || '', message: replyText.trim() });
+ const res = await apiPublishCommentReply({ accountId: accountActive.id, platform: platform as any, commentId: parentId || '', message: replyText.trim() });
if (res) {
setReplyText('');
setReplyTarget(null);
await loadCommentsV2(commentPost.postId);
- message.success('已回复');
+ message.success(t('messages.replySuccess'));
}
} catch (error) {
- message.error('回复失败,请重试');
+ message.error(t('messages.replyFailed'));
} finally {
setSending(false);
}
@@ -291,7 +290,7 @@ export default function InteractivePage() {
useEffect(() => {
if (!token) {
- message.error(tt('messages.pleaseLoginFirst'));
+ message.error(t('messages.pleaseLoginFirst'));
router.push('/login');
return;
}
@@ -320,14 +319,15 @@ export default function InteractivePage() {
{/* 左侧账户选择栏 */}
<div >
<AccountSidebar
- activeAccountId={accountActive?.account || ''}
+ activeAccountId={accountActive?.id || ''}
onAccountChange={(account) => {
- if (account.id === accountActive?.account) {
+ if (account.id === accountActive?.id) {
setAccountActive(undefined);
} else {
setAccountActive(account);
}
}}
+ isInteractivePage={true}
/>
</div>
@@ -342,8 +342,8 @@ export default function InteractivePage() {
}}>
<CommentOutlined style={{ fontSize: 36, color: '#9ca3af' }} />
</div>
- <div style={{ fontSize: 18, fontWeight: 600, color: '#111827', marginBottom: 8 }}>请在左侧选择需要互动的频道</div>
- <div style={{ color: '#6b7280' }}>选择一个账号后,将自动加载该频道的最新作品与评论互动功能。</div>
+ <div style={{ fontSize: 18, fontWeight: 600, color: '#111827', marginBottom: 8 }}>{t('ui.selectChannel')}</div>
+ <div style={{ color: '#6b7280' }}>{t('ui.selectChannelDesc')}</div>
</div>
</Card>
) : (
@@ -361,10 +361,10 @@ export default function InteractivePage() {
onClick={() => fetchEngagementPosts(pagination.current + 1, pagination.pageSize)}
disabled={loading}
>
- 加载更多
+ {t('ui.loadMore')}
</Button>
) : (
- <span style={{ color: '#999' }}>没有更多作品</span>
+ <span style={{ color: '#999' }}>{t('ui.noMorePosts')}</span>
)}
</div>
<div ref={loadMoreRef} style={{ height: 1 }} />
@@ -376,7 +376,7 @@ export default function InteractivePage() {
<Modal
open={commentVisible}
onCancel={() => setCommentVisible(false)}
- title={commentPost?.title || '评论'}
+ title={commentPost?.title || t('ui.reply')}
footer={null}
width={600}
>
@@ -393,9 +393,9 @@ export default function InteractivePage() {
style={{ alignItems: 'flex-start' }}
actions={[
canExpand && !expanded ? (
- <a key="expand" onClick={() => expandReplies(c.id)}>展开回复</a>
+ <a key="expand" onClick={() => expandReplies(c.id)}>{t('ui.expandReplies')}</a>
) : canExpand && expanded ? (
- <a key="collapse" onClick={() => collapseReplies(c.id)}>收起回复</a>
+ <a key="collapse" onClick={() => collapseReplies(c.id)}>{t('ui.collapseReplies')}</a>
) : null,
<a
key="reply"
@@ -405,7 +405,7 @@ export default function InteractivePage() {
setTimeout(() => replyInputRef.current?.focus?.(), 0);
}}
>
- 回复
+ {t('ui.reply')}
</a>,
].filter(Boolean)}
>
@@ -433,7 +433,7 @@ export default function InteractivePage() {
/>
<div style={{ display: 'flex', justifyContent: 'flex-start', paddingLeft: 40 }}>
<Button size="small" type="link" onClick={() => loadMoreReplies(c.id)} disabled={!replyState?.cursor?.after} loading={replyState?.loading}>
- 加载更多回复
+ {t('ui.loadMoreReplies')}
</Button>
</div>
</div>
@@ -447,7 +447,7 @@ export default function InteractivePage() {
style={{ textAlign: 'center', marginTop: 10, color: '#1677ff', cursor: 'pointer' }}
onClick={() => !commentLoading && loadCommentsV2(commentPost!.postId, undefined, commentsCursor?.after)}
>
- {commentLoading ? '加载中…' : '加载更多评论'}
+ {commentLoading ? t('ui.loading') : t('ui.loadMoreComments')}
</div>
)}
<div style={{ display: 'flex', gap: 8, marginTop: 12, paddingBottom: 20 }}>
@@ -456,7 +456,7 @@ export default function InteractivePage() {
value={replyText}
onChange={(e) => setReplyText(e.target.value)}
rows={1}
- placeholder={replyTarget ? `回复@${replyTarget.name}` : '输入评论...'}
+ placeholder={replyTarget ? t('ui.replyPlaceholder', { name: replyTarget.name }) : t('ui.commentPlaceholder')}
/>
<Button
type="primary"
@@ -465,7 +465,7 @@ export default function InteractivePage() {
onClick={() => (replyTarget ? submitReply(replyTarget.id) : submitPostComment())}
style={{ width: 88, minWidth: 88 }}
>
- {sending ? '发送中...' : '发送'}
+ {sending ? t('ui.sending') : t('ui.send')}
</Button>
</div>
</Modal>
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/layout.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/layout.tsx
index 9e58bcf4..5f7f81e5 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/layout.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/layout.tsx
@@ -1,7 +1,6 @@
import "@/app/var.css";
import "../globals.css";
import { Providers } from "../layout/Providers";
-import Head from "next/head";
import { dir } from "i18next";
import { languages, fallbackLng } from "@/app/i18n/settings";
import { useTranslation } from "@/app/i18n";
@@ -18,6 +17,7 @@ export async function generateMetadata({
return {
title: t("title"),
description: t("content"),
+ keywords: "aitoearn, AiToEarn, ai, earn, aitoearn.com",
};
}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/login/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/login/page.tsx
index 8a026421..17a30e9d 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/login/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/login/page.tsx
@@ -11,6 +11,7 @@ import {
loginWithMailApi,
getRegistUrlApi,
checkRegistStatusApi,
+ mailRegistApi,
googleLoginApi,
GoogleLoginParams
} from "@/api/apiReq";
@@ -62,45 +63,38 @@ export default function LoginPage() {
}
};
- const handleRegistSubmit = async (values: { password: string; inviteCode?: string }) => {
+ const handleRegistSubmit = async (values: { password: string; code: string; inviteCode?: string }) => {
try {
setIsActivating(true);
- message.info(t('activationEmailSent'));
- // 开始循环检查注册状态
- const timer = setInterval(async () => {
- try {
- const response = await checkRegistStatusApi({
- code: registCode,
- mail: email,
- password: values.password,
- inviteCode: values.inviteCode || ''
- });
-
- if (!response) return;
-
- if (response.code === 0 && response.data.token) {
- // 注册成功,清除定时器
- if (activationTimer) {
- clearInterval(activationTimer);
- }
- setIsActivating(false);
- setIsChecking(false);
- setIsModalOpen(false);
- form.resetFields(); // 重置表单
- setToken(response.data.token);
- if (response.data.userInfo) {
- setUserInfo(response.data.userInfo);
- }
- message.success(t('registerSuccess'));
- router.push('/accounts');
- }
- } catch (error) {
- console.error(t('checkStatusError'), error);
- }
- }, 2000); // 每2秒检查一次
+ const response = await mailRegistApi({
+ mail: email,
+ code: values.code,
+ password: values.password,
+ inviteCode: values.inviteCode || ''
+ });
- setActivationTimer(timer);
+ if (!response) {
+ message.error(t('registerError'));
+ setIsActivating(false);
+ return;
+ }
+
+ if (response.code === 0 && response.data.token) {
+ // 注册成功
+ setIsActivating(false);
+ setIsModalOpen(false);
+ form.resetFields(); // 重置表单
+ setToken(response.data.token);
+ if (response.data.userInfo) {
+ setUserInfo(response.data.userInfo);
+ }
+ message.success(t('registerSuccess'));
+ router.push('/accounts');
+ } else {
+ message.error(response.message || t('registerError'));
+ setIsActivating(false);
+ }
} catch (error) {
message.error(t('registerError'));
setIsActivating(false);
@@ -233,6 +227,17 @@ export default function LoginPage() {
onFinish={handleRegistSubmit}
layout="vertical"
>
+ <Form.Item
+ label={t('emailCode')}
+ name="code"
+ rules={[
+ { required: true, message: t('emailCodeRequired') },
+ { len: 6, message: t('emailCodeLength') }
+ ]}
+ >
+ <Input placeholder={t('enterEmailCode')} maxLength={6} />
+ </Form.Item>
+
<Form.Item
label={t('setPassword')}
name="password"
@@ -258,7 +263,7 @@ export default function LoginPage() {
block
loading={isActivating}
>
- {isActivating ? t('waitingForActivation') : t('completeRegistration')}
+ {isActivating ? t('registering') : t('completeRegistration')}
</Button>
</Form.Item>
</Form>
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/ai-generate.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/ai-generate.module.scss
index 3516034e..b822efe5 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/ai-generate.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/ai-generate.module.scss
@@ -5,6 +5,39 @@
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
+.chatSection {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+}
+
+.subTabLabel {
+ margin-top: 3px;
+}
+
+.chatContainer {
+ width: 100%;
+ height: calc(100vh - 120px);
+ min-height: 700px;
+
+ overflow: hidden;
+ position: relative;
+
+ iframe {
+ width: 100%;
+ height: 100%;
+ border: none;
+ border-radius: 8px;
+ }
+}
+
+.historySection {
+ padding: 24px 10px;
+ background-color: #fff;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
+}
+
.header {
display: flex;
justify-content: space-between;
@@ -201,7 +234,10 @@
// 新增:textToImage 左右分栏
.twoColumn { display: grid; grid-template-columns: 399px 1fr; gap: 16px; }
.leftPanel { display: flex; flex-direction: column; gap: 12px; }
-.rightPanel { }
+.rightPanel {
+ display: flex;
+ flex-direction: column;
+}
.blockTitle { font-size: 14px; color: #999; }
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/page.tsx
index 60d936cc..b3e5320d 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/material/ai-generate/page.tsx
@@ -3,14 +3,15 @@
import { useState, useEffect, useRef, useMemo } from "react";
import { useParams, useRouter, useSearchParams } from "next/navigation";
import { message, Input, Button, Select, Row, Col, Modal, Progress } from "antd";
-import { ArrowLeftOutlined, RobotOutlined, FireOutlined, PictureOutlined, FileTextOutlined, UploadOutlined, VideoCameraOutlined, DownloadOutlined } from "@ant-design/icons";
+import { ArrowLeftOutlined, RobotOutlined, FireOutlined, PictureOutlined, FileTextOutlined, UploadOutlined, VideoCameraOutlined, DownloadOutlined, MessageOutlined } from "@ant-design/icons";
import styles from "./ai-generate.module.scss";
-import { generateImage, generateFireflyCard, getImageGenerationModels, generateVideo, getVideoTaskStatus, getVideoGenerationModels, generateMd2Card } from "@/api/ai";
+import { generateImage, generateFireflyCard, getImageGenerationModels, generateVideo, getVideoTaskStatus, getVideoGenerationModels, generateMd2Card, getVideoGenerations } from "@/api/ai";
import { getOssUrl } from "@/utils/oss";
import { uploadToOss } from "@/api/oss";
import { getMediaGroupList, createMedia } from "@/api/media";
import { useTransClient } from "@/app/i18n/client";
import { md2CardTemplates, defaultMarkdown } from "./md2card";
+import Chat from "@/components/Chat";
const { TextArea } = Input;
const { Option } = Select;
@@ -42,12 +43,12 @@ export default function AIGeneratePage() {
// 根据 URL 初始化模块与子标签
const queryTab = (searchParams.get("tab") || "").toString();
const initIsVideo = ["videoGeneration", "text2video", "image2video"].includes(queryTab);
- const initImageTab = ["textToImage", "textToFireflyCard", "md2card"].includes(queryTab) ? (queryTab as any) : "textToImage";
+ const initImageTab = ["textToImage", "textToFireflyCard", "md2card", "chat"].includes(queryTab) ? (queryTab as any) : "textToImage";
const initVideoTab = queryTab === "image2video" ? "image2video" : "text2video";
// 左侧模块切换
const [activeModule, setActiveModule] = useState<"image" | "video">(initIsVideo ? "video" : "image");
// 图片子模块切换
- const [activeImageTab, setActiveImageTab] = useState<"textToImage" | "textToFireflyCard" | "md2card">(initImageTab);
+ const [activeImageTab, setActiveImageTab] = useState<"textToImage" | "textToFireflyCard" | "md2card" | "chat">(initImageTab);
// 视频子模块切换
const [activeVideoTab, setActiveVideoTab] = useState<"text2video" | "image2video">(initVideoTab);
@@ -95,6 +96,11 @@ export default function AIGeneratePage() {
const [checkingStatus, setCheckingStatus] = useState(false);
const [videoProgress, setVideoProgress] = useState(0);
+ // 视频历史记录
+ const [videoHistory, setVideoHistory] = useState<any[]>([]);
+ const [loadingHistory, setLoadingHistory] = useState(false);
+ const [showHistory, setShowHistory] = useState(false);
+
// 首/尾帧上传
const firstFrameInputRef = useRef<HTMLInputElement | null>(null);
const tailFrameInputRef = useRef<HTMLInputElement | null>(null);
@@ -152,6 +158,8 @@ export default function AIGeneratePage() {
const [uploadModalVisible, setUploadModalVisible] = useState(false);
const [uploading, setUploading] = useState(false);
const [loadingMediaGroups, setLoadingMediaGroups] = useState(false);
+ const [defaultMediaGroup, setDefaultMediaGroup] = useState<string | null>(null);
+ const [uploadedContent, setUploadedContent] = useState<Set<string>>(new Set());
const [imageModels, setImageModels] = useState<any[]>([]);
const [videoModels, setVideoModels] = useState<any[]>([]);
@@ -236,8 +244,71 @@ export default function AIGeneratePage() {
}
} catch (e) { console.error(e); }
};
+
+ const fetchVideoHistory = async () => {
+ try {
+ setLoadingHistory(true);
+ const res: any = await getVideoGenerations({ page: 1, pageSize: 20 });
+ if (res.data?.list) {
+ setVideoHistory(res.data.list);
+ }
+ } catch (e) {
+ console.error(e);
+ message.error(t("aiGenerate.taskFailed"));
+ } finally {
+ setLoadingHistory(false);
+ }
+ };
+
+ // 格式化时间戳
+ const formatTime = (timestamp: number) => {
+ if (!timestamp) return '-';
+ const date = new Date(timestamp * 1000);
+ return date.toLocaleString();
+ };
+
+ // 获取状态显示文本
+ const getStatusText = (status: string) => {
+ switch (status?.toUpperCase()) {
+ case 'SUCCESS':
+ return '已完成';
+ case 'FAILED':
+ return '失败';
+ case 'PROCESSING':
+ return '处理中';
+ case 'SUBMITTED':
+ case 'PENDING':
+ case 'QUEUED':
+ return '已提交';
+ default:
+ return status || '-';
+ }
+ };
+
+ // 处理历史记录项点击
+ const handleHistoryItemClick = async (item: any) => {
+ if (item.status === 'SUCCESS' && item.data?.video_url) {
+ setVideoResult(item.data.video_url);
+ setVideoStatus('completed');
+ setVideoProgress(100);
+
+ // 自动上传到默认素材库组
+ await autoUploadToDefaultGroup(item.data.video_url, "video", item.model || "Unknown Model", item.prompt || "");
+ } else if (item.status === 'PROCESSING') {
+ setVideoTaskId(item.task_id);
+ setVideoStatus('processing');
+ pollVideoTaskStatus(item.task_id);
+ }
+ };
useEffect(() => { fetchImageModels(); fetchVideoModels(); }, []);
+ // 当切换到视频模块时自动加载历史记录
+ useEffect(() => {
+ if (activeModule === "video" && videoHistory.length === 0) {
+ fetchVideoHistory();
+ }
+ }, [activeModule]);
+
// 当模型切换时,自动设置合适的 quality 值
useEffect(() => {
if (!model || !imageModels.length) return;
@@ -260,7 +331,7 @@ export default function AIGeneratePage() {
if (tab === 'videoGeneration' || tab === 'text2video' || tab === 'image2video') {
setActiveModule('video');
setActiveVideoTab(tab === 'image2video' ? 'image2video' : 'text2video');
- } else if (tab === 'textToImage' || tab === 'textToFireflyCard' || tab === 'md2card') {
+ } else if (tab === 'textToImage' || tab === 'textToFireflyCard' || tab === 'md2card' || tab === 'chat') {
setActiveModule('image');
setActiveImageTab(tab as any);
}
@@ -302,7 +373,19 @@ export default function AIGeneratePage() {
}, [videoModel, videoModels]);
const fetchMediaGroups = async (type: "video" | "img" = "img") => {
- try { setLoadingMediaGroups(true); const res: any = await getMediaGroupList(1, 100, type); if (res.data) setMediaGroups(res.data.list || []); }
+ try {
+ setLoadingMediaGroups(true);
+ const res: any = await getMediaGroupList(1, 100, type);
+ if (res.data) {
+ const groups = res.data.list || [];
+ setMediaGroups(groups);
+ // 找到默认组
+ const defaultGroup = groups.find((group: any) => group.isDefault === true);
+ if (defaultGroup) {
+ setDefaultMediaGroup(defaultGroup._id);
+ }
+ }
+ }
catch { message.error(t("aiGenerate.getMediaGroupListFailed")); }
finally { setLoadingMediaGroups(false); }
};
@@ -312,13 +395,34 @@ export default function AIGeneratePage() {
try {
setLoading(true);
const res: any = await generateImage({ prompt, n, quality, style, size, model, response_format: "url" });
- if (res.data?.list) setResult(res.data.list.map((i: any) => i.url)); else message.error(t("aiGenerate.imageGenerationFailed"));
+ if (res.data?.list) {
+ const imageUrls = res.data.list.map((i: any) => i.url);
+ setResult(imageUrls);
+
+ // 自动上传第一张图片到默认素材库组
+ if (imageUrls.length > 0) {
+ await autoUploadToDefaultGroup(imageUrls[0], "img", model, prompt);
+ }
+ } else {
+ message.error(t("aiGenerate.imageGenerationFailed"));
+ }
} catch { message.error(t("aiGenerate.imageGenerationFailed")); } finally { setLoading(false); }
};
const handleTextToFireflyCard = async () => {
if (!content || !title) { message.error(t("aiGenerate.pleaseEnterContentAndTitle")); return; }
- try { setLoadingFirefly(true); const res: any = await generateFireflyCard({ content, temp, title }); if (res.data?.image) setFireflyResult(res.data.image); else message.error(t("aiGenerate.fireflyCardGenerationFailed")); }
+ try {
+ setLoadingFirefly(true);
+ const res: any = await generateFireflyCard({ content, temp, title });
+ if (res.data?.image) {
+ setFireflyResult(res.data.image);
+
+ // 自动上传到默认素材库组
+ await autoUploadToDefaultGroup(res.data.image, "img", "Firefly Card", `${title}: ${content}`);
+ } else {
+ message.error(t("aiGenerate.fireflyCardGenerationFailed"));
+ }
+ }
catch { message.error(t("aiGenerate.fireflyCardGenerationFailed")); } finally { setLoadingFirefly(false); }
};
@@ -367,7 +471,18 @@ export default function AIGeneratePage() {
let percent = 0;
if (typeof progress === "string") { const m = progress.match(/(\d+)/); percent = m ? Number(m[1]) : 0; }
else if (typeof progress === "number") { percent = progress > -1 ? Math.round(progress) : Math.round(progress * 100); }
- if (normalized === "completed") { setVideoResult(res.data?.data?.video_url); setVideoProgress(100); message.success(t("aiGenerate.videoGenerationSuccess")); return true; }
+ if (normalized === "completed") {
+ const videoUrl = res.data?.data?.video_url;
+ setVideoResult(videoUrl);
+ setVideoProgress(100);
+ message.success(t("aiGenerate.videoGenerationSuccess"));
+
+ // 自动上传到默认素材库组
+ if (videoUrl) {
+ await autoUploadToDefaultGroup(videoUrl, "video", videoModel, videoPrompt);
+ }
+ return true;
+ }
if (normalized === "failed") { setVideoProgress(0); message.error(fail_reason || t("aiGenerate.videoGenerationFailed")); return true; }
setVideoProgress(percent); return false;
}
@@ -380,11 +495,81 @@ export default function AIGeneratePage() {
const handleMd2CardGeneration = async () => {
if (!markdownContent) { message.error(t("aiGenerate.pleaseEnterMarkdown")); return; }
- try { setLoadingMd2Card(true); const res: any = await generateMd2Card({ markdown: markdownContent, theme: selectedTheme, themeMode, width: cardWidth, height: cardHeight, splitMode, mdxMode, overHiddenMode }); if (res.data?.images?.length) setMd2CardResult(res.data.images[0].url); else message.error(t("aiGenerate.cardGenerationFailed")); }
+ try {
+ setLoadingMd2Card(true);
+ const res: any = await generateMd2Card({ markdown: markdownContent, theme: selectedTheme, themeMode, width: cardWidth, height: cardHeight, splitMode, mdxMode, overHiddenMode });
+ if (res.data?.images?.length) {
+ const cardUrl = res.data.images[0].url;
+ setMd2CardResult(cardUrl);
+
+ // 自动上传到默认素材库组
+ await autoUploadToDefaultGroup(cardUrl, "img", "Markdown Card", markdownContent.substring(0, 100));
+ } else {
+ message.error(t("aiGenerate.cardGenerationFailed"));
+ }
+ }
catch { message.error(t("aiGenerate.cardGenerationFailed")); } finally { setLoadingMd2Card(false); }
};
const [currentUploadUrl, setCurrentUploadUrl] = useState<string | null>(null);
+
+ // 自动上传到默认素材库组
+ const autoUploadToDefaultGroup = async (mediaUrl: string, mediaType: "video" | "img", modelName: string, description: string) => {
+ try {
+ // 检查是否已经上传过
+ if (uploadedContent.has(mediaUrl)) {
+ console.log('Content already uploaded:', mediaUrl);
+ return;
+ }
+
+ // 获取素材库列表并找到默认组
+ const res: any = await getMediaGroupList(1, 100, mediaType);
+ let defaultGroupId = null;
+
+ if (res.data) {
+ const groups = res.data.list || [];
+ const defaultGroup = groups.find((group: any) => group.isDefault === true);
+ if (defaultGroup) {
+ defaultGroupId = defaultGroup._id;
+ setDefaultMediaGroup(defaultGroupId);
+ }
+ }
+
+ if (!defaultGroupId) {
+ console.warn('No default media group found');
+ message.error('未找到默认素材库组');
+ return;
+ }
+
+ const now = new Date();
+ const timeStr = `${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')} ${String(now.getHours()).padStart(2,'0')}:${String(now.getMinutes()).padStart(2,'0')}`;
+ const uploadTitle = modelName ? `${modelName} ${timeStr}` : timeStr;
+
+ console.log('开始上传到默认组:', defaultGroupId, mediaUrl);
+
+ const uploadRes: any = await createMedia({
+ groupId: defaultGroupId,
+ url: mediaUrl,
+ type: mediaType,
+ title: uploadTitle,
+ desc: description
+ });
+
+ if (uploadRes.data) {
+ // 标记为已上传
+ setUploadedContent(prev => new Set([...prev, mediaUrl]));
+ message.success(mediaType === "video" ? t("aiGenerate.videoUploadSuccess") : t("aiGenerate.uploadSuccess"));
+ console.log('上传成功');
+ } else {
+ message.error(mediaType === "video" ? t("aiGenerate.videoUploadFailed") : t("aiGenerate.uploadFailed"));
+ console.log('上传失败:', uploadRes);
+ }
+ } catch (error) {
+ console.error('Auto upload failed:', error);
+ message.error(mediaType === "video" ? t("aiGenerate.videoUploadFailed") : t("aiGenerate.uploadFailed"));
+ }
+ };
+
const handleUploadToMediaGroup = async (type: string = "img", url?: string) => {
setSelectedMediaGroup(null);
setCurrentUploadUrl(url || (videoResult || fireflyResult || md2CardResult) || null);
@@ -427,15 +612,19 @@ export default function AIGeneratePage() {
<div className={styles.imageSubTabs}>
<button className={`${styles.subTab} ${activeImageTab==='textToImage' ? styles.subTabActive : ''}`} onClick={()=>setActiveImageTab('textToImage')}>
<div className="subTabIcon"><PictureOutlined /></div>
- <div className="subTabLabel">{t("aiGenerate.textToImage")}</div>
+ <div className={styles.subTabLabel}>{t("aiGenerate.textToImage")}</div>
</button>
<button className={`${styles.subTab} ${activeImageTab==='textToFireflyCard' ? styles.subTabActive : ''}`} onClick={()=>setActiveImageTab('textToFireflyCard')}>
<div className="subTabIcon"><FireOutlined /></div>
- <div className="subTabLabel">{t("aiGenerate.fireflyCard")}</div>
+ <div className={styles.subTabLabel}>{t("aiGenerate.fireflyCard")}</div>
</button>
<button className={`${styles.subTab} ${activeImageTab==='md2card' ? styles.subTabActive : ''}`} onClick={()=>setActiveImageTab('md2card')}>
<div className="subTabIcon"><FileTextOutlined /></div>
- <div className="subTabLabel">{t("aiGenerate.markdownToCard")}</div>
+ <div className={styles.subTabLabel}>{t("aiGenerate.markdownToCard")}</div>
+ </button>
+ <button className={`${styles.subTab} ${activeImageTab==='chat' ? styles.subTabActive : ''}`} onClick={()=>setActiveImageTab('chat')}>
+ <div className="subTabIcon"><MessageOutlined /></div>
+ <div className={styles.subTabLabel}>Nano Banana</div>
</button>
</div>
)}
@@ -444,11 +633,11 @@ export default function AIGeneratePage() {
<div className={styles.imageSubTabs}>
<button className={`${styles.subTab} ${activeVideoTab==='text2video' ? styles.subTabActive : ''}`} onClick={()=>setActiveVideoTab('text2video')}>
<div className="subTabIcon"><VideoCameraOutlined /></div>
- <div className="subTabLabel">{t('aiGenerate.textToVideo')}</div>
+ <div className={styles.subTabLabel}>{t('aiGenerate.textToVideo')}</div>
</button>
<button className={`${styles.subTab} ${activeVideoTab==='image2video' ? styles.subTabActive : ''}`} onClick={()=>setActiveVideoTab('image2video')}>
<div className="subTabIcon"><PictureOutlined /></div>
- <div className="subTabLabel">{t('aiGenerate.imageToVideo')}</div>
+ <div className={styles.subTabLabel}>{t('aiGenerate.imageToVideo')}</div>
</button>
</div>
)}
@@ -562,7 +751,7 @@ export default function AIGeneratePage() {
<img src={getOssUrl(img)} alt={`${t('aiGenerate.textToImage')} ${idx+1}`} />
<div className={styles.imageActions}>
<Button size="small" icon={<DownloadOutlined />} onClick={()=>handleDownloadUrl(img)} />
- <Button size="small" type="primary" onClick={()=>handleUploadToMediaGroup('img', img)} icon={<UploadOutlined />} />
+ <Button size="small" type="primary" icon={<UploadOutlined />} onClick={()=>handleUploadToMediaGroup('img', img)} />
</div>
</div>
</Col>
@@ -684,6 +873,14 @@ export default function AIGeneratePage() {
</div>
</div>
)}
+
+ {activeImageTab === 'chat' && (
+ <div className={styles.chatSection}>
+ <div className={styles.chatContainer}>
+ <Chat defaultMask='100000' />
+ </div>
+ </div>
+ )}
</>
) : (
<div className={styles.section}>
@@ -835,6 +1032,116 @@ export default function AIGeneratePage() {
</div>
</div>
)}
+
+ {/* 视频历史记录区域 */}
+ {activeModule === "video" && (
+ <div className={styles.historySection}>
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 16 }}>
+ <h3 style={{ margin: 0, fontSize: '18px', fontWeight: 'bold' }}>视频生成历史</h3>
+ <Button
+ onClick={fetchVideoHistory}
+ loading={loadingHistory}
+ size="small"
+ type="primary"
+ >
+ 刷新
+ </Button>
+ </div>
+
+ {loadingHistory ? (
+ <div style={{ textAlign: 'center', padding: '40px', color: '#999' }}>
+ 加载中...
+ </div>
+ ) : videoHistory.length === 0 ? (
+ <div style={{ textAlign: 'center', padding: '40px', color: '#999' }}>
+ 暂无历史记录
+ </div>
+ ) : (
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))', gap: '16px' }}>
+ {videoHistory.map((item, index) => (
+ <div
+ key={item.task_id || index}
+ style={{
+ border: '1px solid #e8e8e8',
+ borderRadius: 12,
+ padding: 16,
+ cursor: 'pointer',
+ // backgroundColor: item.status === 'SUCCESS' ? '#f6ffed' : item.status === 'FAILED' ? '#fff2f0' : '#fafafa',
+ transition: 'all 0.2s ease',
+ boxShadow: '0 2px 4px rgba(0,0,0,0.1)'
+ }}
+ onClick={() => handleHistoryItemClick(item)}
+ onMouseEnter={(e) => {
+ e.currentTarget.style.transform = 'translateY(-2px)';
+ e.currentTarget.style.boxShadow = '0 4px 8px rgba(0,0,0,0.15)';
+ }}
+ onMouseLeave={(e) => {
+ e.currentTarget.style.transform = 'translateY(0)';
+ e.currentTarget.style.boxShadow = '0 2px 4px rgba(0,0,0,0.1)';
+ }}
+ >
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }}>
+ <span style={{ fontWeight: 'bold', fontSize: '16px', color: '#1890ff' }}>
+ {item.task_id ? `#${item.task_id.slice(-8)}` : `#${index + 1}`}
+ </span>
+ <span style={{
+ fontSize: '12px',
+ padding: '4px 8px',
+ borderRadius: '6px',
+ backgroundColor: item.status === 'SUCCESS' ? '#52c41a' : item.status === 'FAILED' ? '#ff4d4f' : '#1890ff',
+ color: 'white',
+ fontWeight: 'bold'
+ }}>
+ {getStatusText(item.status)}
+ </span>
+ </div>
+
+ <div style={{ fontSize: '13px', color: '#666', marginBottom: 8 }}>
+ <div style={{ marginBottom: 4 }}>
+ <strong>提交时间:</strong> {formatTime(item.submit_time)}
+ </div>
+ {item.finish_time && (
+ <div style={{ marginBottom: 4 }}>
+ <strong>完成时间:</strong> {formatTime(item.finish_time)}
+ </div>
+ )}
+
+ </div>
+
+
+
+ {item.progress && (
+ <div style={{ fontSize: '13px', color: '#1890ff', marginBottom: 8 }}>
+ <strong>进度:</strong> {item.progress}
+ </div>
+ )}
+
+ {item.fail_reason && item.status === 'FAILED' && (
+ <div style={{ fontSize: '13px', color: '#ff4d4f', marginBottom: 8 }}>
+ <strong>失败原因:</strong> {item.fail_reason}
+ </div>
+ )}
+
+ {item.data?.video_url && item.status === 'SUCCESS' && (
+ <div style={{ marginTop: 12 }}>
+ <video
+ src={getOssUrl(item.data.video_url)}
+ controls
+ style={{
+ width: '100%',
+ borderRadius: 8,
+ maxHeight: '200px',
+ objectFit: 'cover'
+ }}
+ />
+ </div>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+ </div>
+ )}
</div>
</div>
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx
index d9d006f8..50a44928 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/page.tsx
@@ -1006,7 +1006,6 @@ function UpcomingFeaturesSection() {
// 移动应用下载区
import { QRCode } from 'react-qrcode-logo';
-import HomeHeader from "@/app/layout/HomeHeader";
function DownloadSection() {
const { t } = useTransClient('home');
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx
index 17b8f094..c535049b 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/profile/page.tsx
@@ -1,6 +1,6 @@
"use client";
-import { useEffect, useState } from "react";
+import { useEffect, useState, useMemo } from "react";
import { Card, Descriptions, Button, message, Modal, Form, Input } from "antd";
import { CrownOutlined, TrophyOutlined, GiftOutlined, StarOutlined, RocketOutlined, ThunderboltOutlined, HistoryOutlined, DollarOutlined, UserOutlined, GiftFilled, EditOutlined, CopyOutlined } from "@ant-design/icons";
import { useRouter, useSearchParams } from "next/navigation";
@@ -89,29 +89,65 @@ export default function ProfilePage() {
createdAt?: string;
}
+ // 状态判断辅助函数
+ const getVipStatusInfo = (status: string) => {
+ switch (status) {
+ case 'none':
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'trialing':
+ return { isVip: true, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'monthly_once':
+ return { isVip: true, isMonthly: true, isYearly: false, isAutoRenew: false, isOnce: true };
+ case 'yearly_once':
+ return { isVip: true, isMonthly: false, isYearly: true, isAutoRenew: false, isOnce: true };
+ case 'active_monthly':
+ return { isVip: true, isMonthly: true, isYearly: false, isAutoRenew: true, isOnce: false };
+ case 'active_yearly':
+ return { isVip: true, isMonthly: false, isYearly: true, isAutoRenew: true, isOnce: false };
+ case 'active_nonrenewing':
+ return { isVip: true, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'expired':
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ default:
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ }
+ };
+
// 获取会员状态和过期时间
- const isVip = userInfo?.vipInfo?.cycleType && userInfo.vipInfo.cycleType > 0 &&
- userInfo?.vipInfo?.expireTime ? new Date(userInfo.vipInfo.expireTime) > new Date() : false;
+ const isVip = useMemo(() => {
+ const vipInfo = userInfo?.vipInfo;
+ if (!vipInfo) return false;
+
+ const statusInfo = getVipStatusInfo(vipInfo.status);
+ return statusInfo.isVip && vipInfo.expireTime && new Date(vipInfo.expireTime) > new Date();
+ }, [userInfo]);
+
const vipExpireTime = userInfo?.vipInfo?.expireTime ? new Date(userInfo.vipInfo.expireTime).toLocaleDateString() : '';
// 检查用户是否从未开过会员
- const hasNeverBeenVip = !userInfo?.vipInfo || Object.keys(userInfo.vipInfo).length === 0;
+ const hasNeverBeenVip = !userInfo?.vipInfo || userInfo.vipInfo.status === 'none' || userInfo.vipInfo.status === 'expired';
// 获取会员类型显示文本
- const getVipCycleTypeText = (cycleType: number) => {
- switch (cycleType) {
- case 0:
- return t('nonMember');
- case 1:
- return t('monthlyMember');
- case 2:
- return t('yearlyMember');
- default:
- return t('unknown');
+ const getVipStatusText = (status: string) => {
+ const statusInfo = getVipStatusInfo(status);
+ if (statusInfo.isYearly && statusInfo.isAutoRenew) {
+ return t('yearlyMember');
+ } else if (statusInfo.isYearly && !statusInfo.isAutoRenew) {
+ return t('yearlyMember') + ` (${t('memberTypes.oneTime' as any)})`;
+ } else if (statusInfo.isMonthly && statusInfo.isAutoRenew) {
+ return t('monthlyMember');
+ } else if (statusInfo.isMonthly && !statusInfo.isAutoRenew) {
+ return t('monthlyMember') + ` (${t('memberTypes.oneTime' as any)})`;
+ } else if (statusInfo.isOnce) {
+ return statusInfo.isYearly ? t('yearlyMember') + ` (${t('memberTypes.oneTime' as any)})` : t('monthlyMember') + ` (${t('memberTypes.oneTime' as any)})`;
+ } else if (status === 'trialing') {
+ return t('monthlyMember') + ` (${t('memberTypes.trial' as any)})`;
+ } else {
+ return t('nonMember');
}
};
- const vipCycleType = getVipCycleTypeText(userInfo?.vipInfo?.cycleType || 0);
+ const vipStatusText = getVipStatusText(userInfo?.vipInfo?.status || 'none');
// 会员权益数据
const vipBenefits = [
@@ -139,7 +175,8 @@ export default function ProfilePage() {
// 检查是否需要显示免费会员提示
const hasVipInfo = response.data.vipInfo;
- if (!hasVipInfo && !hasShownFreeTrial) {
+ const isNeverVip = !hasVipInfo || hasVipInfo.status === 'none' || hasVipInfo.status === 'expired';
+ if (isNeverVip && !hasShownFreeTrial) {
// 延迟显示弹框,确保页面加载完成
setTimeout(() => {
setFreeTrialModalVisible(true);
@@ -171,10 +208,10 @@ export default function ProfilePage() {
total: paginatedData.total || 0
});
} else {
- message.error(response?.message || '获取积分记录失败');
+ message.error(response?.message || t('messages.getPointsRecordsFailed' as any));
}
} catch (error) {
- message.error('获取积分记录失败');
+ message.error(t('messages.getPointsRecordsFailed' as any));
} finally {
setPointsLoading(false);
}
@@ -209,15 +246,15 @@ export default function ProfilePage() {
if (response && response.code === 0) {
setCancelCode(response.data?.code || '');
- message.success('验证码已发送');
+ message.success(t('messages.verificationCodeSent' as any));
// 开始倒计时
setCodeCountdown(60);
} else {
- message.error(response?.message || '获取验证码失败');
+ message.error(response?.message || t('messages.getVerificationCodeFailed' as any));
}
} catch (error) {
console.error('获取验证码错误:', error);
- message.error('获取验证码失败');
+ message.error(t('messages.getVerificationCodeFailed' as any));
}
};
@@ -237,7 +274,7 @@ export default function ProfilePage() {
if (response && response.code === 0) {
- message.success('账户注销成功');
+ message.success(t('messages.accountCancelledSuccess' as any));
setCancelModalVisible(false);
// 清除登录状态并跳转到登录页
clearLoginStatus();
@@ -690,7 +727,7 @@ export default function ProfilePage() {
{new Date(currentOrderDetail.expires_at * 1000).toLocaleString()}
</Descriptions.Item>
<Descriptions.Item label={t('userId')}>{currentOrderDetail.userId}</Descriptions.Item>
- <Descriptions.Item label="价格ID">{currentOrderDetail.price}</Descriptions.Item>
+ <Descriptions.Item label={t('messages.priceId' as any)}>{currentOrderDetail.price}</Descriptions.Item>
{currentOrderDetail.payment_intent && (
<Descriptions.Item label={t('paymentIntent')}>{currentOrderDetail.payment_intent}</Descriptions.Item>
)}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss b/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss
index 0d310f1d..92c5d363 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/styles/difyHome.module.scss
@@ -166,9 +166,7 @@
}
@media (max-width: 768px) {
- padding: 6px 16px;
- font-size: 14px;
- margin-left: 0;
+ display: none;
}
}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx
index 088c90fe..8ed83383 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/tasks/taskPageCore.tsx
@@ -1871,7 +1871,7 @@ export default function TaskPageCore() {
]}
width={previewMedia?.type === 'video' ? 800 : 600}
zIndex={3000}
- destroyOnClose={true}
+ destroyOnHidden={true}
styles={{
body: {
padding: '24px',
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx
index bd4b9371..3ea1584d 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/vip/page.tsx
@@ -129,7 +129,7 @@ export default function VipPage() {
</div>
</div>
- <h3 className={styles.title}>选择开通时长</h3>
+ <h3 className={styles.title}>{t('selectDuration')}</h3>
{/* 免费试用提示 */}
{canUseTrial && (
@@ -148,14 +148,14 @@ export default function VipPage() {
<span className={styles.badge}>
{canUseTrial ? t('badge.month') : t('badge.monthOld')}
</span>
- <h4>月费会员</h4>
+ <h4>{t('planTitles.month')}</h4>
<div>
<span className={styles.originalPrice}>$30</span>
<span className={styles.discount}>
{canUseTrial ? t('badge.month') : t('badge.monthOld')}
</span>
</div>
- <p className={styles.currentPrice}>$<span>19</span>/月</p>
+ <p className={styles.currentPrice}>$<span>19</span>{t('priceUnits.month')}</p>
{canUseTrial && (
<p className={styles.trialText}>{t('trialText.month')}</p>
)}
@@ -167,15 +167,15 @@ export default function VipPage() {
<span className={styles.badge}>
{canUseTrial ? t('badge.year') : t('badge.yearOld')}
</span>
- <h4>年费会员</h4>
+ <h4>{t('planTitles.year')}</h4>
<div>
<span className={styles.originalPrice}>$180</span>
<span className={styles.discount}>
{canUseTrial ? t('badge.year') : t('badge.yearOld')}
</span>
</div>
- <p className={styles.currentPrice}>$<span>12</span>/月</p>
- <p className={styles.monthlyPrice}>$144/年</p>
+ <p className={styles.currentPrice}>$<span>12</span>{t('priceUnits.month')}</p>
+ <p className={styles.monthlyPrice}>$144{t('priceUnits.year')}</p>
{canUseTrial && (
<p className={styles.trialText}>{t('trialText.year')}</p>
)}
@@ -185,7 +185,7 @@ export default function VipPage() {
onClick={() => setSelectedPlan('onceMonth')}
>
<span className={styles.badge}>{t('badge.onceMonth')}</span>
- <h4>月度会员</h4>
+ <h4>{t('planTitles.onceMonth')}</h4>
<div>
<span className={styles.originalPrice}>$30</span>
<span className={styles.discount}>{t('badge.onceMonth')}</span>
@@ -194,7 +194,7 @@ export default function VipPage() {
</div>
</div>
- <p className={styles.subscriptionInfo}>自动续订,随时取消</p>
+ <p className={styles.subscriptionInfo}>{t('autoRenewal')}</p>
<button
className={styles.activateButton}
diff --git a/aitoearn_web/aitoearn-web/src/app/[lng]/wallet/page.tsx b/aitoearn_web/aitoearn-web/src/app/[lng]/wallet/page.tsx
index cb01fd07..e3213ec2 100644
--- a/aitoearn_web/aitoearn-web/src/app/[lng]/wallet/page.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/[lng]/wallet/page.tsx
@@ -239,7 +239,7 @@ export default function WalletPage() {
onCancel={() => setModalOpen(false)}
onOk={onSubmit}
confirmLoading={submitting}
- destroyOnClose
+ destroyOnHidden
width="90%"
style={{
maxWidth: '500px',
diff --git a/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts b/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts
index 607816b2..8f673402 100644
--- a/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts
+++ b/aitoearn_web/aitoearn-web/src/app/config/platConfig.ts
@@ -114,7 +114,7 @@ export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([
titleMax: 80,
desMax: 2000,
},
- themeColor: "blue",
+ themeColor: "#F06198",
},
],
[
@@ -192,7 +192,7 @@ export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([
topicMax: 100,
desMax: 5000,
},
- themeColor: "blue",
+ themeColor: "#F07171",
},
],
[
@@ -218,7 +218,6 @@ export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([
url: "https://www.facebook.com/",
pubTypes: new Set([PubType.VIDEO, PubType.ImageText]),
commonPubParamsConfig: {
- titleMax: 80,
topicMax: 100,
desMax: 5000,
imagesMax: 10,
@@ -250,7 +249,6 @@ export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([
url: "https://www.threads.net/",
pubTypes: new Set([PubType.VIDEO, PubType.ImageText, PubType.Article]),
commonPubParamsConfig: {
- titleMax: 80,
topicMax: 100,
desMax: 500,
imagesMax: 20,
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/client.ts b/aitoearn_web/aitoearn-web/src/app/i18n/client.ts
index 156a2841..1abbdfe7 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/client.ts
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/client.ts
@@ -29,12 +29,16 @@ i18next
)
// .use(LocizeBackend) // locize backend could be used on client side, but prefer to keep it in sync with server side
.init({
- ...getOptions(),
- lng: undefined, // let detect the language on client side
+ ...getOptions(undefined), // 不传递 lng 参数,让 i18next 自动检测
detection: {
order: ["path", "htmlTag", "cookie", "navigator"],
+ caches: ["cookie"], // 只缓存到 cookie,避免其他缓存干扰
},
preload: runsOnServerSide ? languages : [],
+ // 确保语言切换时立即生效
+ // react: {
+ // useSuspense: false,
+ // },
});
export function useTransClient<
@@ -53,14 +57,30 @@ export function useTransClient<
i18next.changeLanguage(lng);
} else {
const [activeLng, setActiveLng] = useState(i18next.resolvedLanguage);
+
+ // 监听 i18next 语言变化
useEffect(() => {
if (activeLng === i18next.resolvedLanguage) return;
setActiveLng(i18next.resolvedLanguage);
}, [activeLng, i18next.resolvedLanguage]);
+
+ // 强制同步 URL 参数中的语言到 i18next
useEffect(() => {
- if (!lng || i18next.resolvedLanguage === lng) return;
- i18next.changeLanguage(lng);
- }, [lng, i18next]);
+ if (!lng) return;
+
+ // 始终使用 URL 参数中的语言,忽略 i18next 的自动检测
+ if (i18next.resolvedLanguage !== lng) {
+ i18next.changeLanguage(lng).then(() => {
+ // 语言切换完成后,强制重新渲染
+ setActiveLng(lng);
+ });
+ } else {
+ // 即使语言相同,也确保状态同步
+ setActiveLng(lng);
+ }
+ }, [lng]);
+
+ // 同步 cookie
useEffect(() => {
if (i18nextCookie === lng) return;
setCookie(cookieName, lng, { path: "/" });
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json
index b6a71e32..2f6bc7e6 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/account.json
@@ -41,14 +41,18 @@
"fetchError": "Failed to fetch pages",
"submitError": "Failed to select pages",
"submitSuccess": "Pages selected successfully",
- "selectAtLeastOne": "Please select at least one page"
+ "selectAtLeastOne": "Please select at least one page",
+ "noPagesMessage": "You haven't created any Facebook pages yet",
+ "createPageTip": "Click the link above to create a page, then click refresh",
+ "createPageLink": "Create Facebook Page",
+ "refresh": "Refresh"
},
"listMode": {
"title": "Publish Plans",
"recordCount": "{{count}} plans total",
"newWork": "New Work",
"noRecords": "No publish plans",
- "queue": "Queue",
+ "queue": "Queue ",
"sent": "Sent",
"createdDaysAgo": "You created this {{days}} days ago",
"viewPost": "View Post",
@@ -64,6 +68,10 @@
"error": "Failed to get IP info",
"tooltip": "ASN: {{asn}}\nOrganization: {{org}}"
},
+ "ipType": {
+ "direct": "Direct",
+ "proxy": "Proxy"
+ },
"createSpace": {
"title": "Add space",
"button": "Add space",
@@ -101,10 +109,37 @@
"platform": "Platform",
"space": "Space"
},
+ "deleteAccount": "Delete",
+ "messages": {
+ "ipLocationError": "Failed to get IP location information",
+ "createSpaceFirst": "Please create a space first",
+ "deleteSuccess": "Deleted successfully",
+ "facebookAuthFailed": "Facebook authorization failed",
+ "unsupportedPlatform": "Unsupported platform type",
+ "accountListRefreshed": "Account list refreshed",
+ "refreshAccountListFailed": "Failed to refresh account list",
+ "authFailed": "Authorization failed",
+ "pleaseRetry": "Please try again",
+ "platformNotSupported": "Direct authorization for {{platform}} platform is not supported yet",
+ "sortSuccess": "Sort successful",
+ "sortFailed": "Sort failed"
+ },
"rednote": "Rednote",
"kwai": "Kwai",
"bilibili": "Bilibili",
"wxgzh": "WeChat Official",
"douyin": "Douyin",
- "wxsph": "WeChat Channels"
+ "wxsph": "WeChat Channels",
+ "deleteConfirm": {
+ "title": "Delete Confirmation",
+ "content": "Are you sure you want to delete {{count}} account(s)?",
+ "cancel": "Cancel",
+ "confirm": "Confirm"
+ },
+ "mobileOnlySupport": "Mobile only",
+ "reauthConfirm": {
+ "title": "Session Expired",
+ "content": "Your {{platformName}} account \"{{nickname}}\" (in {{spaceName}}) session has expired. Would you like to log in again?",
+ "loginAgain": "Reauthorize"
+ }
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/home.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/home.json
index cb2c19d5..9d0e1d4d 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/home.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/home.json
@@ -6,6 +6,7 @@
"header": {
"logo": "Aitoearn",
"nav": {
+ "home": "Home",
"marketplace": "Marketplace",
"pricing": "Pricing",
"status": "Status",
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/imageEditor.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/imageEditor.json
new file mode 100644
index 00000000..7e5342ac
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/imageEditor.json
@@ -0,0 +1,3 @@
+{
+ "imageEditing": "image editing"
+}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/interactive.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/interactive.json
new file mode 100644
index 00000000..d4db3791
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/interactive.json
@@ -0,0 +1,41 @@
+{
+ "title": "Interactive Management",
+ "messages": {
+ "pleaseLoginFirst": "Please login first",
+ "commentSuccess": "Comment posted successfully",
+ "commentFailed": "Failed to post comment, please try again",
+ "replySuccess": "Reply posted successfully",
+ "replyFailed": "Failed to post reply, please try again"
+ },
+ "ui": {
+ "selectChannel": "Please select a channel for interaction on the left",
+ "selectChannelDesc": "After selecting an account, the latest posts from that channel will be automatically loaded with comment interaction features.",
+ "loadMore": "Load More",
+ "noMorePosts": "No more posts",
+ "loading": "Loading...",
+ "sending": "Sending...",
+ "send": "Send",
+ "reply": "Reply",
+ "expandReplies": "Expand Replies",
+ "collapseReplies": "Collapse Replies",
+ "loadMoreReplies": "Load More Replies",
+ "loadMoreComments": "Load More Comments",
+ "commentPlaceholder": "Enter comment...",
+ "replyPlaceholder": "Reply to @{name}",
+ "noImage": "No Image"
+ },
+ "stats": {
+ "likes": "Likes",
+ "comments": "Comments",
+ "views": "Views",
+ "shares": "Shares",
+ "clicks": "Clicks",
+ "impressions": "Impressions",
+ "favorites": "Favorites"
+ },
+ "mediaTypes": {
+ "video": "Video",
+ "image": "Image",
+ "article": "Article"
+ }
+}
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/login.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/login.json
index d803853f..1acab3da 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/login.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/login.json
@@ -6,6 +6,10 @@
"or": "or",
"forgotPassword": "Forgot Password?",
"completeRegistration": "Complete Registration",
+ "emailCode": "Email Verification Code",
+ "emailCodeRequired": "Please enter email verification code",
+ "emailCodeLength": "Verification code must be 6 digits",
+ "enterEmailCode": "Enter email verification code",
"setPassword": "Set Password",
"passwordRequired": "Please enter your password",
"passwordMinLength": "Password must be at least 6 characters",
@@ -13,6 +17,7 @@
"inviteCode": "Invite Code (Optional)",
"enterInviteCode": "Enter invite code",
"waitingForActivation": "Waiting for activation...",
+ "registering": "Registering...",
"loginSuccess": "Login successful",
"loginFailed": "Login failed",
"loginError": "Login failed, please try again later",
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json
index 1369539d..18623b79 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/profile.json
@@ -174,5 +174,16 @@
"title": "Delete your account",
"desc": "When you delete your account, you lose access to Aitoearn services and we permanently delete your personal data.",
"apply": "Delete Account"
+ },
+ "messages": {
+ "getPointsRecordsFailed": "Failed to get points records",
+ "verificationCodeSent": "Verification code sent",
+ "getVerificationCodeFailed": "Failed to get verification code",
+ "accountCancelledSuccess": "Account cancelled successfully",
+ "priceId": "Price ID"
+ },
+ "memberTypes": {
+ "oneTime": "One-time",
+ "trial": "Trial"
}
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json
index 48ec7f74..2f915b76 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/publish.json
@@ -22,8 +22,10 @@
"publishFailed": "Failed",
"publishing": "Publishing",
"publishSuccess": "Success",
- "waitingPublish": "Waiting"
+ "waitingPublish": "Waiting",
+ "unknown": "Unknown"
},
+ "creationInfo": "You created this on {{date}}",
"form": {
"title": "Title",
"titlePlaceholder": "Enter title",
@@ -46,8 +48,13 @@
"categoryPlaceholder": "Select category",
"categoryPlaceholderDisabled": "Select region first",
"board": "Board",
- "boardPlaceholder": "Select Board"
+ "boardPlaceholder": "Select Board",
+ "location": "Location",
+ "searchLocation": "Search location",
+ "selectLocation": "Select location",
+ "descriptionPlaceholder": "Start writing"
},
+ "writingAssistant": "Easiest Essay Writer",
"upload": {
"finishingUp": "Finishing up...",
"uploadImageOrVideo": "Upload image or video",
@@ -76,7 +83,28 @@
"sourceRequired": "Source must be filled when reprinting!",
"pageRequired": "You must select a page!",
"boardRequired": "You must select a Board!",
- "coverSizeError": "Cover minimum size 400*400!"
+ "coverSizeError": "Cover minimum size 400*400!",
+ "imageOnly": "Images already exist, you can only upload more images, not videos!",
+ "videoOnly": "Videos already exist, you can only upload more videos, not images!",
+ "imageVideoMixed": "Images and videos cannot be uploaded together!",
+ "onlyImageOrVideo": "Only image or video files can be uploaded!",
+ "videoMaxExceeded": "The number of videos uploaded cannot exceed {{maxCount}}",
+ "instagramImageValidation": "For best results on your Instagram Grid and Feed, we recommend uploading images with a 4:5 aspect ratio.",
+ "facebookReelDuration": "Facebook Reel video duration must be 3–90 seconds",
+ "facebookStoryDuration": "Facebook Story video duration must be 3–4 hours",
+ "instagramVideoSize": "Instagram video size cannot exceed 100MB",
+ "instagramReelDuration": "Instagram Reel video duration must be 5 seconds–15 minutes",
+ "instagramStoryDuration": "Instagram Story video duration must be 3–60 seconds",
+ "threadsVideoSize": "Threads video size cannot exceed 1GB",
+ "threadsVideoDuration": "Threads video duration must be greater than 0 and no more than 5 minutes",
+ "threadsImageMin": "Threads requires at least two images",
+ "pinterestVideoDuration": "Pinterest video duration must be 4 seconds–15 minutes",
+ "pinterestVideoSize": "Pinterest video size cannot exceed 1GB",
+ "tiktokVideoDuration": "TikTok video duration must be 3 seconds to 10 minutes",
+ "tiktokVideoSize": "TikTok video size cannot exceed 1GB",
+ "tiktokVideoMinResolution": "TikTok video minimum resolution is 360x360",
+ "twitterVideoDuration": "Twitter video duration must be 0.5–140 seconds",
+ "twitterVideoSize": "Twitter video size cannot exceed 512MB"
},
"preview": {
"title": "Preview",
@@ -115,7 +143,8 @@
"checkingContent": "Checking...",
"contentSafe": "Content Safe",
"riskLevel": "Level:",
- "contentUnsafe": "Content Unsafe"
+ "contentUnsafe": "Content Unsafe",
+ "preview": "Preview"
},
"badges": {
"offline": "Offline",
@@ -148,5 +177,6 @@
"branded": "By posting, you agree to TikTok's Branded Content Policy and Music Usage Confirmation.",
"both": "By posting, you agree to TikTok's Branded Content Policy and Music Usage Confirmation."
}
- }
-}
\ No newline at end of file
+ },
+ "previewvideo": "Preview Video"
+}
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json
index fac2983c..bfbd32f8 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/route.json
@@ -1,6 +1,6 @@
{
"home": "Home",
- "accounts": "Accounts",
+ "accounts": "Publish",
"publish": "Publish",
"hotContent": "Hot Content",
"hotContentNew": "Hot Content New",
@@ -8,7 +8,7 @@
"tasks": "Tasks",
"interactive": "Engage",
"engagement": "Engagement",
- "dataStatistics": "Data Statistics",
+ "dataStatistics": "Data",
"navigation": "Navigation",
"aiRank": "AI Rank"
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json
index 1b90eb16..cb6aac5c 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/en/vip.json
@@ -39,6 +39,17 @@
"month": "Monthly",
"year": "Yearly"
},
+ "planTitles": {
+ "month": "Monthly Member",
+ "year": "Yearly Member",
+ "onceMonth": "Monthly Member"
+ },
+ "selectDuration": "Select Duration",
+ "autoRenewal": "Auto-renewal, cancel anytime",
+ "priceUnits": {
+ "month": "/month",
+ "year": "/year"
+ },
"subscriptionManagement": "Subscription Management",
"subscriptionPlanManagement": "Subscription Plan Management",
"subscriptionPlans": "Plans",
@@ -79,6 +90,8 @@
"yearly2": "Yearly",
"yearly": "Yearly PLUS",
"singleMonth": "Single Month",
+ "trial": "Trial",
+ "cancelled": "Cancelled",
"expireTime": "Expire Time",
"xufeiTime": "Renewal Time",
"remainingPoints": "Remaining Points",
@@ -122,7 +135,7 @@
"description": "Up to 150+ video gens/month",
"features": {
"contentReview": "Content safety review",
- "dailyPoints": "Free nano, banana image models (limited)",
+ "dailyPoints": "Free Nano Banana, Sora-2 unlimited use",
"multiModel": "GPT-5, Gemini 2.5 Pro",
"textToVideo": "Douyin、Redbook、Kwai、Bilibli,Wechat、TikTok、YouTube、Facebook、Instagram.Threads、Twitter(X)、Pinterest All major platforms",
"aiGeneration": "Unlimited channel links",
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json
index f589f809..e9adf3ad 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/account.json
@@ -41,14 +41,18 @@
"fetchError": "获取页面列表失败",
"submitError": "页面选择失败",
"submitSuccess": "页面选择成功",
- "selectAtLeastOne": "请至少选择一个页面"
+ "selectAtLeastOne": "请至少选择一个页面",
+ "noPagesMessage": "您还没有创建任何Facebook页面",
+ "createPageTip": "点击上方链接创建页面,然后点击刷新按钮",
+ "createPageLink": "创建Facebook页面",
+ "refresh": "刷新"
},
"listMode": {
"title": "发布计划列表",
"recordCount": "共 {{count}} 条发布计划",
"newWork": "新建作品",
"noRecords": "暂无发布计划",
- "queue": "列表",
+ "queue": "我的发布",
"sent": "发布历史",
"createdDaysAgo": "您于 {{days}} 天前创建",
"viewPost": "查看帖子",
@@ -64,6 +68,10 @@
"error": "IP信息获取失败",
"tooltip": "ASN: {{asn}}\n组织: {{org}}"
},
+ "ipType": {
+ "direct": "直连",
+ "proxy": "代理"
+ },
"createSpace": {
"title": "新建空间",
"button": "新建空间",
@@ -101,10 +109,37 @@
"platform": "平台",
"space": "所属列表"
},
+ "deleteAccount": "删除账户",
+ "messages": {
+ "ipLocationError": "获取IP地理位置信息失败",
+ "createSpaceFirst": "请先创建空间",
+ "deleteSuccess": "删除成功",
+ "facebookAuthFailed": "Facebook授权失败",
+ "unsupportedPlatform": "未支持的平台类型",
+ "accountListRefreshed": "账号列表已刷新",
+ "refreshAccountListFailed": "刷新账号列表失败",
+ "authFailed": "授权失败",
+ "pleaseRetry": "请重试",
+ "platformNotSupported": "暂不支持 {{platform}} 平台的直接授权",
+ "sortSuccess": "排序成功",
+ "sortFailed": "排序失败"
+ },
"rednote": "小红书",
"kwai": "快手",
"bilibili": "哔哩哔哩",
"wxgzh": "微信公众号",
"douyin": "抖音",
- "wxsph": "微信视频号"
+ "wxsph": "微信视频号",
+ "deleteConfirm": {
+ "title": "删除提示",
+ "content": "是否删除以下 {{count}} 个账号?",
+ "cancel": "取消",
+ "confirm": "确认"
+ },
+ "mobileOnlySupport": "移动端支持",
+ "reauthConfirm": {
+ "title": "会话已过期",
+ "content": "您的 {{platformName}} 账号 \"{{nickname}}\"(位于 {{spaceName}})会话已过期。是否重新登录?",
+ "loginAgain": "重新登录"
+ }
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/home.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/home.json
index 97d827a9..d715d746 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/home.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/home.json
@@ -6,6 +6,7 @@
"header": {
"logo": "Aitoearn",
"nav": {
+ "home": "首页",
"marketplace": "市场",
"pricing": "价格",
"status": "状态",
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/imageEditor.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/imageEditor.json
new file mode 100644
index 00000000..f1837ec4
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/imageEditor.json
@@ -0,0 +1,79 @@
+{
+ "Load": "加载本地",
+ "Download": "下载当前",
+ "Custom": "自定义",
+ "Square": "正方形",
+ "Apply": "应用",
+ "Cancel": "取消",
+ "Free": "自由设定",
+ "Straight": "直线",
+ "Color": "颜色",
+ "Range": "粗细",
+ "Grayscale": "灰度",
+ "Invert": "旋转",
+ "Sepia": "深褐色",
+ "Sepia2": "深褐色2",
+ "Blur": "模糊",
+ "Sharpen": "锐化",
+ "Emboss": "浮雕",
+ "Remove White": "消除白色",
+ "Distance": "边距",
+ "Brightness": "亮度",
+ "Noise": "降噪",
+ "Pixelate": "像素化",
+ "Color Filter": "颜色过滤",
+ "Threshold": "阈值",
+ "Tint": "色调",
+ "Multiply": "复合",
+ "Flip X": "镜像",
+ "Flip Y": "翻转",
+ "Reset": "重置",
+ "Arrow-1": "箭头1",
+ "Arrow-2": "箭头2",
+ "Arrow-3": "箭头3",
+ "Star-1": "星形1",
+ "Star-2": "星形2",
+ "Polygon": "多边形",
+ "Location": "定位",
+ "Heart": "心形",
+ "Bubble": "气泡",
+ "Custom icon": "自定义图标",
+ "Load Mask Image": "加载水印",
+ "Width": "宽",
+ "Height": "高",
+ "Lock Aspect Ratio": "保持尺寸比例",
+ "Rectangle": "矩形",
+ "Circle": "圆形",
+ "Triangle": "三角形",
+ "Fill": "填充",
+ "Stroke": "画笔",
+ "Bold": "加粗",
+ "Italic": "斜体",
+ "Underline": "下划线",
+ "Left": "居左",
+ "Center": "居中",
+ "Right": "居右",
+ "Text size": "字体大小",
+ "Zoom In": "放大",
+ "Zoom Out": "缩小",
+ "ZoomIn": "放大",
+ "ZoomOut": "缩小",
+ "Hand": "拖动",
+ "Resize": "尺寸",
+ "Crop": "裁剪",
+ "Flip": "翻转",
+ "Rotate": "旋转",
+ "Draw": "画笔",
+ "Shape": "形状",
+ "Icon": "图标",
+ "Text": "文字",
+ "Mask": "水印",
+ "Filter": "滤镜",
+ "History": "历史动作",
+ "Undo": "撤退",
+ "Redo": "重做",
+ "Delete": "去除",
+ "DeleteAll": "全部去除",
+ "Blend": "混合",
+ "imageEditing": "图像编辑"
+}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/interactive.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/interactive.json
new file mode 100644
index 00000000..dc1c066b
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/interactive.json
@@ -0,0 +1,41 @@
+{
+ "title": "互动管理",
+ "messages": {
+ "pleaseLoginFirst": "请先登录",
+ "commentSuccess": "评论成功",
+ "commentFailed": "评论失败,请重试",
+ "replySuccess": "回复成功",
+ "replyFailed": "回复失败,请重试"
+ },
+ "ui": {
+ "selectChannel": "请在左侧选择需要互动的频道",
+ "selectChannelDesc": "选择一个账号后,将自动加载该频道的最新作品与评论互动功能。",
+ "loadMore": "加载更多",
+ "noMorePosts": "没有更多作品",
+ "loading": "加载中...",
+ "sending": "发送中...",
+ "send": "发送",
+ "reply": "回复",
+ "expandReplies": "展开回复",
+ "collapseReplies": "收起回复",
+ "loadMoreReplies": "加载更多回复",
+ "loadMoreComments": "加载更多评论",
+ "commentPlaceholder": "输入评论...",
+ "replyPlaceholder": "回复@{name}",
+ "noImage": "无图片"
+ },
+ "stats": {
+ "likes": "点赞",
+ "comments": "评论",
+ "views": "浏览",
+ "shares": "分享",
+ "clicks": "点击",
+ "impressions": "曝光",
+ "favorites": "收藏"
+ },
+ "mediaTypes": {
+ "video": "视频",
+ "image": "图片",
+ "article": "文章"
+ }
+}
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/login.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/login.json
index fa2b2d92..75455566 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/login.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/login.json
@@ -6,6 +6,10 @@
"or": "或",
"forgotPassword": "忘记密码?",
"completeRegistration": "完成注册",
+ "emailCode": "邮箱验证码",
+ "emailCodeRequired": "请输入邮箱验证码",
+ "emailCodeLength": "验证码长度为6位",
+ "enterEmailCode": "请输入邮箱验证码",
"setPassword": "设置密码",
"passwordRequired": "请输入密码",
"passwordMinLength": "密码长度不能小于6位",
@@ -13,6 +17,7 @@
"inviteCode": "邀请码(选填)",
"enterInviteCode": "请输入邀请码",
"waitingForActivation": "等待激活中...",
+ "registering": "注册中...",
"loginSuccess": "登录成功",
"loginFailed": "登录失败",
"loginError": "登录失败,请稍后重试",
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json
index 4b13f6fb..b9c715a2 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/profile.json
@@ -174,5 +174,16 @@
"title": "删除你的账户",
"desc": "删除账户后,你将无法继续使用 Aitoearn 服务,我们也会永久删除你的个人数据。",
"apply": "申请注销"
+ },
+ "messages": {
+ "getPointsRecordsFailed": "获取积分记录失败",
+ "verificationCodeSent": "验证码已发送",
+ "getVerificationCodeFailed": "获取验证码失败",
+ "accountCancelledSuccess": "账户注销成功",
+ "priceId": "价格ID"
+ },
+ "memberTypes": {
+ "oneTime": "一次性",
+ "trial": "试用"
}
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json
index 6df0a8f8..786692b8 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/publish.json
@@ -22,8 +22,10 @@
"publishFailed": "发布失败",
"publishing": "发布中",
"publishSuccess": "发布成功",
- "waitingPublish": "等待发布"
+ "waitingPublish": "等待发布",
+ "unknown": "未知状态"
},
+ "creationInfo": "您于 {{date}} 创建了此内容",
"form": {
"title": "标题",
"titlePlaceholder": "请输入标题",
@@ -46,8 +48,14 @@
"categoryPlaceholder": "请选择视频分类",
"categoryPlaceholderDisabled": "请先选择国区",
"board": "Board",
- "boardPlaceholder": "请选择Board"
+ "boardPlaceholder": "请选择Board",
+ "location": "位置",
+ "searchLocation": "搜索位置",
+ "selectLocation": "请选择位置",
+ "description": "描述",
+ "descriptionPlaceholder": "开始写"
},
+ "writingAssistant": "写作助手",
"upload": {
"finishingUp": "正在完成...",
"uploadImageOrVideo": "上传图片或视频",
@@ -64,7 +72,6 @@
"titleMaxExceeded": "{{platformName}}标题最多{{maxCount}}字",
"descriptionMaxExceeded": "{{platformName}}描述最多{{maxCount}}字",
"descriptionRequired": "描述是必须的",
- "imageMaxExceeded": "{{platformName}}图片最多不能超过{{maxCount}}张",
"uploadImageOrVideo": "请上传图片或视频",
"uploadImage": "请上传图片",
"uploadVideo": "请上传视频",
@@ -76,7 +83,29 @@
"sourceRequired": "转载时必须填写转载来源!",
"pageRequired": "您必须选择页面!",
"boardRequired": "您必须选择Board!",
- "coverSizeError": "封面最小尺寸400*400!"
+ "coverSizeError": "封面最小尺寸400*400!",
+ "imageOnly": "已有图片,仅可继续上传图片,不能上传视频!",
+ "videoOnly": "已有视频,仅可继续上传视频,不能上传图片!",
+ "imageVideoMixed": "图片和视频不能混合上传!",
+ "onlyImageOrVideo": "只能上传图片或视频文件!",
+ "videoMaxExceeded": "视频上传数量不能大于{{maxCount}}",
+ "imageMaxExceeded": "图片上传数量不能大于{{maxCount}}",
+ "instagramImageValidation": "在 Instagram 网格和动态中获得最佳效果,建议上传 4:5 比例的图片。",
+ "facebookReelDuration": "Facebook Reel视频时长需为3–90秒",
+ "facebookStoryDuration": "Facebook Story视频时长需为3–4小时",
+ "instagramVideoSize": "Instagram视频大小不能超过100MB",
+ "instagramReelDuration": "Instagram Reel视频时长需为5秒–15分钟",
+ "instagramStoryDuration": "Instagram Story视频时长需为3–60秒",
+ "threadsVideoSize": "Threads视频大小不能超过1GB",
+ "threadsVideoDuration": "Threads视频时长需为0秒以上且不超过5分钟",
+ "threadsImageMin": "Threads图片至少需要两张",
+ "pinterestVideoDuration": "Pinterest视频时长需为4秒–15分钟",
+ "pinterestVideoSize": "Pinterest视频大小不能超过1GB",
+ "tiktokVideoDuration": "TikTok视频时长需为3秒至10分钟",
+ "tiktokVideoSize": "TikTok视频大小不能超过1GB",
+ "tiktokVideoMinResolution": "TikTok视频最小分辨率为360x360",
+ "twitterVideoDuration": "Twitter视频时长需为0.5秒–140秒",
+ "twitterVideoSize": "Twitter视频大小不能超过512MB"
},
"preview": {
"title": "预览",
@@ -115,7 +144,8 @@
"checkingContent": "检测中...",
"contentSafe": "内容安全",
"riskLevel": "等级:",
- "contentUnsafe": "内容不安全"
+ "contentUnsafe": "内容不安全",
+ "preview": "点击查看"
},
"badges": {
"offline": "已离线",
@@ -148,5 +178,6 @@
"branded": "发布即表示您同意 TikTok 的品牌内容政策音乐使用确认。",
"both": "发布即表示您同意 TikTok 的品牌内容政策音乐使用确认。"
}
- }
-}
\ No newline at end of file
+ },
+ "previewvideo": "预览视频"
+}
diff --git a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json
index 2e9bdce8..3c2d9b9c 100644
--- a/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json
+++ b/aitoearn_web/aitoearn-web/src/app/i18n/locales/zh-CN/vip.json
@@ -39,6 +39,17 @@
"month": "月度订阅",
"year": "年度订阅"
},
+ "planTitles": {
+ "month": "月费会员",
+ "year": "年费会员",
+ "onceMonth": "月度会员"
+ },
+ "selectDuration": "选择开通时长",
+ "autoRenewal": "自动续订,随时取消",
+ "priceUnits": {
+ "month": "/月",
+ "year": "/年"
+ },
"subscriptionManagement": "订阅管理",
"subscriptionPlanManagement": "订阅计划管理",
"subscriptionPlans": "订阅计划",
@@ -79,6 +90,8 @@
"yearly": "连续包年PLUS会员",
"yearly2": "年度会员",
"singleMonth": "单月会员",
+ "trial": "试用中",
+ "cancelled": "已退订",
"expireTime": "到期时间",
"xufeiTime": "续费时间",
"remainingPoints": "剩余积分",
diff --git a/aitoearn_web/aitoearn-web/src/app/layout/HomeHeader.tsx b/aitoearn_web/aitoearn-web/src/app/layout/HomeHeader.tsx
index 1299a23a..faeb90d7 100644
--- a/aitoearn_web/aitoearn-web/src/app/layout/HomeHeader.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/layout/HomeHeader.tsx
@@ -7,16 +7,17 @@ import Image from "next/image";
import logo from "@/assets/images/logo.png";
import Link from "next/link";
import { Button } from "antd";
-import { GlobalOutlined, MenuOutlined, CloseOutlined } from "@ant-design/icons";
+import { MenuOutlined, CloseOutlined } from "@ant-design/icons";
import { removeLocalePrefix } from "@/app/layout/layout.utils";
import { homeHeaderRouterData } from "@/app/layout/routerData";
+import LanguageSwitcher from "@/components/common/LanguageSwitcher";
-export interface IHomeHeaderRef {}
+export interface IHomeHeaderRef { }
-export interface IHomeHeaderProps {}
+export interface IHomeHeaderProps { }
const HomeHeader = memo(
- forwardRef(({}: IHomeHeaderProps, ref: ForwardedRef<IHomeHeaderRef>) => {
+ forwardRef(({ }: IHomeHeaderProps, ref: ForwardedRef<IHomeHeaderRef>) => {
const pathname = usePathname();
const { t } = useTransClient("home");
const router = useRouter();
@@ -24,16 +25,6 @@ const HomeHeader = memo(
const currentPath = removeLocalePrefix(pathname).replace(/\/+$/, "") || "/";
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
- /**
- * 切换语言
- */
- const toggleLanguage = () => {
- const newLng = userStore.lang === "zh-CN" ? "en" : "zh-CN";
- userStore.setLang(newLng);
- router.push(
- `/${newLng}${location.pathname.replace(`/${userStore.lang}`, "")}`,
- );
- };
/**
* 切换移动端菜单显示状态
@@ -72,10 +63,13 @@ const HomeHeader = memo(
<Image src={logo} alt="logo" width={50} />
<span className={styles.logoText}>{t("header.logo")}</span>
</div>
-
+
{/* 桌面端导航 */}
<nav className={styles.nav}>
{homeHeaderRouterData.value.map((v) => {
+ if (v.href === "/") {
+ return null;
+ }
return (
<Link
key={v.title}
@@ -92,14 +86,10 @@ const HomeHeader = memo(
</nav>
<div className={styles.headerRight}>
- <Button
- type="text"
- icon={<GlobalOutlined />}
- onClick={toggleLanguage}
+ <LanguageSwitcher
className={styles.languageButton}
- >
- {userStore.lang === "zh-CN" ? "EN" : "中文"}
- </Button>
+ size="small"
+ />
{/* 移动端菜单按钮 */}
<button
@@ -140,9 +130,12 @@ const HomeHeader = memo(
<CloseOutlined />
</button>
</div>
-
+
<nav className={styles.mobileMenuNav}>
{homeHeaderRouterData.value.map((v) => {
+ if (v.href === "/") {
+ return null;
+ }
return (
<Link
key={v.title}
@@ -159,14 +152,10 @@ const HomeHeader = memo(
</nav>
<div className={styles.mobileMenuFooter}>
- <Button
- type="text"
- icon={<GlobalOutlined />}
- onClick={toggleLanguage}
+ <LanguageSwitcher
className={styles.mobileLanguageButton}
- >
- {userStore.lang === "zh-CN" ? "EN" : "中文"}
- </Button>
+ size="small"
+ />
</div>
</div>
</>
diff --git a/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx b/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx
index ef4e6170..b2ed5a94 100644
--- a/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/layout/LyaoutHeader.tsx
@@ -8,21 +8,23 @@ import Image from "next/image";
import LayoutNav from "@/app/layout/layoutNav";
import { NoSSR } from "@kwooshung/react-no-ssr";
import { Button, Dropdown, MenuProps, Badge, Tooltip } from "antd";
-import logo from "@/assets/images/logo.png";
import {
BellOutlined,
CaretDownOutlined,
- GlobalOutlined,
CrownOutlined,
InfoCircleOutlined,
} from "@ant-design/icons";
import { useRouter } from "next/navigation";
import { useTransClient } from "@/app/i18n/client";
+import { useGetClientLng } from "@/hooks/useSystem";
import NotificationPanel from "@/components/notification/NotificationPanel";
import { useNotification } from "@/hooks/useNotification";
import SignInCalendar from "@/components/SignInCalendar";
import VipContentModal from "@/components/modals/VipContentModal";
import PointsDetailModal from "@/components/modals/PointsDetailModal";
+import LanguageSwitcher from "@/components/common/LanguageSwitcher";
+
+import logo from "@/assets/images/logo.png";
export interface ILyaoutHeaderRef {}
@@ -33,6 +35,7 @@ function UserInfo() {
const router = useRouter();
const { t } = useTransClient("common");
const { t: tVip } = useTransClient("vip");
+ const lng = useGetClientLng();
const items: MenuProps["items"] = [
{
@@ -40,7 +43,7 @@ function UserInfo() {
label: (
<div
onClick={() => {
- router.push("/profile");
+ router.push(`/${lng}/profile`);
}}
>
{t("profile")}
@@ -52,7 +55,7 @@ function UserInfo() {
label: (
<div
onClick={() => {
- router.push("/material");
+ router.push(`/${lng}/material`);
}}
>
{t("header.materialLibrary")}
@@ -64,7 +67,7 @@ function UserInfo() {
label: (
<div
onClick={() => {
- router.push("/cgmaterial");
+ router.push(`/${lng}/cgmaterial`);
}}
>
{t("header.draftBox")}
@@ -76,7 +79,7 @@ function UserInfo() {
label: (
<div
onClick={() => {
- router.push("/income");
+ router.push(`/${lng}/income`);
}}
>
{t("header.income" as any)}
@@ -88,7 +91,7 @@ function UserInfo() {
label: (
<div
onClick={() => {
- router.push("/wallet");
+ router.push(`/${lng}/wallet`);
}}
>
{t("header.wallet" as any)}
@@ -100,7 +103,7 @@ function UserInfo() {
// label: (
// <div
// onClick={() => {
- // router.push("/notification");
+ // router.push(`/${lng}/notification`);
// }}
// >
// {t("header.messages")}
@@ -114,7 +117,7 @@ function UserInfo() {
<div
onClick={() => {
useUserStore.getState().logout();
- router.push("/");
+ router.push(`/${lng}/`);
}}
>
{t("logout")}
@@ -136,7 +139,7 @@ function UserInfo() {
style={{ borderRadius: '50%', backgroundColor: '#e9d5ff', padding: '3px' }}
/>
<div className={styles["layoutHeader-userinfo-name"]}>
- {userInfo.name || t("unknownUser")}
+ {userInfo?.name || t("unknownUser")}
</div>
<CaretDownOutlined />
</div>
@@ -152,18 +155,12 @@ const LyaoutHeader = memo(
const router = useRouter();
const { t } = useTransClient("common");
const { t: tVip } = useTransClient("vip");
+ const lng = useGetClientLng();
const [notificationVisible, setNotificationVisible] = useState(false);
const [vipModalVisible, setVipModalVisible] = useState(false);
const [pointsModalVisible, setPointsModalVisible] = useState(false);
const { unreadCount } = useNotification();
- const toggleLanguage = () => {
- const newLng = userStore.lang === "zh-CN" ? "en" : "zh-CN";
- userStore.setLang(newLng);
- router.push(
- `/${newLng}${location.pathname.replace(`/${userStore.lang}`, "")}`,
- );
- };
return (
<>
@@ -182,14 +179,17 @@ const LyaoutHeader = memo(
className={styles["layoutHeader_wrapper-right"]}
suppressHydrationWarning={true}
>
- <Button
- type="text"
- icon={<GlobalOutlined />}
- onClick={toggleLanguage}
+ <LanguageSwitcher
className={styles.languageButton}
- >
- {userStore.lang === "zh-CN" ? "EN" : "中文"}
- </Button>
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: '8px',
+ padding: '4px 8px',
+ height: 'auto',
+ fontSize: '12px',
+ }}
+ />
<NoSSR>
{userStore.token && (
<SignInCalendar className={styles.signInCalendarButton} />
@@ -244,7 +244,7 @@ const LyaoutHeader = memo(
) : (
<Button
onClick={() => {
- router.push("/login");
+ router.push(`/${lng}/login`);
}}
>
{t("login")}
diff --git a/aitoearn_web/aitoearn-web/src/app/layout/layoutNav.tsx b/aitoearn_web/aitoearn-web/src/app/layout/layoutNav.tsx
index a78800c9..17dbd283 100644
--- a/aitoearn_web/aitoearn-web/src/app/layout/layoutNav.tsx
+++ b/aitoearn_web/aitoearn-web/src/app/layout/layoutNav.tsx
@@ -13,6 +13,7 @@ import React, { useEffect, useRef, useState } from "react";
import { Drawer, Menu } from "antd";
import { useRouter, useSelectedLayoutSegments } from "next/navigation";
import { useTransClient } from "@/app/i18n/client";
+import { useGetClientLng } from "@/hooks/useSystem";
/**
*
@@ -21,11 +22,16 @@ import { useTransClient } from "@/app/i18n/client";
*/
function getNameTag(child: IRouterDataItem, iconLoca: number = 1) {
const { t } = useTransClient("route");
+ const lng = useGetClientLng();
const path = child.path || "/";
+
+ // 确保路径包含语言前缀
+ const fullPath = path.startsWith('/') ? `/${lng}${path}` : `/${lng}/${path}`;
+
return (
<>
{!child.children ? (
- <Link href={path || "/"} target={path[0] === "/" ? "_self" : "_blank"}>
+ <Link href={fullPath} target={path[0] === "/" ? "_self" : "_blank"}>
{t(child.translationKey as any)}
</Link>
) : (
@@ -70,7 +76,10 @@ function ParcelTag({
if (child.children) {
return <>{children}</>;
} else {
- return <Link href={child.path || "/"}>{children}</Link>;
+ const lng = useGetClientLng();
+ const path = child.path || "/";
+ const fullPath = path.startsWith('/') ? `/${lng}${path}` : `/${lng}/${path}`;
+ return <Link href={fullPath}>{children}</Link>;
}
}
@@ -166,7 +175,7 @@ function NavPC() {
const timer = useRef<NodeJS.Timeout>();
const route = useSelectedLayoutSegments();
const { t } = useTransClient("route");
-
+
let currRouter = "/";
if (route.length === 1) {
currRouter = route[0];
@@ -213,6 +222,7 @@ function NavPE() {
const [open, setOpen] = useState(false);
const router = useRouter();
const { t } = useTransClient("route");
+ const lng = useGetClientLng();
const translatedMenuItems = routerData.map((item) => ({
key: item.path || item.name,
@@ -223,6 +233,28 @@ function NavPE() {
})),
}));
+ const handleMenuClick = (e: { key: string }) => {
+ // 确保使用当前语言前缀
+ const targetPath = e.key.startsWith('/') ? e.key : `/${e.key}`;
+ const fullPath = `/${lng}${targetPath}`;
+
+ // 调试信息
+ console.log('Menu click debug:', {
+ key: e.key,
+ lng,
+ targetPath,
+ fullPath,
+ currentPath: window.location.pathname
+ });
+
+ // 先关闭菜单
+ setOpen(false);
+
+ // 使用 window.location.href 进行跳转,确保完全重新加载页面
+ // 这样可以避免路由状态混乱的问题
+ window.location.href = fullPath;
+ };
+
return (
<div className={styles.layoutNavPE}>
<div onClick={() => setOpen(true)} className={styles["layoutNavPE-menu"]}>
@@ -238,10 +270,7 @@ function NavPE() {
<Menu
className="layoutNavPE-menu"
selectable={false}
- onClick={(e) => {
- router.push(e.key);
- setOpen(false);
- }}
+ onClick={handleMenuClick}
style={{ width: "100%" }}
mode="inline"
items={translatedMenuItems}
diff --git a/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts b/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts
index 7e84d8f1..072aacb5 100644
--- a/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts
+++ b/aitoearn_web/aitoearn-web/src/app/layout/routerData.ts
@@ -25,10 +25,15 @@ export const routerData: IRouterDataItem[] = [
// path: "/",
// },
{
- name: "账户",
+ name: "发布",
translationKey: "accounts",
path: "/accounts",
},
+ {
+ name: "互动数据",
+ translationKey: "interactive",
+ path: "/interactive",
+ },
// {
// name: "热门内容",
// translationKey: "hotContent",
@@ -44,21 +49,13 @@ export const routerData: IRouterDataItem[] = [
translationKey: "tasks",
path: "/tasks",
},
- {
- name: "互动数据",
- translationKey: "interactive",
- path: "/interactive",
- },
+
{
name: "数据统计",
translationKey: "dataStatistics",
path: "/dataStatistics",
},
- {
- name: "Chat",
- translationKey: "Chat",
- path: "/appChat",
- },
+
];
const recursion = (
@@ -90,7 +87,7 @@ export const homeHeaderRouterData = {
return [
{
href: "/",
- title: "",
+ title: directTrans("home", "header.nav.home"),
},
{
href: "/pricing",
diff --git a/aitoearn_web/aitoearn-web/src/app/layout/styles/layoutNav.module.scss b/aitoearn_web/aitoearn-web/src/app/layout/styles/layoutNav.module.scss
index b6802de1..cfd239ef 100644
--- a/aitoearn_web/aitoearn-web/src/app/layout/styles/layoutNav.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/layout/styles/layoutNav.module.scss
@@ -1,3 +1,8 @@
+.languageDropdown {
+ border: 1px solid #ccc;
+}
+
+
.layoutNavPC {
display: flex;
align-items: center;
diff --git a/aitoearn_web/aitoearn-web/src/app/layout/styles/lyaoutHeader.module.scss b/aitoearn_web/aitoearn-web/src/app/layout/styles/lyaoutHeader.module.scss
index 54f8a7c3..d9e306b6 100644
--- a/aitoearn_web/aitoearn-web/src/app/layout/styles/lyaoutHeader.module.scss
+++ b/aitoearn_web/aitoearn-web/src/app/layout/styles/lyaoutHeader.module.scss
@@ -91,9 +91,9 @@
display: flex;
align-items: center;
justify-content: center;
- width: 40px;
- height: 40px;
- border-radius: 50%;
+ border: 1px solid #EBEDEC;
+ height: 60px;
+ border-radius: 30px;
transition: all 0.3s ease;
&:hover {
@@ -172,7 +172,35 @@
.languageButton {
color: #333;
+ border: 1px solid #EBEDEC;
+ border-radius: 6px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ background: #fff;
+
&:hover {
color: #1890ff;
+ border-color: #40a9ff;
+ }
+}
+
+.languageDropdown {
+ :global {
+ .ant-dropdown-menu {
+ border: 1px solid #EBEDEC;
+ border-radius: 6px;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+ padding: 4px 0;
+ min-width: 140px;
+ }
+
+ .ant-dropdown-menu-item {
+ padding: 8px 12px;
+ border-radius: 4px;
+ margin: 2px 4px;
+
+ &:hover {
+ background-color: #f5f5f5;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/assets/images/faya.png b/aitoearn_web/aitoearn-web/src/assets/images/faya.png
new file mode 100644
index 00000000..0f80099a
Binary files /dev/null and b/aitoearn_web/aitoearn-web/src/assets/images/faya.png differ
diff --git a/aitoearn_web/aitoearn-web/src/assets/images/jiantou.png b/aitoearn_web/aitoearn-web/src/assets/images/jiantou.png
new file mode 100644
index 00000000..63cf38a0
Binary files /dev/null and b/aitoearn_web/aitoearn-web/src/assets/images/jiantou.png differ
diff --git a/aitoearn_web/aitoearn-web/src/assets/images/us.png b/aitoearn_web/aitoearn-web/src/assets/images/us.png
new file mode 100644
index 00000000..604694ed
Binary files /dev/null and b/aitoearn_web/aitoearn-web/src/assets/images/us.png differ
diff --git a/aitoearn_web/aitoearn-web/src/assets/images/zh.png b/aitoearn_web/aitoearn-web/src/assets/images/zh.png
new file mode 100644
index 00000000..11817cc5
Binary files /dev/null and b/aitoearn_web/aitoearn-web/src/assets/images/zh.png differ
diff --git a/aitoearn_web/aitoearn-web/src/components/Chat/index.tsx b/aitoearn_web/aitoearn-web/src/components/Chat/index.tsx
new file mode 100644
index 00000000..f8ac9282
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/Chat/index.tsx
@@ -0,0 +1,40 @@
+import { ForwardedRef, forwardRef, memo, useEffect, useState } from "react";
+import * as React from "react";
+import { useGetClientLng } from "@/hooks/useSystem";
+
+export interface IChatRef {}
+
+export interface IChatProps {
+ defaultMask?: string;
+}
+
+const Chat = memo(
+ forwardRef(({ defaultMask }: IChatProps, ref: ForwardedRef<IChatRef>) => {
+ const [iframeUrl, setIframeUrl] = useState("");
+ const lng = useGetClientLng();
+
+ useEffect(() => {
+ const base = location.origin.includes("localhost")
+ ? "https://dev.aitoearn.ai"
+ : location.origin;
+
+ const params = new URLSearchParams();
+ if (defaultMask) params.set("mask", defaultMask);
+ if (lng) params.set("lang", lng);
+
+ const qs = params.toString();
+ setIframeUrl(
+ `${base}/chat${qs ? `?${qs}` : ""}${defaultMask ? "#/new-chat" : "#/chat"}`,
+ );
+ }, [defaultMask, lng]);
+
+ return (
+ <iframe
+ src={iframeUrl}
+ style={{ height: "100%", border: "none", width: "100%" }}
+ />
+ );
+ }),
+);
+
+export default Chat;
diff --git a/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.module.scss b/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.module.scss
index e304cdef..62e8aca0 100644
--- a/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.module.scss
+++ b/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.module.scss
@@ -33,4 +33,48 @@
padding-bottom: 12px;
border-bottom: 1px solid #f0f0f0;
}
+
+ .noPagesContainer {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 40px 20px;
+ text-align: center;
+ }
+
+ .noPagesMessage {
+ font-size: 16px;
+ color: #666;
+ margin-bottom: 24px;
+ }
+
+ .createPageSection {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 16px;
+ }
+
+ .createPageLink {
+ font-size: 16px;
+ font-weight: 500;
+ color: #1890ff;
+ text-decoration: none;
+
+ &:hover {
+ color: #40a9ff;
+ text-decoration: underline;
+ }
+ }
+
+ .createPageTip {
+ font-size: 14px;
+ color: #999;
+ line-height: 1.5;
+ }
+
+ .refreshButton {
+ margin-top: 8px;
+ }
}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.tsx b/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.tsx
index a5881738..136ead3c 100644
--- a/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/FacebookPagesModal/index.tsx
@@ -1,10 +1,13 @@
import React, { useState, useEffect } from 'react';
-import { Modal, Checkbox, List, Button, message, Spin, Avatar } from 'antd';
+import { Modal, Checkbox, List, Button, message, Spin, Avatar, Typography } from 'antd';
+import { ReloadOutlined } from '@ant-design/icons';
import { apiGetFacebookPages, apiSubmitFacebookPages } from '@/api/plat/facebook';
import { useAccountStore } from '@/store/account';
import { useTranslation } from 'react-i18next';
import styles from './index.module.scss';
+const { Link } = Typography;
+
export interface FacebookPageItem {
id: string;
name: string;
@@ -131,32 +134,59 @@ const FacebookPagesModal: React.FC<FacebookPagesModalProps> = ({
</div>
<Spin spinning={loading}>
- <List
- className={styles.pageList}
- dataSource={pages}
- renderItem={(page) => (
- <List.Item className={styles.pageItem}>
- <Checkbox
- checked={selectedPageIds.includes(page.id)}
- onChange={(e) => handlePageChange(page.id, e.target.checked)}
- >
- <div className={styles.pageInfo}>
- <Avatar
- src={page.profile_picture_url}
- size={32}
- className={styles.pageAvatar}
- >
- {page.name?.charAt(0)}
- </Avatar>
- <span className={styles.pageName}>{page.name}</span>
+ {pages.length > 0 ? (
+ <List
+ className={styles.pageList}
+ dataSource={pages}
+ renderItem={(page) => (
+ <List.Item className={styles.pageItem}>
+ <Checkbox
+ checked={selectedPageIds.includes(page.id)}
+ onChange={(e) => handlePageChange(page.id, e.target.checked)}
+ >
+ <div className={styles.pageInfo}>
+ <Avatar
+ src={page.profile_picture_url}
+ size={32}
+ className={styles.pageAvatar}
+ >
+ {page.name?.charAt(0)}
+ </Avatar>
+ <span className={styles.pageName}>{page.name}</span>
+ </div>
+ </Checkbox>
+ </List.Item>
+ )}
+ />
+ ) : (
+ !loading && (
+ <div className={styles.noPagesContainer}>
+ <div className={styles.noPagesMessage}>
+ {t('facebookPages.noPagesMessage' as any)}
+ </div>
+ <div className={styles.createPageSection}>
+ <Link
+ href="https://www.facebook.com/pages/create"
+ target="_blank"
+ className={styles.createPageLink}
+ >
+ {t('facebookPages.createPageLink' as any)}
+ </Link>
+ <div className={styles.createPageTip}>
+ {t('facebookPages.createPageTip' as any)}
</div>
- </Checkbox>
- </List.Item>
- )}
- locale={{
- emptyText: loading ? t('facebookPages.loading' as any) : t('facebookPages.noPages' as any),
- }}
- />
+ <Button
+ type="primary"
+ icon={<ReloadOutlined />}
+ onClick={fetchPages}
+ className={styles.refreshButton}
+ >
+ {t('facebookPages.refresh' as any)}
+ </Button>
+ </div>
+ </div>
+ )
+ )}
</Spin>
</Modal>
);
diff --git a/aitoearn_web/aitoearn-web/src/components/ImageEditorModal/imageEditorModal.module.scss b/aitoearn_web/aitoearn-web/src/components/ImageEditorModal/imageEditorModal.module.scss
new file mode 100644
index 00000000..c1f5765a
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/ImageEditorModal/imageEditorModal.module.scss
@@ -0,0 +1,26 @@
+.imageEditorModal {
+ :global {
+ .tui-image-editor-container {
+ width: 100% !important;
+ }
+ .tui-image-editor-download-btn, .tui-image-editor-header-logo {
+ display: none !important;
+ }
+ .tui-colorpicker-palette-container {
+ & > ul {
+ &:nth-of-type(1) {
+ display: flex;
+ flex-wrap: wrap;
+ .tui-colorpicker-palette-button {
+ cursor: pointer;
+ width: 18px;
+ height: 18px;
+ }
+ }
+ }
+ span {
+ color: transparent !important;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/components/ImageEditorModal/index.tsx b/aitoearn_web/aitoearn-web/src/components/ImageEditorModal/index.tsx
new file mode 100644
index 00000000..af8f7dcc
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/ImageEditorModal/index.tsx
@@ -0,0 +1,184 @@
+import {
+ ForwardedRef,
+ forwardRef,
+ memo,
+ useEffect,
+ useMemo,
+ useRef,
+ useState,
+} from "react";
+// @ts-ignore
+import ImageEditor from "@toast-ui/react-image-editor";
+import "tui-image-editor/dist/tui-image-editor.css";
+import { Button, Modal } from "antd";
+import styles from "./imageEditorModal.module.scss";
+import { IImgFile } from "@/components/PublishDialog/publishDialog.type";
+import { useGetClientLng } from "@/hooks/useSystem";
+import { useTransClient } from "@/app/i18n/client";
+import zhCNImageEditor from "@/app/i18n/locales/zh-CN/imageEditor.json";
+import { formatImg } from "@/components/PublishDialog/PublishDialog.util";
+import { dataURLToBlob } from "@/utils";
+import { toolsApi } from "@/api/tools";
+import { OSS_URL } from "@/constant";
+
+export interface IImageEditorModalRef {}
+export interface IImageEditorModalProps {
+ open: boolean;
+ onCancel: () => void;
+ imgFile?: IImgFile;
+ onOk: (editedImg: IImgFile) => void;
+}
+
+const ImageEditorModal = memo(
+ forwardRef(
+ (
+ { open, onCancel, imgFile, onOk }: IImageEditorModalProps,
+ ref: ForwardedRef<IImageEditorModalRef>,
+ ) => {
+ const lng = useGetClientLng();
+ const { t } = useTransClient("imageEditor");
+ const account = useTransClient("account");
+ const imageEditorRef = useRef<any>();
+ const [uploadLoading, setUploadLoading] = useState(false);
+ const isInit = useRef(false);
+
+ const imageEditorLocale = useMemo(() => {
+ if (lng === "en") return undefined;
+ // 这里用 zhCNImageEditor 的 key 列表动态生成
+ return Object.keys(zhCNImageEditor).reduce<Record<string, string>>(
+ (acc, key) => {
+ acc[key] = t(key as any); // 若缺失则 i18n 会回退为 key
+ return acc;
+ },
+ {},
+ );
+ }, [lng, t]);
+
+ useEffect(() => {
+ if (open && imgFile) {
+ const inst = imageEditorRef.current?.getInstance();
+ if (inst) {
+ inst.loadImageFromURL(imgFile?.imgUrl, "lena").then(() => {
+ inst.ui.resizeEditor();
+ });
+ }
+ }
+ }, [imgFile, open]);
+
+ // 添加裁剪预设
+ function addCropPreset(newClass: string, label: string, mode: number) {
+ if (document.querySelector(`.${newClass}`)) return;
+ const originClass = "preset-16-9";
+ const cropCon = document.querySelector(".tie-crop-preset-button")!;
+ const originPreset = cropCon.querySelector(`.${originClass}`)!;
+ // 克隆节点并清除所有事件
+ const cleanPreset = originPreset.cloneNode(true) as HTMLElement;
+ const newPreset = cleanPreset.cloneNode(true) as HTMLElement;
+ newPreset.querySelector("label")!.innerText = label;
+ newPreset.classList.remove(originClass);
+ newPreset.classList.add(newClass);
+ cropCon.appendChild(newPreset);
+ cropCon.addEventListener("click", (e) => {
+ const target = e.target as HTMLElement;
+ if (target.closest(`.${newClass}`)) {
+ const inst = imageEditorRef.current?.getInstance();
+ inst.stopDrawingMode();
+ inst.startDrawingMode("CROPPER");
+ inst.setCropzoneRect(mode);
+ }
+ });
+ }
+
+ useEffect(() => {
+ isInit.current = false;
+ const timeId = setInterval(() => {
+ if (
+ !isInit.current &&
+ document.querySelector(".tie-crop-preset-button")
+ ) {
+ addCropPreset("preset-4-5", "4:5", 4 / 5);
+ addCropPreset("preset-1-1", "1:1", 1);
+ addCropPreset("preset-9_1-1", "1.91:1", 1.91);
+ clearInterval(timeId);
+ }
+ }, 100);
+ }, [imgFile?.imgUrl]);
+
+ return (
+ <Modal
+ title={t("imageEditing")}
+ open={open}
+ onCancel={onCancel}
+ getContainer={() => document.body}
+ width={1100}
+ footer={
+ <>
+ <Button size="large" onClick={onCancel}>
+ {account.t("deleteConfirm.cancel")}
+ </Button>
+ <Button
+ type="primary"
+ size="large"
+ loading={uploadLoading}
+ onClick={async () => {
+ const inst = imageEditorRef.current?.getInstance();
+ if (!inst) return "";
+ setUploadLoading(true);
+ const base64 = inst.toDataURL({ format: "png", quality: 1 });
+ const blob = dataURLToBlob(base64);
+ const image = await formatImg({
+ blob: blob,
+ path:
+ imgFile?.filename ||
+ `aitoearn_edited_image_${Date.now()}.png`,
+ });
+ const uploadCoverRes = await toolsApi.uploadFileTemp(
+ image.file,
+ );
+ image["ossUrl"] = `${OSS_URL}${uploadCoverRes}`;
+ setUploadLoading(false);
+ onOk(image);
+ onCancel();
+ }}
+ >
+ {account.t("createSpace.cancel")}
+ </Button>
+ </>
+ }
+ >
+ <div className={styles.imageEditorModal}>
+ <ImageEditor
+ key={imgFile?.imgUrl}
+ ref={imageEditorRef}
+ includeUI={{
+ locale: imageEditorLocale,
+ loadImage: {
+ path: imgFile?.imgUrl,
+ name: "SampleImage",
+ },
+ menu: [
+ "crop",
+ "flip",
+ "rotate",
+ "draw",
+ "shape",
+ "icon",
+ "text",
+ "filter",
+ ],
+ uiSize: { width: "1000px", height: "700px" },
+ menuBarPosition: "bottom",
+ }}
+ cssMaxHeight={500}
+ cssMaxWidth={700}
+ selectionStyle={{ cornerSize: 20, rotatingPointOffset: 70 }}
+ usageStatistics={false}
+ />
+ </div>
+ </Modal>
+ );
+ },
+ ),
+);
+
+export default ImageEditorModal;
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts b/aitoearn_web/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts
index 3d3333a5..985a5bf3 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts
@@ -108,3 +108,21 @@ export const formatImg = async ({
img.src = imgUrl;
});
};
+
+/**
+ * 判断宽高是否属于指定比例(带缓冲阈值)
+ * @param width 宽
+ * @param height 高
+ * @param ratio 目标比例(宽/高)
+ * @param threshold 缓冲阈值,默认0.02
+ */
+export function isAspectRatioMatch(
+ width: number,
+ height: number,
+ ratio: number,
+ threshold: number = 0.02,
+): boolean {
+ if (height === 0) return false;
+ const actualRatio = width / height;
+ return Math.abs(actualRatio - ratio) <= threshold;
+}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/common/CommonTitleInput.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/common/CommonTitleInput.tsx
index 650c9db6..ea64fecc 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/common/CommonTitleInput.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/common/CommonTitleInput.tsx
@@ -43,7 +43,7 @@ const CommonTitleInput = memo(
<Input
value={pubItem.params.title}
maxLength={platConfig.commonPubParamsConfig.titleMax || 20}
- placeholder={t("form.titlePlaceholder")}
+ placeholder={t("form.titlePlaceholder") }
showCount
onChange={(e) => {
setOnePubParams(
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/hooks/usePlatParamsCoomon.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/hooks/usePlatParamsCoomon.tsx
index 7941e81f..8b33d01f 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/hooks/usePlatParamsCoomon.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/hooks/usePlatParamsCoomon.tsx
@@ -1,28 +1,36 @@
import { usePublishDialog } from "@/components/PublishDialog/usePublishDialog";
import { useShallow } from "zustand/react/shallow";
-import { useCallback, useEffect, useMemo } from "react";
+import { useCallback, useMemo } from "react";
import {
IChangeParams,
IPubParmasTextareaProps,
} from "@/components/PublishDialog/compoents/PubParmasTextarea";
import { PubItem } from "@/components/PublishDialog/publishDialog.type";
import { PubParamsVerifyInfo } from "@/components/PublishDialog/hooks/usePubParamsVerify";
+import { Alert } from "antd";
export default function usePlatParamsCommon(pubItem: PubItem) {
- const { setOnePubParams, errParamsMap, pubListChoosed } = usePublishDialog(
- useShallow((state) => ({
- setOnePubParams: state.setOnePubParams,
- step: state.step,
- errParamsMap: state.errParamsMap,
- pubListChoosed: state.pubListChoosed,
- })),
- );
+ const { setOnePubParams, errParamsMap, pubListChoosed, warningParamsMap } =
+ usePublishDialog(
+ useShallow((state) => ({
+ setOnePubParams: state.setOnePubParams,
+ step: state.step,
+ errParamsMap: state.errParamsMap,
+ pubListChoosed: state.pubListChoosed,
+ warningParamsMap: state.warningParamsMap,
+ })),
+ );
// 当前组件的错误消息
const currErrItem = useMemo(() => {
return errParamsMap?.get(pubItem.account.id);
}, [errParamsMap, pubItem, pubListChoosed]);
+ // 当前组件的警告消息
+ const currWarningItem = useMemo(() => {
+ return warningParamsMap?.get(pubItem.account.id);
+ }, [warningParamsMap, pubItem, pubListChoosed]);
+
const onChange = useCallback(
(values: IChangeParams) => {
setOnePubParams(
@@ -49,9 +57,23 @@ export default function usePlatParamsCommon(pubItem: PubItem) {
<PubParamsVerifyInfo errItem={currErrItem} />
</>
),
+ centerExtend: currWarningItem && (
+ <Alert
+ type="info"
+ showIcon
+ message={
+ <p style={{ textAlign: "left" }}>{currWarningItem?.parErrMsg}</p>
+ }
+ style={{
+ fontSize: "12px",
+ borderRadius: 0,
+ border: "none",
+ }}
+ />
+ ),
};
return props;
- }, [currErrItem, onChange, pubItem]);
+ }, [currErrItem, onChange, pubItem, currWarningItem]);
return { pubParmasTextareaCommonParams, setOnePubParams };
}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/index.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/index.tsx
index cee1690a..06bd6cbe 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/index.tsx
@@ -10,8 +10,10 @@ import YouTubeParams from "@/components/PublishDialog/compoents/PlatParamsSettin
import WxGzhParams from "@/components/PublishDialog/compoents/PlatParamsSetting/plats/WxGzhParams";
import PinterestParams from "@/components/PublishDialog/compoents/PlatParamsSetting/plats/PinterestParams";
import TikTokParams from "@/components/PublishDialog/compoents/PlatParamsSetting/plats/TikTokParams";
+import ThreadsParams from "@/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams";
import { useShallow } from "zustand/react/shallow";
import { PubItem } from "@/components/PublishDialog/publishDialog.type";
+import { useTransClient } from "@/app/i18n/client";
export interface IPlatParamsSettingRef {}
@@ -33,6 +35,7 @@ const PlatParamsSetting = memo(
setExpandedPubItem: state.setExpandedPubItem,
})),
);
+ const { t } = useTransClient("publish");
const platConfig = useMemo(() => {
return AccountPlatInfoMap.get(pubItem.account.type)!;
@@ -56,6 +59,8 @@ const PlatParamsSetting = memo(
return <PinterestParams pubItem={pubItem} />;
case PlatType.Tiktok:
return <TikTokParams pubItem={pubItem} />;
+ case PlatType.Threads:
+ return <ThreadsParams pubItem={pubItem} />;
default:
return <KwaiParams pubItem={pubItem} />;
}
@@ -89,7 +94,15 @@ const PlatParamsSetting = memo(
setExpandedPubItem(pubItem);
}}
>
- {pubItem.params.des}
+ <p>
+ {pubItem.params.des ? (
+ pubItem.params.des
+ ) : (
+ <span style={{ color: "var(--grayColor7)" }}>
+ {t("form.descriptionPlaceholder")}...
+ </span>
+ )}
+ </p>
</div>
)}
</div>
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/platParamsSetting.module.scss b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/platParamsSetting.module.scss
index 42588867..41d24572 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/platParamsSetting.module.scss
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/platParamsSetting.module.scss
@@ -3,6 +3,7 @@
.platParamsSetting-wrapper {
display: flex;
width: 100%;
+ min-width: 0;
}
.platParamsSetting-icon {
margin: 5px 10px 0 0;
@@ -14,6 +15,7 @@
.platParamsSetting-des {
border: 1px solid var(--grayColor3);
width: 100%;
+ min-width: 0;
border-radius: 4px;
height: 40px;
cursor: pointer;
@@ -21,6 +23,11 @@
align-items: center;
padding-left: 15px;
color: var(--grayColor11);
+ p {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
}
.platParamsSetting-label {
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/FacebookParams.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/FacebookParams.tsx
index fd725f55..2c7e35a6 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/FacebookParams.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/FacebookParams.tsx
@@ -5,7 +5,6 @@ import {
} from "@/components/PublishDialog/compoents/PlatParamsSetting/plats/plats.type";
import PubParmasTextarea from "@/components/PublishDialog/compoents/PubParmasTextarea";
import usePlatParamsCommon from "@/components/PublishDialog/compoents/PlatParamsSetting/hooks/usePlatParamsCoomon";
-import CommonTitleInput from "@/components/PublishDialog/compoents/PlatParamsSetting/common/CommonTitleInput";
import styles from "../platParamsSetting.module.scss";
import { Radio } from "antd";
import { useTransClient } from "@/app/i18n/client";
@@ -42,7 +41,6 @@ const FacebookParams = memo(
{...pubParmasTextareaCommonParams}
extend={
<>
- <CommonTitleInput pubItem={pubItem} />
<div
className={styles.commonTitleInput}
style={{ marginTop: "10px" }}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/InstagramParams.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/InstagramParams.tsx
index 075afe42..dc2a4a74 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/InstagramParams.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/InstagramParams.tsx
@@ -46,7 +46,6 @@ const InstagramParams = memo(
{...pubParmasTextareaCommonParams}
extend={
<>
- <CommonTitleInput pubItem={pubItem} />
<div
className={styles.commonTitleInput}
style={{ marginTop: "10px" }}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsx
new file mode 100644
index 00000000..9a2bca93
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsx
@@ -0,0 +1,153 @@
+import { ForwardedRef, forwardRef, memo, useEffect, useState, useCallback, useRef } from "react";
+import {
+ IPlatsParamsProps,
+ IPlatsParamsRef,
+} from "@/components/PublishDialog/compoents/PlatParamsSetting/plats/plats.type";
+import PubParmasTextarea from "@/components/PublishDialog/compoents/PubParmasTextarea";
+import usePlatParamsCommon from "@/components/PublishDialog/compoents/PlatParamsSetting/hooks/usePlatParamsCoomon";
+// 去掉标题输入
+import styles from "../platParamsSetting.module.scss";
+import { Select, Input } from "antd";
+import { useTransClient } from "@/app/i18n/client";
+import { apiGetThreadsLocations, ThreadsLocationItem } from "@/api/plat/threads";
+import { debounce } from "lodash";
+
+const { Search } = Input;
+
+const ThreadsParams = memo(
+ forwardRef(
+ ({ pubItem }: IPlatsParamsProps, ref: ForwardedRef<IPlatsParamsRef>) => {
+ const { t } = useTransClient("publish");
+ const { pubParmasTextareaCommonParams, setOnePubParams } =
+ usePlatParamsCommon(pubItem);
+
+ const [locations, setLocations] = useState<ThreadsLocationItem[]>([]);
+ const [loading, setLoading] = useState(false);
+ const [searchKeyword, setSearchKeyword] = useState("");
+ const debouncedSearchRef = useRef<ReturnType<typeof debounce> | null>(null);
+
+ // 初始化Threads参数
+ useEffect(() => {
+ const option = pubItem.params.option;
+ if (!option.threads) {
+ setOnePubParams(
+ {
+ option: {
+ ...option,
+ threads: {
+ location_id: null,
+ },
+ },
+ },
+ pubItem.account.id,
+ );
+ }
+ }, [pubItem.account.id, setOnePubParams]);
+
+ // 获取位置列表
+ const fetchLocations = useCallback(async (keyword?: string) => {
+ if (!keyword) {
+ return;
+ }
+
+ try {
+ setLoading(true);
+ const response:any = await apiGetThreadsLocations(
+ pubItem.account.id,
+ keyword || ""
+ );
+ console.log('response', response)
+ if (response && response.code === 0) {
+ setLocations(response.data);
+ }
+ } catch (error) {
+ console.error("获取Threads位置列表失败:", error);
+ } finally {
+ setLoading(false);
+ }
+ }, [pubItem.account.id]);
+
+ // 创建防抖搜索函数
+ useEffect(() => {
+ debouncedSearchRef.current = debounce((keyword: string) => {
+ fetchLocations(keyword);
+ }, 500); // 增加防抖延迟到500ms
+
+ // 清理函数
+ return () => {
+ if (debouncedSearchRef.current) {
+ debouncedSearchRef.current.cancel();
+ }
+ };
+ }, [fetchLocations]);
+
+ // 初始加载位置列表
+ useEffect(() => {
+ fetchLocations();
+ }, [fetchLocations]);
+
+ // 处理位置选择
+ const handleLocationChange = (locationId: string) => {
+ const selectedLocation = locations.find(loc => loc.id === locationId);
+ const option = pubItem.params.option;
+ setOnePubParams(
+ {
+ option: {
+ ...option,
+ threads: {
+ ...option.threads,
+ location_id: selectedLocation?.id || null,
+ },
+ },
+ },
+ pubItem.account.id,
+ );
+ };
+
+ // 处理搜索
+ const handleSearch = useCallback((value: string) => {
+ setSearchKeyword(value);
+ if (debouncedSearchRef.current) {
+ debouncedSearchRef.current(value);
+ }
+ }, []);
+
+ return (
+ <>
+ <PubParmasTextarea
+ {...pubParmasTextareaCommonParams}
+ extend={
+ <>
+ <div
+ className={styles.commonTitleInput}
+ style={{ marginTop: "10px" }}
+ >
+ <div className="platParamsSetting-label">
+ {t("form.location" as any)}
+ </div>
+ <Select
+ placeholder={t("form.selectLocation" as any)}
+ value={pubItem.params.option.threads?.location_id || undefined}
+ onChange={handleLocationChange}
+ loading={loading}
+ style={{ width: "100%" }}
+ showSearch
+ filterOption={false}
+ onSearch={(val) => handleSearch(val)}
+ options={locations.map((location) => ({
+ value: location.id,
+ label: location.label,
+ }))}
+ allowClear
+ />
+ </div>
+ </>
+ }
+ />
+ </>
+ );
+ },
+ ),
+);
+
+export default ThreadsParams;
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TikTokParams.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TikTokParams.tsx
index 76ed4d9f..6bc236b6 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TikTokParams.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TikTokParams.tsx
@@ -129,8 +129,6 @@ const TikTokParams = memo(
{...pubParmasTextareaCommonParams}
extend={
<>
- <CommonTitleInput pubItem={pubItem} />
-
{/* Creator Info Display */}
{creatorInfo && (
<div className={styles.commonTitleInput} style={{ marginTop: "10px" }}>
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextuploadImage.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextuploadImage.tsx
new file mode 100644
index 00000000..2ffcc1d6
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextuploadImage.tsx
@@ -0,0 +1,63 @@
+import React, { ForwardedRef, forwardRef, memo } from "react";
+import { CloseOutlined, EditOutlined } from "@ant-design/icons";
+import { Button, Tooltip } from "antd";
+import { useTranslation } from "react-i18next";
+import { IImgFile } from "@/components/PublishDialog/publishDialog.type";
+
+export interface IPubParmasTextuploadImageRef {}
+
+export interface IPubParmasTextuploadImageProps {
+ onClose: () => void;
+ onClick: () => void;
+ imageFile: IImgFile;
+ onEditClick: () => void;
+}
+
+const PubParmasTextuploadImage = memo(
+ forwardRef(
+ (
+ {
+ onClick,
+ onClose,
+ imageFile,
+ onEditClick,
+ }: IPubParmasTextuploadImageProps,
+ ref: ForwardedRef<IPubParmasTextuploadImageRef>,
+ ) => {
+ const { t } = useTranslation("publish");
+
+ return (
+ <>
+ <div className="pubParmasTextarea-uploads-item" onClick={onClick}>
+ <div
+ className="pubParmasTextarea-uploads-item-close"
+ onClick={(e) => {
+ e.stopPropagation();
+ onClose();
+ }}
+ >
+ <CloseOutlined />
+ </div>
+ <Tooltip title={t("actions.preview")}>
+ <img src={imageFile.imgUrl} alt="preview" />
+ </Tooltip>
+
+ <Tooltip title="Edit">
+ <Button
+ className="pubParmasTextarea-uploads-item-edit"
+ icon={<EditOutlined />}
+ size="small"
+ onClick={(e) => {
+ e.stopPropagation();
+ onEditClick();
+ }}
+ />
+ </Tooltip>
+ </div>
+ </>
+ );
+ },
+ ),
+);
+
+export default PubParmasTextuploadImage;
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx
index e458609d..95fcaf7f 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx
@@ -9,12 +9,11 @@ import React, {
useRef,
useState,
} from "react";
-import { Button, Image, Input, message, Modal, Tooltip, Upload } from "antd";
+import { Button, Image, Input, message, Tooltip, Upload } from "antd";
import styles from "@/components/PublishDialog/compoents/PubParmasTextarea/pubCommonComps.module.scss";
import { ReactSortable } from "react-sortablejs";
import { CSSTransition, TransitionGroup } from "react-transition-group";
import { CaretRightOutlined, CloseOutlined } from "@ant-design/icons";
-import isEqual from "lodash/isEqual";
import { TextAreaRef } from "antd/es/input/TextArea";
import {
IImgFile,
@@ -26,6 +25,9 @@ import PubParmasTextareaUpload from "@/components/PublishDialog/compoents/PubPar
import { AccountPlatInfoMap, PlatType } from "@/app/config/platConfig";
import { PubType } from "@/app/config/publishConfig";
import { useTransClient } from "@/app/i18n/client";
+import PubParmasTextuploadImage from "@/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextuploadImage";
+import VideoPreviewModal from "@/components/VideoPreviewModal";
+import dynamic from "next/dynamic";
const { TextArea } = Input;
const { Dragger } = Upload;
@@ -47,6 +49,8 @@ export interface IPubParmasTextareaProps {
extend?: React.ReactNode;
// 在前面的扩展元素
beforeExtend?: React.ReactNode;
+ // 在中间的扩展元素
+ centerExtend?: React.ReactNode;
// 平台类型
platType: PlatType;
style?: CSSProperties;
@@ -55,6 +59,11 @@ export interface IPubParmasTextareaProps {
desValue?: string;
}
+const ImageEditorModal = dynamic(
+ () => import("@/components/ImageEditorModal"),
+ { ssr: false },
+);
+
const PubParmasTextarea = memo(
forwardRef(
(
@@ -64,6 +73,7 @@ const PubParmasTextarea = memo(
rows = 12,
videoMax = 1,
extend,
+ centerExtend,
imageFileListValue = [],
videoFileValue,
desValue = "",
@@ -91,6 +101,8 @@ const PubParmasTextarea = memo(
sort: true,
});
const { t } = useTransClient("publish");
+ // 编辑图片的索引
+ const [editImgIndex, setEditImgIndex] = useState(-1);
useEffect(() => {
if (isFirst.current.effect) {
@@ -182,22 +194,22 @@ const PubParmasTextarea = memo(
};
if (uploadHasImage && !platConfig.pubTypes.has(PubType.ImageText)) {
- messageOpen("该平台不支持上传图片");
+ messageOpen(t("validation.uploadImage"));
return false;
}
if (uploadHasVideo && !platConfig.pubTypes.has(PubType.VIDEO)) {
- messageOpen("该平台不支持上传视频");
+ messageOpen(t("validation.uploadVideo"));
return false;
}
// 已有图片,只能传图片
if (hasImageInList && !hasVideoInList && uploadHasVideo) {
- messageOpen("已有图片,仅可继续上传图片,不能上传视频!");
+ messageOpen(t("validation.imageOnly"));
return false;
}
// 已有视频,只能传视频
if (hasVideoInList && !hasImageInList && uploadHasImage) {
- messageOpen("已有视频,仅可继续上传视频,不能上传图片!");
+ messageOpen(t("validation.videoOnly"));
return false;
}
// 混合上传拦截
@@ -206,12 +218,12 @@ const PubParmasTextarea = memo(
(hasImageInList && uploadHasVideo) ||
(hasVideoInList && uploadHasImage)
) {
- messageOpen("图片和视频不能混合上传!");
+ messageOpen(t("validation.imageVideoMixed"));
return false;
}
// 非法类型
if (invalidFile) {
- messageOpen("只能上传图片或视频文件!");
+ messageOpen(t("validation.onlyImageOrVideo"));
return false;
}
if (uploadHasVideo) {
@@ -220,7 +232,9 @@ const PubParmasTextarea = memo(
(videoFile ? 1 : 0) +
fileList.filter((f) => f.type.startsWith("video/")).length;
if (totalVideoCount > videoMax) {
- messageOpen(`视频上传数量不能大于${videoMax}`);
+ messageOpen(
+ t("validation.videoMaxExceeded", { maxCount: videoMax }),
+ );
return false;
}
}
@@ -230,7 +244,9 @@ const PubParmasTextarea = memo(
imageFileList.length +
fileList.filter((f) => f.type.startsWith("image/")).length;
if (totalImageCount > imageMax) {
- messageOpen(`图片上传数量不能大于${imageMax}`);
+ messageOpen(
+ t("validation.imageMaxExceeded", { maxCount: imageMax }),
+ );
return false;
}
}
@@ -239,6 +255,10 @@ const PubParmasTextarea = memo(
[imageFileList, videoMax, imageMax, videoFile, platConfig],
);
+ const desMax = useMemo(() => {
+ return platConfig.commonPubParamsConfig?.desMax || 2200;
+ }, [platConfig]);
+
return (
<>
<VideoCoverSeting
@@ -255,47 +275,51 @@ const PubParmasTextarea = memo(
}}
/>
- <Modal
- title="查看素材"
- open={!!previewData}
+ <Image
+ src={(previewData as IImgFile)?.imgUrl}
+ style={{
+ width: "100%",
+ height: "400px",
+ objectFit: "contain",
+ display: "none",
+ }}
+ preview={{
+ visible: !!(previewData && (previewData as IImgFile).imgUrl),
+ onVisibleChange: (visible) => {
+ if (!visible) setPreviewData(undefined);
+ },
+ }}
+ />
+ <VideoPreviewModal
+ open={!!(previewData && (previewData as IVideoFile).videoUrl)}
+ videoUrl={(previewData as IVideoFile)?.videoUrl}
onCancel={() => setPreviewData(undefined)}
- >
- {previewData && (
- <>
- {previewData!.file.type.startsWith("video") ? (
- <video
- src={(previewData as IVideoFile).videoUrl}
- controls={true}
- style={{ width: "100%", maxHeight: "600px" }}
- />
- ) : (
- <div
- style={{
- display: "flex",
- justifyContent: "center",
- width: "100%",
- }}
- >
- <Image
- src={(previewData as IImgFile).imgUrl}
- style={{ width: "100%", height: "400px" }}
- />
- </div>
- )}
- </>
- )}
- </Modal>
+ />
+
+ <ImageEditorModal
+ onOk={(editedImg) => {
+ setImageFileList((prevState) => {
+ const newState = [...prevState];
+ newState[editImgIndex] = editedImg;
+ return newState;
+ });
+ }}
+ imgFile={imageFileList[editImgIndex]}
+ open={editImgIndex !== -1}
+ onCancel={() => setEditImgIndex(-1)}
+ />
<div className={styles.pubParmasTextarea} style={style}>
<div className="pubParmasTextarea-input">
{beforeExtend}
<TextArea
ref={textareaRef}
- placeholder="开始写"
+ placeholder={t("form.descriptionPlaceholder")}
value={value}
onChange={(e) => setValue(e.target.value)}
rows={rows}
autoFocus={true}
+ maxLength={desMax}
onFocus={() => {
setTimeout(() => {
if (textareaRef.current) {
@@ -338,29 +362,22 @@ const PubParmasTextarea = memo(
exitActive: styles.itemExitActive,
}}
>
- <div
- className="pubParmasTextarea-uploads-item"
+ <PubParmasTextuploadImage
+ onEditClick={() => {
+ setEditImgIndex(i);
+ }}
+ imageFile={v}
onClick={() => {
setPreviewData(v);
}}
- >
- <div
- className="pubParmasTextarea-uploads-item-close"
- onClick={(e) => {
- e.stopPropagation();
- setImageFileList((prevState) => {
- const newState = [...prevState];
- newState.splice(i, 1);
- return newState;
- });
- }}
- >
- <CloseOutlined />
- </div>
- <Tooltip title="点击查看">
- <img src={v.imgUrl} />
- </Tooltip>
- </div>
+ onClose={() => {
+ setImageFileList((prevState) => {
+ const newState = [...prevState];
+ newState.splice(i, 1);
+ return newState;
+ });
+ }}
+ />
</CSSTransition>
))}
@@ -392,7 +409,7 @@ const PubParmasTextarea = memo(
>
<CloseOutlined />
</div>
- <Tooltip title="点击查看">
+ <Tooltip title={t("actions.preview")}>
<div className="pubParmasTextarea-uploads-item-video">
<img src={v.cover.imgUrl} />
<div className="pubParmasTextarea-uploads-item-play">
@@ -442,8 +459,13 @@ const PubParmasTextarea = memo(
{t("actions.cropCover")}
</Button>
)}
+
+ <div className="pubParmasTextarea-maxLength">
+ {desMax - value.length}
+ </div>
</div>
+ {centerExtend}
{extend && <div className="pubParmasTextarea-other">{extend}</div>}
</div>
</>
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/pubCommonComps.module.scss b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/pubCommonComps.module.scss
index 5eb0e8f9..45f183ce 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/pubCommonComps.module.scss
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/pubCommonComps.module.scss
@@ -7,13 +7,22 @@ $boxHegiht: 110px;
:global {
.pubParmasTextarea-input {
padding: 15px;
- textarea {
+ position: relative;
+ textarea, .ant-input-outlined {
resize: none;
border-radius: 3px;
border: none;
- box-shadow: none;
+ box-shadow: none !important;
padding: 0;
}
+ .pubParmasTextarea-maxLength {
+ position: absolute;
+ bottom: 20px;
+ right: 20px;
+ border: 1px solid #505050;
+ border-radius: 6px;
+ padding: 0 6px;
+ }
}
.ant-upload-wrapper {
@@ -66,6 +75,11 @@ $boxHegiht: 110px;
box-sizing: border-box;
cursor: pointer;
position: relative;
+ &-edit {
+ position: absolute;
+ bottom: 3px;
+ right: 3px;
+ }
img, video {
width: 100%;
height: 100%;
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PublishDialogAi.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PublishDialogAi.tsx
index 31058e33..9106a6b6 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PublishDialogAi.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/compoents/PublishDialogAi.tsx
@@ -1,17 +1,33 @@
import { ForwardedRef, forwardRef, memo } from "react";
import styles from "../publishDialog.module.scss";
+import Chat from "@/components/Chat";
+import { useTransClient } from "@/app/i18n/client";
+import { CloseCircleFilled } from "@ant-design/icons";
export interface IPublishDialogAiRef {}
-export interface IPublishDialogAiProps {}
+export interface IPublishDialogAiProps {
+ onClose: () => void;
+}
// AI写作
const PublishDialogAi = memo(
forwardRef(
- ({}: IPublishDialogAiProps, ref: ForwardedRef<IPublishDialogAiRef>) => {
+ (
+ { onClose }: IPublishDialogAiProps,
+ ref: ForwardedRef<IPublishDialogAiRef>,
+ ) => {
+ const { t } = useTransClient("publish");
+
return (
- <div className={styles.publishDialogAi}>
- <div className="publishDialogAi-wrapper">AI写作</div>
+ <div className={styles.publishDialogAi} id="publishDialogAi">
+ <h1>
+ <span>{t("writingAssistant")}</span>
+ <CloseCircleFilled onClick={onClose} />
+ </h1>
+ <div className="publishDialogAi-wrapper">
+ <Chat />
+ </div>
</div>
);
},
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx
index 7ef13e18..e260d2fe 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx
@@ -5,6 +5,7 @@ import { PubItem } from "@/components/PublishDialog/publishDialog.type";
import { Alert } from "antd";
import { useTransClient } from "@/app/i18n/client";
import { PubType } from "@/app/config/publishConfig";
+import { isAspectRatioMatch } from "@/components/PublishDialog/PublishDialog.util";
export interface ErrPubParamsItem {
// 参数错误提示消息
@@ -33,6 +34,7 @@ export default function usePubParamsVerify(data: PubItem[]) {
const { topics } = parseTopicString(v.params.des || "");
const topicsAll = [...new Set((v.params.topics ?? []).concat(topics))];
const { topicMax } = platInfo.commonPubParamsConfig;
+ const video = v.params.video;
const setErrorMsg = (msg: string) => {
errParamsMapTemp.set(v.account.id, {
@@ -98,15 +100,18 @@ export default function usePubParamsVerify(data: PubItem[]) {
v.params.images?.length === 0 &&
!v.params.video
) {
- let msgs:any = t("validation.uploadImageOrVideo");
- if (platInfo.pubTypes.has(PubType.ImageText) && platInfo.pubTypes.has(PubType.VIDEO)) {
+ 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);
+ return setErrorMsg(msgs);
}
// 话题数量校验
@@ -155,22 +160,35 @@ export default function usePubParamsVerify(data: PubItem[]) {
if ((v.params.images?.length || 0) !== 0) {
return setErrorMsg(t("validation.facebookReelNoImage"));
}
+ // facebook reel 视频时长 3–90 秒
+ if (video && (video.duration > 90 || video.duration < 3)) {
+ return setErrorMsg(t("validation.facebookReelDuration"));
+ }
break;
case "story":
// facebook story 只能选择图片、视频,不能有描述
if (v.params.des) {
return setErrorMsg(t("validation.facebookStoryNoDes"));
}
+ // facebook story 视频时长 3–4小时
+ if (video && (video.duration > 14400 || video.duration < 3)) {
+ return setErrorMsg(t("validation.facebookStoryDuration"));
+ }
break;
}
}
// instagram的强制校验
if (v.account.type === PlatType.Instagram) {
+ // 视频大小 ≤ 100MB
+ if (video && video.size > 100 * 1024 * 1024) {
+ return setErrorMsg(t("validation.instagramVideoSize"));
+ }
+
switch (v.params.option.instagram?.content_category) {
case "post":
// instagram post不能上传视频,必须上传图片
- if (v.params.video) {
+ if (video) {
return setErrorMsg(t("validation.instagramPostNoVideo"));
}
break;
@@ -179,17 +197,44 @@ export default function usePubParamsVerify(data: PubItem[]) {
if ((v.params.images?.length || 0) !== 0) {
return setErrorMsg(t("validation.instagramReelNoImage"));
}
+ // instagram reel 视频时长 5秒 – 15 分钟
+ if (video && (video.duration > 900 || video.duration < 5)) {
+ return setErrorMsg(t("validation.instagramReelDuration"));
+ }
break;
case "story":
- // instagram story 只能选择图片、视频,不能有描述
+ // instagram story 只能选择图片��视频,不能有描述
if (v.params.des) {
return setErrorMsg(t("validation.instagramStoryNoDes"));
}
+ // instagram story 视频时长 3–60 秒
+ if (video && (video.duration > 60 || video.duration < 3)) {
+ return setErrorMsg(t("validation.instagramStoryDuration"));
+ }
break;
}
}
- // Pinterest 的强制校验
+ if (v.account.type === PlatType.Threads) {
+ // Threads 视频大小限制 最大 1GB
+ if (video && video.size > 1024 * 1024 * 1024) {
+ return setErrorMsg(t("validation.threadsVideoSize"));
+ }
+ // Threads视频限制,最长 5 分钟,最短 > 0 秒
+ if (video && (video.duration > 300 || video.duration <= 0)) {
+ return setErrorMsg(t("validation.threadsVideoDuration"));
+ }
+ // Threads 图片限制,最少两张图片
+ if (
+ platInfo.pubTypes.has(PubType.ImageText) &&
+ (v.params.images?.length || 0) > 0 &&
+ (v.params.images?.length || 0) < 2
+ ) {
+ return setErrorMsg(t("validation.threadsImageMin"));
+ }
+ }
+
+ // Pinterest 的强制校验
if (v.account.type === PlatType.Pinterest) {
// 强制需要标题
if (!v.params.title) {
@@ -199,14 +244,82 @@ export default function usePubParamsVerify(data: PubItem[]) {
if (!v.params.option.pinterest?.boardId) {
return setErrorMsg(t("validation.boardRequired"));
}
+ // Pinterest 视频限制,4 秒–15 分钟
+ if (video && (video.duration > 900 || video.duration < 4)) {
+ return setErrorMsg(t("validation.pinterestVideoDuration"));
+ }
+ // Pinterest 视频大小≤ 1GB
+ if (video && video.size > 1024 * 1024 * 1024) {
+ return setErrorMsg(t("validation.pinterestVideoSize"));
+ }
+ }
+
+ // TikTok 的强制校验
+ if (v.account.type === PlatType.Tiktok) {
+ // TikTok 视频时长限制 3 秒至 10 分钟
+ if (video && (video.duration > 600 || video.duration < 3)) {
+ return setErrorMsg(t("validation.tiktokVideoDuration"));
+ }
+ // TikTok视频大小限制1GB或更小
+ if (video && video.size > 1024 * 1024 * 1024) {
+ return setErrorMsg(t("validation.tiktokVideoSize"));
+ }
+ // TikTok限制视频最小高度和宽度为 360 像素
+ if (video && (video.width < 360 || video.height < 360)) {
+ return setErrorMsg(t("validation.tiktokVideoMinResolution"));
+ }
+ }
+
+ // Twitter 的强制校验
+ if (v.account.type === PlatType.Twitter) {
+ // Twitter视频限制 最短 0.5 秒,最长 140 秒
+ if (video && (video.duration > 140 || video.duration < 0.5)) {
+ return setErrorMsg(t("validation.twitterVideoDuration"));
+ }
+ // Twitter视频大小限制 最大 512MB
+ if (video && video.size > 512 * 1024 * 1024) {
+ return setErrorMsg(t("validation.twitterVideoSize"));
+ }
}
})();
}
return errParamsMapTemp;
}, [data, t]);
+ // 警告参数,警告参数不会阻止发布,只是提示用户可能存在的问题
+ const warningParamsMap = useMemo(() => {
+ const warningParamsMapTemp: ErrPubParamsMapType = new Map();
+
+ for (const v of data) {
+ const setWarningMsg = (msg: string) => {
+ warningParamsMapTemp.set(v.account.id, {
+ parErrMsg: msg,
+ });
+ };
+
+ // Instagram 警告消息
+ if (v.account.type === PlatType.Instagram) {
+ // 图片比例判断
+ if (
+ v.params.option.instagram?.content_category === "post" &&
+ v.params.images &&
+ v.params.images.length > 0
+ ) {
+ for (const img of v.params.images) {
+ if (!isAspectRatioMatch(img.width, img.height, 4 / 5)) {
+ setWarningMsg(t("validation.instagramImageValidation"));
+ break;
+ }
+ }
+ }
+ }
+ }
+ return warningParamsMapTemp;
+ }, [data, t]);
+
return {
errParamsMap,
+ warningParamsMap,
};
}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx b/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx
index 30c5377f..d4b7cde1 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/index.tsx
@@ -20,7 +20,6 @@ import {
InfoCircleOutlined,
} from "@ant-design/icons";
import PublishDialogAi from "@/components/PublishDialog/compoents/PublishDialogAi";
-import PublishDialogPreview from "@/components/PublishDialog/compoents/PublishDialogPreview";
import { CSSTransition } from "react-transition-group";
import { SocialAccount } from "@/api/types/account.type";
import { AccountPlatInfoMap } from "@/app/config/platConfig";
@@ -51,14 +50,19 @@ import { bilibiliSkip } from "@/app/[lng]/accounts/plat/BilibiliLogin";
import { youtubeSkip } from "@/app/[lng]/accounts/plat/YoutubeLogin";
import { twitterSkip } from "@/app/[lng]/accounts/plat/TwtterLogin";
import { tiktokSkip } from "@/app/[lng]/accounts/plat/TiktokLogin";
-import { facebookSkip } from "@/app/[lng]/accounts/plat/FacebookLogin";
+import {
+ facebookSkip,
+ FacebookPagesModal,
+} from "@/app/[lng]/accounts/plat/FacebookLogin";
import { instagramSkip } from "@/app/[lng]/accounts/plat/InstagramLogin";
import { threadsSkip } from "@/app/[lng]/accounts/plat/ThreadsLogin";
import { wxGzhSkip } from "@/app/[lng]/accounts/plat/WxGzh";
import { pinterestSkip } from "@/app/[lng]/accounts/plat/PinterestLogin";
import { linkedinSkip } from "@/app/[lng]/accounts/plat/LinkedinLogin";
import { useAccountStore } from "@/store/account";
-import { updateAccountApi } from "@/api/account";
+import PublishDialogPreview from "@/components/PublishDialog/compoents/PublishDialogPreview";
+import Aibrush from "./svgs/aibrush.svg";
+import { useWindowSize } from "react-use";
export interface IPublishDialogRef {
// 设置发布时间
@@ -90,6 +94,7 @@ const PublishDialog = memo(
}: IPublishDialogProps,
ref: ForwardedRef<IPublishDialogRef>,
) => {
+ const { width } = useWindowSize();
const [openLeft, setOpenLeft] = useState(false);
const {
pubListChoosed,
@@ -107,6 +112,7 @@ const PublishDialog = memo(
setPubTime,
pubTime,
setOnePubParams,
+ setWarningParamsMap,
} = usePublishDialog(
useShallow((state) => ({
pubListChoosed: state.pubListChoosed,
@@ -121,143 +127,126 @@ const PublishDialog = memo(
setExpandedPubItem: state.setExpandedPubItem,
expandedPubItem: state.expandedPubItem,
setErrParamsMap: state.setErrParamsMap,
+ setWarningParamsMap: state.setWarningParamsMap,
setPubTime: state.setPubTime,
pubTime: state.pubTime,
setOnePubParams: state.setOnePubParams,
})),
);
- const { errParamsMap } = usePubParamsVerify(pubListChoosed);
+ const { errParamsMap, warningParamsMap } =
+ usePubParamsVerify(pubListChoosed);
const [createLoading, setCreateLoading] = useState(false);
// 内容安全检测状态
const [moderationLoading, setModerationLoading] = useState(false);
- const [moderationResult, setModerationResult] = useState<boolean | null>(null);
+ const [moderationResult, setModerationResult] = useState<boolean | null>(
+ null,
+ );
const [moderationDesc, setModerationDesc] = useState<string>("");
const [moderationLevel, setModerationLevel] = useState<any>(null);
// 下载App弹窗状态
const [downloadModalVisible, setDownloadModalVisible] = useState(false);
- const [currentPlatform, setCurrentPlatform] = useState<string>('');
+ const [currentPlatform, setCurrentPlatform] = useState<string>("");
+ // Facebook页面选择弹窗状态
+ const [showFacebookPagesModal, setShowFacebookPagesModal] =
+ useState(false);
const { t } = useTransClient("publish");
const router = useRouter();
-
+
// 获取账户store
const { accountGroupList, getAccountList } = useAccountStore(
useShallow((state) => ({
accountGroupList: state.accountGroupList,
getAccountList: state.getAccountList,
- }))
+ })),
);
// 处理离线账户头像点击,直接跳转到对应平台授权页面
- const handleOfflineAvatarClick = useCallback(async (account: SocialAccount) => {
- const platform = account.type;
- const targetSpaceId = account.groupId; // 使用账户原本的空间ID
-
- try {
- // 记录授权前的账号数量,用于后续识别新账号
- const beforeAuthCount = accountGroupList.reduce((total, group) => total + group.children.length, 0);
+ const handleOfflineAvatarClick = useCallback(
+ async (account: SocialAccount) => {
+ const platform = account.type;
+ const targetSpaceId = account.groupId; // 使用账户原本的空间ID
- // 根据平台类型调用对应的授权函数
- switch (platform) {
- case PlatType.KWAI:
- await kwaiSkip(platform);
- break;
- case PlatType.BILIBILI:
- await bilibiliSkip(platform);
- break;
- case PlatType.YouTube:
- await youtubeSkip(platform);
- break;
- case PlatType.Twitter:
- await twitterSkip(platform);
- break;
- case PlatType.Tiktok:
- await tiktokSkip(platform);
- break;
- case PlatType.Facebook:
- try {
- await facebookSkip(platform);
- // Facebook授权成功后显示页面选择弹窗
- // handleFacebookAuthSuccess(); // 这里可能需要处理Facebook页面选择
- } catch (error) {
- console.error('Facebook授权失败:', error);
- }
- break;
- case PlatType.Instagram:
- await instagramSkip(platform);
- break;
- case PlatType.Threads:
- await threadsSkip(platform);
- break;
- case PlatType.WxGzh:
- await wxGzhSkip(platform);
- break;
- case PlatType.Pinterest:
- await pinterestSkip(platform);
- break;
- case PlatType.LinkedIn:
- await linkedinSkip(platform);
- break;
- default:
- console.warn(`未支持的平台类型: ${platform}`);
- message.warning(`暂不支持 ${platform} 平台的直接授权`);
- return;
- }
+ try {
+ // 记录授权前的账号数量,用于后续识别新账号
+ const beforeAuthCount = accountGroupList.reduce(
+ (total, group) => total + group.children.length,
+ 0,
+ );
- // 如果指定了目标空间,等待授权完成后移动新账号
- if (targetSpaceId) {
- // 检查选中的空间是否是默认空间
- const targetGroup = accountGroupList.find(group => group.id === targetSpaceId);
- const isDefaultSpace = targetGroup?.isDefault;
-
- // 只有当选择了非默认空间时才移动账号
- if (!isDefaultSpace) {
- console.log('准备移动账号到空间:', targetGroup?.name);
- setTimeout(async () => {
+ // 根据平台类型调用对应的授权函数,传递目标空间ID
+ switch (platform) {
+ case PlatType.KWAI:
+ await kwaiSkip(platform, targetSpaceId);
+ break;
+ case PlatType.BILIBILI:
+ await bilibiliSkip(platform, targetSpaceId);
+ break;
+ case PlatType.YouTube:
+ await youtubeSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Twitter:
+ await twitterSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Tiktok:
+ await tiktokSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Facebook:
try {
- // 刷新账号列表
- await getAccountList();
-
- // 获取最新的账号组列表
- const currentState = useAccountStore.getState();
- const defaultGroup = currentState.accountGroupList.find(group => group.isDefault);
-
- if (defaultGroup) {
- // 找到相同平台类型的最后一个账号(最新添加的)
- const sameTypeAccounts = defaultGroup.children.filter(account => account.type === platform);
- const latestAccount = sameTypeAccounts[sameTypeAccounts.length - 1];
-
- if (latestAccount) {
- console.log('找到最新账号:', latestAccount.account, '平台:', platform);
-
- // 将新账号移动到指定空间
- console.log('移动账号:', latestAccount.account, '到空间:', targetGroup?.name);
- await updateAccountApi({
- id: latestAccount.id,
- groupId: targetSpaceId
- });
- } else {
- console.log('未找到相同平台类型的账号');
- }
-
- // 再次刷新账号列表以更新UI
- await getAccountList();
- console.log('账号移动完成');
- }
+ await facebookSkip(platform, targetSpaceId);
+ // Facebook授权成功后显示页面选择弹窗
+ handleFacebookAuthSuccess();
} catch (error) {
- console.error('移动账号到指定空间失败:', error);
+ console.error("Facebook授权失败:", error);
}
- }, 3000); // 等待3秒让授权完成
- } else {
- console.log('选择的是默认空间,无需移动账号');
+ break;
+ case PlatType.Instagram:
+ await instagramSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Threads:
+ await threadsSkip(platform, targetSpaceId);
+ break;
+ case PlatType.WxGzh:
+ await wxGzhSkip(platform, targetSpaceId);
+ break;
+ case PlatType.Pinterest:
+ await pinterestSkip(platform, targetSpaceId);
+ break;
+ case PlatType.LinkedIn:
+ await linkedinSkip(platform, targetSpaceId);
+ break;
+ default:
+ console.warn(`未支持的平台类型: ${platform}`);
+ message.warning(`暂不支持 ${platform} 平台的直接授权`);
+ return;
}
- } else {
- console.log('未选择空间,不移动账号');
+
+ // 授权完成后刷新账号列表
+ setTimeout(async () => {
+ try {
+ await getAccountList();
+ console.log("账号列表已刷新");
+ } catch (error) {
+ console.error("刷新账号列表失败:", error);
+ }
+ }, 3000); // 等待3秒让授权完成
+ } catch (error) {
+ console.error("授权失败:", error);
+ message.error("授权失败,请重试");
}
- } catch (error) {
- console.error('授权失败:', error);
- message.error('授权失败,请重试');
- }
- }, [accountGroupList, getAccountList]);
+ },
+ [accountGroupList, getAccountList],
+ );
+
+ // 处理Facebook授权成功后的页面选择
+ const handleFacebookAuthSuccess = () => {
+ setShowFacebookPagesModal(true);
+ };
+
+ // 处理Facebook页面选择成功
+ const handleFacebookPagesSuccess = () => {
+ setShowFacebookPagesModal(false);
+ // 可以在这里添加成功提示或其他逻辑
+ };
// 内容安全检测函数
const handleContentModeration = useCallback(async () => {
@@ -275,24 +264,28 @@ const PublishDialog = memo(
message.warning("请先输入内容");
return;
}
-
+
try {
setModerationLoading(true);
setModerationResult(null);
setModerationDesc("");
setModerationLevel(null);
const result = await toolsApi.textModeration(contentToCheck);
- console.log("result",result);
-
+ console.log("result", result);
+
if (result?.code === 0) {
- const data: any = result?.data || {} as any;
- const descriptions: string = (data && (data.descriptions as string)) || "";
+ const data: any = result?.data || ({} as any);
+ const descriptions: string =
+ (data && (data.descriptions as string)) || "";
const labels: string = (data && (data.labels as string)) || "";
- const reason: any = (data && (data.reason ? JSON.parse(data.reason) : ""));
+ const reason: any =
+ data && (data.reason ? JSON.parse(data.reason) : "");
const isSafe = !descriptions && !labels && !reason;
setModerationResult(isSafe);
setModerationLevel(reason);
- setModerationDesc(isSafe ? "" : (descriptions || reason || "内容不安全"));
+ setModerationDesc(
+ isSafe ? "" : descriptions || reason || "内容不安全",
+ );
if (isSafe) {
message.success("内容安全");
} else {
@@ -312,9 +305,13 @@ const PublishDialog = memo(
if (step === 0 && pubListChoosed.length >= 2) {
return !!(commonPubParams.des && commonPubParams.des.trim());
} else if (step === 1 && expandedPubItem) {
- return !!(expandedPubItem.params.des && expandedPubItem.params.des.trim());
+ return !!(
+ expandedPubItem.params.des && expandedPubItem.params.des.trim()
+ );
} else if (pubListChoosed.length === 1) {
- return !!(pubListChoosed[0].params.des && pubListChoosed[0].params.des.trim());
+ return !!(
+ pubListChoosed[0].params.des && pubListChoosed[0].params.des.trim()
+ );
}
return false;
}, [step, pubListChoosed, commonPubParams, expandedPubItem]);
@@ -324,7 +321,11 @@ const PublishDialog = memo(
setModerationResult(null);
setModerationDesc("");
setModerationLevel(null);
- }, [commonPubParams.des, expandedPubItem?.params.des, pubListChoosed.map(item => item.params.des).join(',')]);
+ }, [
+ commonPubParams.des,
+ expandedPubItem?.params.des,
+ pubListChoosed.map((item) => item.params.des).join(","),
+ ]);
// 当内容被清空时,也重置检测状态
useEffect(() => {
@@ -485,7 +486,9 @@ const PublishDialog = memo(
// 离线账号(status === 0)不可参与发布:如被默认选中则自动移除
useEffect(() => {
- const filtered = pubListChoosed.filter((item) => item.account.status !== 0);
+ const filtered = pubListChoosed.filter(
+ (item) => item.account.status !== 0,
+ );
if (filtered.length !== pubListChoosed.length) {
setPubListChoosed(filtered);
}
@@ -608,9 +611,22 @@ const PublishDialog = memo(
}
}, [pubListChoosed, expandedPubItem, step]);
+ // 是否打开左侧
+ const openLeftSide = useMemo(() => {
+ if (!openLeft) return false;
+ if (step === 0) {
+ return pubListChoosed.length !== 0;
+ } else {
+ return expandedPubItem !== undefined;
+ }
+ }, [openLeft, step, pubListChoosed.length, expandedPubItem]);
+
useEffect(() => {
setErrParamsMap(errParamsMap);
}, [errParamsMap]);
+ useEffect(() => {
+ setWarningParamsMap(warningParamsMap);
+ }, [warningParamsMap]);
const pubClick = useCallback(async () => {
setCreateLoading(true);
@@ -632,8 +648,14 @@ const PublishDialog = memo(
accountType: item.account.type,
videoUrl: item.params.video?.ossUrl,
coverUrl:
- item.params.video?.cover.ossUrl || (item.params.images && item.params.images.length > 0 ? item.params.images[0].ossUrl : undefined),
- imgUrlList: item.params.images?.map((v) => v.ossUrl).filter((url): url is string => url !== undefined) || [],
+ item.params.video?.cover.ossUrl ||
+ (item.params.images && item.params.images.length > 0
+ ? item.params.images[0].ossUrl
+ : undefined),
+ imgUrlList:
+ item.params.images
+ ?.map((v) => v.ossUrl)
+ .filter((url): url is string => url !== undefined) || [],
publishTime,
option: item.params.option,
});
@@ -662,14 +684,16 @@ const PublishDialog = memo(
footer={null}
styles={{ wrapper: { textAlign: "center" } }}
>
- <CSSTransition
- in={openLeft}
- timeout={300}
- classNames="left"
- unmountOnExit
- >
- <PublishDialogAi />
- </CSSTransition>
+ {width >= 1400 && (
+ <CSSTransition
+ in={openLeftSide}
+ timeout={300}
+ classNames="left"
+ unmountOnExit
+ >
+ <PublishDialogAi onClose={() => setOpenLeft(false)} />
+ </CSSTransition>
+ )}
<div
className="publishDialog-wrapper"
@@ -712,11 +736,20 @@ const PublishDialog = memo(
>
{t("actions.selectDraft")}
</Button>
+ <Button
+ size="small"
+ icon={<Aibrush />}
+ onClick={(e) => {
+ e.stopPropagation();
+ setOpenLeft(true);
+ }}
+ >
+ {t("writingAssistant")}
+ </Button>
</div>
</div>
<div className="publishDialog-con-acconts">
- {pubList
- .map((pubItem) => {
+ {pubList.map((pubItem) => {
const platConfig = AccountPlatInfoMap.get(
pubItem.account.type,
)!;
@@ -724,19 +757,21 @@ const PublishDialog = memo(
(v) => v.account.id === pubItem.account.id,
);
const isOffline = pubItem.account.status === 0;
- const isPcNotSupported = platConfig && platConfig.pcNoThis === true;
- const isTikTokForbidden = pubItem.account.type === PlatType.Tiktok;
+ const isPcNotSupported =
+ platConfig && platConfig.pcNoThis === true;
+ const isTikTokForbidden =
+ pubItem.account.type === PlatType.Tiktok;
return (
<Tooltip
title={
isTikTokForbidden
- ? t('tips.tiktokForbidden' as any)
- : isPcNotSupported
- ? t('tips.pcNotSupported' as any)
- : isOffline
- ? t('tips.accountOffline' as any)
- : undefined
+ ? t("tips.tiktokForbidden" as any)
+ : isPcNotSupported
+ ? t("tips.pcNotSupported" as any)
+ : isOffline
+ ? t("tips.accountOffline" as any)
+ : undefined
}
key={pubItem.account.id}
>
@@ -753,143 +788,145 @@ const PublishDialog = memo(
: "transparent",
}}
onClick={(e) => {
- e.stopPropagation();
- // TikTok 禁止发布,直接禁止点击
- if (isTikTokForbidden) {
- return;
- }
- // 离线账户的点击由头像容器处理,这里不处理
- if (isOffline) {
- return;
- }
- if (isPcNotSupported) {
- setCurrentPlatform(platConfig?.name || '');
- setDownloadModalVisible(true);
- return;
- }
- const newPubListChoosed = [...pubListChoosed];
- // 查找当前账户是否已被选择
- const index = newPubListChoosed.findIndex(
- (v) => v.account.id === pubItem.account.id,
- );
- if (index !== -1) {
- newPubListChoosed.splice(index, 1);
- } else {
- newPubListChoosed.push(pubItem);
- }
- // 是否自动回到第一步
- if (newPubListChoosed.length === 0 && step === 1) {
- const isBack = newPubListChoosed.every(
- (v) =>
- !v.params.des &&
- !v.params.video &&
- !v.params.images?.length,
- );
- if (isBack) {
- setStep(0);
+ e.stopPropagation();
+ // TikTok 禁止发布,直接禁止点击
+ if (isTikTokForbidden) {
+ return;
}
- }
- // 是否自动前往第二步
- if (step === 0 && newPubListChoosed.length !== 0) {
- const isFront = newPubListChoosed.every(
- (v) =>
- v.params.des ||
- v.params.video ||
- v.params.images?.length !== 0,
+ // 离线账户的点击由头像容器处理,这里不处理
+ if (isOffline) {
+ return;
+ }
+ if (isPcNotSupported) {
+ setCurrentPlatform(platConfig?.name || "");
+ setDownloadModalVisible(true);
+ return;
+ }
+ const newPubListChoosed = [...pubListChoosed];
+ // 查找当前账户是否已被选择
+ const index = newPubListChoosed.findIndex(
+ (v) => v.account.id === pubItem.account.id,
);
- if (isFront) {
- setStep(1);
+ if (index !== -1) {
+ newPubListChoosed.splice(index, 1);
+ } else {
+ newPubListChoosed.push(pubItem);
}
- }
- if (newPubListChoosed.length === 1) {
- setExpandedPubItem(newPubListChoosed[0]);
- }
- setPubListChoosed(newPubListChoosed);
- }}
- >
- {/* 账号头像:离线或PC不支持显示遮罩并禁用 */}
- <div
- style={{ position: "relative" }}
-
- >
- <AvatarPlat
- className={`publishDialog-con-acconts-item-avatar ${!isChoosed || isOffline || isPcNotSupported || isTikTokForbidden ? 'disabled' : ''}`}
- account={pubItem.account}
- size="large"
- disabled={isOffline || !isChoosed || isPcNotSupported || isTikTokForbidden}
- />
- {isTikTokForbidden && (
- <div
- style={{
- position: "absolute",
- inset: 0,
- background: "rgba(0,0,0,0.6)",
- borderRadius: "50%",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- color: "#fff",
- fontSize: 12,
- fontWeight: 600,
- pointerEvents: "none",
- }}
- >
- {t('badges.forbidden' as any)}
- </div>
- )}
- {isOffline && (
- <div
- onClick={(e) => {
- // TikTok 禁止发布:不允许任何点击
- if (isTikTokForbidden) {
- return;
+ // 是否自动回到第一步
+ if (newPubListChoosed.length === 0 && step === 1) {
+ const isBack = newPubListChoosed.every(
+ (v) =>
+ !v.params.des &&
+ !v.params.video &&
+ !v.params.images?.length,
+ );
+ if (isBack) {
+ setStep(0);
}
- // 只有离线账户才触发授权跳转
- if (isOffline) {
- handleOfflineAvatarClick(pubItem.account);
+ }
+ // 是否自动前往第二步
+ if (step === 0 && newPubListChoosed.length !== 0) {
+ const isFront = newPubListChoosed.every(
+ (v) =>
+ v.params.des ||
+ v.params.video ||
+ v.params.images?.length !== 0,
+ );
+ if (isFront) {
+ setStep(1);
}
- // 正常账户的点击事件由父容器处理,这里不需要额外处理
- }}
- style={{
- position: "absolute",
- inset: 0,
- background: "rgba(0,0,0,0.45)",
- borderRadius: "50%",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- color: "#fff",
- fontSize: 12,
- fontWeight: 600,
- pointerEvents: "auto",
- cursor: "pointer",
- }}
- >
- {t('badges.offline' as any)}
- </div>
- )}
- {isPcNotSupported && !isOffline && (
- <div
- style={{
- position: "absolute",
- inset: 0,
- background: "rgba(0,0,0,0.6)",
- borderRadius: "50%",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- color: "#fff",
- fontSize: 10,
- fontWeight: 600,
- pointerEvents: "none",
- textAlign: "center",
- lineHeight: 1.2,
- }}
- >
- APP
- </div>
- )}
- </div>
+ }
+ if (newPubListChoosed.length === 1) {
+ setExpandedPubItem(newPubListChoosed[0]);
+ }
+ setPubListChoosed(newPubListChoosed);
+ }}
+ >
+ {/* 账号头像:离线或PC不支持显示遮罩并禁用 */}
+ <div style={{ position: "relative" }}>
+ <AvatarPlat
+ className={`publishDialog-con-acconts-item-avatar ${!isChoosed || isOffline || isPcNotSupported || isTikTokForbidden ? "disabled" : ""}`}
+ account={pubItem.account}
+ size="large"
+ disabled={
+ isOffline ||
+ !isChoosed ||
+ isPcNotSupported ||
+ isTikTokForbidden
+ }
+ />
+ {isTikTokForbidden && (
+ <div
+ style={{
+ position: "absolute",
+ inset: 0,
+ background: "rgba(0,0,0,0.6)",
+ borderRadius: "50%",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ color: "#fff",
+ fontSize: 12,
+ fontWeight: 600,
+ pointerEvents: "none",
+ }}
+ >
+ {t("badges.forbidden" as any)}
+ </div>
+ )}
+ {isOffline && (
+ <div
+ onClick={(e) => {
+ // TikTok 禁止发布:不允许任何点击
+ if (isTikTokForbidden) {
+ return;
+ }
+ // 只有离线账户才触发授权跳转
+ if (isOffline) {
+ handleOfflineAvatarClick(pubItem.account);
+ }
+ // 正常账户的点击事件由父容器处理,这里不需要额外处理
+ }}
+ style={{
+ position: "absolute",
+ inset: 0,
+ background: "rgba(0,0,0,0.45)",
+ borderRadius: "50%",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ color: "#fff",
+ fontSize: 12,
+ fontWeight: 600,
+ pointerEvents: "auto",
+ cursor: "pointer",
+ }}
+ >
+ {t("badges.offline" as any)}
+ </div>
+ )}
+ {isPcNotSupported && !isOffline && (
+ <div
+ style={{
+ position: "absolute",
+ inset: 0,
+ background: "rgba(0,0,0,0.6)",
+ borderRadius: "50%",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ color: "#fff",
+ fontSize: 10,
+ fontWeight: 600,
+ pointerEvents: "none",
+ textAlign: "center",
+ lineHeight: 1.2,
+ }}
+ >
+ APP
+ </div>
+ )}
+ </div>
</div>
</Tooltip>
);
@@ -904,7 +941,7 @@ const PublishDialog = memo(
)}
{pubListChoosed.length >= 2 && (
<PubParmasTextarea
- key={`${commonPubParams.images?.length || 0}-${commonPubParams.video ? "video" : "no-video"}-${commonPubParams.des?.length || 0}`}
+ key={`${commonPubParams.images?.length || 0}-${commonPubParams.video ? "video" : "no-video"}`}
platType={PlatType.Instagram}
rows={16}
desValue={commonPubParams.des}
@@ -947,7 +984,10 @@ const PublishDialog = memo(
>
<PublishDialogDataPicker />
- <div className="publishDialog-footer-btns" style={{ display: 'flex', flexDirection: 'row', gap: 12 }}>
+ <div
+ className="publishDialog-footer-btns"
+ style={{ display: "flex", flexDirection: "row", gap: 12 }}
+ >
{step === 0 && pubListChoosed.length >= 2 ? (
<Button
size="large"
@@ -961,21 +1001,50 @@ const PublishDialog = memo(
</Button>
) : (
<>
- <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
+ <div
+ style={{
+ display: "flex",
+ alignItems: "center",
+ gap: 12,
+ }}
+ >
{moderationResult !== null && (
- <div style={{ display: 'flex', flexDirection: 'column' }}>
- <span style={{
- fontSize: 14,
- color: moderationResult ? '#52c41a' : '#ff4d4f',
- fontWeight: 500,
- }}>
- {moderationResult ? t('actions.contentSafe' as any) : (moderationLevel?.riskLevel ? `${t('actions.riskLevel' as any)} ${moderationLevel.riskLevel}` : t('actions.contentUnsafe' as any))}
+ <div
+ style={{ display: "flex", flexDirection: "column" }}
+ >
+ <span
+ style={{
+ fontSize: 14,
+ color: moderationResult ? "#52c41a" : "#ff4d4f",
+ fontWeight: 500,
+ }}
+ >
+ {moderationResult
+ ? t("actions.contentSafe" as any)
+ : moderationLevel?.riskLevel
+ ? `${t("actions.riskLevel" as any)} ${moderationLevel.riskLevel}`
+ : t("actions.contentUnsafe" as any)}
</span>
{!moderationResult && !!moderationDesc && (
- <span style={{ fontSize: 12, color: '#ff4d4f', maxWidth: 360, whiteSpace: 'pre-wrap', display: 'inline-flex', alignItems: 'center', gap: 6 }}>
+ <span
+ style={{
+ fontSize: 12,
+ color: "#ff4d4f",
+ maxWidth: 360,
+ whiteSpace: "pre-wrap",
+ display: "inline-flex",
+ alignItems: "center",
+ gap: 6,
+ }}
+ >
{moderationDesc}
- <Tooltip title={moderationLevel?.riskTips || ''} placement="top">
- <InfoCircleOutlined style={{ color: '#ff4d4f' }} />
+ <Tooltip
+ title={moderationLevel?.riskTips || ""}
+ placement="top"
+ >
+ <InfoCircleOutlined
+ style={{ color: "#ff4d4f" }}
+ />
</Tooltip>
</span>
)}
@@ -987,19 +1056,40 @@ const PublishDialog = memo(
size="large"
loading={moderationLoading}
onClick={handleContentModeration}
- type={moderationResult === true ? "primary" : moderationResult === false ? "default" : "default"}
+ type={
+ moderationResult === true
+ ? "primary"
+ : moderationResult === false
+ ? "default"
+ : "default"
+ }
style={{
- backgroundColor: moderationResult === true ? '#52c41a' : moderationResult === false ? '#ff4d4f' : undefined,
- borderColor: moderationResult === true ? '#52c41a' : moderationResult === false ? '#ff4d4f' : undefined,
- color: moderationResult === true || moderationResult === false ? '#fff' : undefined
+ backgroundColor:
+ moderationResult === true
+ ? "#52c41a"
+ : moderationResult === false
+ ? "#ff4d4f"
+ : undefined,
+ borderColor:
+ moderationResult === true
+ ? "#52c41a"
+ : moderationResult === false
+ ? "#ff4d4f"
+ : undefined,
+ color:
+ moderationResult === true ||
+ moderationResult === false
+ ? "#fff"
+ : undefined,
}}
>
- {moderationLoading ? t('actions.checkingContent' as any) : t('actions.contentModeration' as any)}
+ {moderationLoading
+ ? t("actions.checkingContent" as any)
+ : t("actions.contentModeration" as any)}
</Button>
)}
-
</div>
- <div style={{ display: 'flex', gap: 12 }}>
+ <div style={{ display: "flex", gap: 12 }}>
<Button size="large" onClick={closeDialog}>
{t("buttons.cancelPublish")}
</Button>
@@ -1032,14 +1122,26 @@ const PublishDialog = memo(
</div>
</div>
- <CSSTransition
- in={openRight}
- timeout={300}
- classNames="right"
- unmountOnExit
- >
- <PublishDialogPreview />
- </CSSTransition>
+ <div className="publishDialog-right">
+ {width < 1400 && (
+ <CSSTransition
+ in={openLeftSide}
+ timeout={300}
+ classNames="left"
+ unmountOnExit
+ >
+ <PublishDialogAi onClose={() => setOpenLeft(false)} />
+ </CSSTransition>
+ )}
+ <CSSTransition
+ in={openRight}
+ timeout={300}
+ classNames="right"
+ unmountOnExit
+ >
+ <PublishDialogPreview />
+ </CSSTransition>
+ </div>
</Modal>
{/* Draft Selection Modal */}
@@ -1047,7 +1149,11 @@ const PublishDialog = memo(
open={draftModalOpen}
onCancel={() => setDraftModalOpen(false)}
footer={null}
- title={selectedGroup ? t("draft.selectDraftItem") : t("draft.selectDraftGroup")}
+ title={
+ selectedGroup
+ ? t("draft.selectDraftItem")
+ : t("draft.selectDraftGroup")
+ }
width={720}
>
{!selectedGroup ? (
@@ -1209,7 +1315,11 @@ const PublishDialog = memo(
open={libraryModalOpen}
onCancel={() => setLibraryModalOpen(false)}
footer={null}
- title={selectedLibraryGroup ? t("draft.selectLibraryItem") : t("draft.selectLibraryGroup")}
+ title={
+ selectedLibraryGroup
+ ? t("draft.selectLibraryItem")
+ : t("draft.selectLibraryGroup")
+ }
width={720}
>
{!selectedLibraryGroup ? (
@@ -1286,7 +1396,9 @@ const PublishDialog = memo(
item.type === "img" ? "#52c41a" : "#1890ff",
}}
>
- {item.type === "img" ? t("draft.imageGroup") : t("draft.videoGroup")}
+ {item.type === "img"
+ ? t("draft.imageGroup")
+ : t("draft.videoGroup")}
</div>
</div>
</List.Item>
@@ -1369,6 +1481,13 @@ const PublishDialog = memo(
platform={currentPlatform}
appName="Aitoearn App"
/>
+
+ {/* Facebook页面选择弹窗 */}
+ <FacebookPagesModal
+ open={showFacebookPagesModal}
+ onClose={() => setShowFacebookPagesModal(false)}
+ onSuccess={handleFacebookPagesSuccess}
+ />
</>
);
},
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.module.scss b/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.module.scss
index 2742caef..97c096e0 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.module.scss
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.module.scss
@@ -1,10 +1,20 @@
-$assistantWidth: 330px;
+$assistantWidth: 380px;
.publishDialog {
width: auto !important;
margin: 0 auto;
display: inline-block;
:global {
+ .publishDialog-right {
+ display: flex;
+ position: relative;
+ #publishDialogAi {
+ position: absolute;
+ top: 0;
+ height: 100%;
+ }
+ }
+
.ant-modal-content {
padding: 0 !important;
}
@@ -135,10 +145,27 @@ $assistantWidth: 330px;
}
.publishDialogAi {
- margin-right: 15px;
+ display: flex;
+ flex-direction: column;
+ z-index: 10;
+ margin: 0 15px;
:global {
+ h1 {
+ font-size: var(--fs-md);
+ font-weight: 600;
+ text-align: left;
+ padding: 15px 15px 0 15px;
+ display: flex;
+ justify-content: space-between;
+ .anticon {
+ cursor: pointer;
+ font-size: 20px;
+ }
+ }
.publishDialogAi-wrapper {
min-width: $assistantWidth;
+ height: 100%;
+ min-height: 0;
}
}
}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.type.ts b/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.type.ts
index 1213c8a5..5b95f209 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.type.ts
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/publishDialog.type.ts
@@ -85,6 +85,10 @@ export interface IPlatOption {
// 品牌内容开关
brand_content_toggle?: boolean;
};
+ threads?: {
+ // 位置信息
+ location_id?: string | null;
+ };
}
// 发布参数
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/svgs/aibrush.svg b/aitoearn_web/aitoearn-web/src/components/PublishDialog/svgs/aibrush.svg
new file mode 100644
index 00000000..f962ea50
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/svgs/aibrush.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="publish_base_QFRw0" data-icon="wand-sparkles" aria-hidden="true" stroke-width="2.2" width="16" height="16"><path d="M14 7L17 10M5.00005 6V10M19 14V18M10 2V4M7.00004 8H3.00005M21 16H17M11 3H9.00004M21.64 3.64L20.36 2.36C20.2475 2.24632 20.1136 2.15607 19.966 2.09448C19.8184 2.03289 19.66 2.00118 19.5 2.00118C19.3401 2.00118 19.1817 2.03289 19.0341 2.09448C18.8865 2.15607 18.7526 2.24632 18.64 2.36L2.36004 18.64C2.24636 18.7525 2.15612 18.8865 2.09452 19.0341C2.03293 19.1817 2.00122 19.3401 2.00122 19.5C2.00122 19.6599 2.03293 19.8183 2.09452 19.9659C2.15612 20.1135 2.24636 20.2475 2.36004 20.36L3.64005 21.64C3.75187 21.7549 3.88558 21.8462 4.03329 21.9086C4.181 21.971 4.33971 22.0031 4.50005 22.0031C4.66038 22.0031 4.81909 21.971 4.9668 21.9086C5.11451 21.8462 5.24822 21.7549 5.36005 21.64L21.64 5.36C21.755 5.24818 21.8463 5.11447 21.9087 4.96676C21.971 4.81905 22.0031 4.66034 22.0031 4.5C22.0031 4.33966 21.971 4.18095 21.9087 4.03324C21.8463 3.88553 21.755 3.75182 21.64 3.64Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg>
\ No newline at end of file
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts b/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts
index d02f0522..e91ed5a6 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts
@@ -23,6 +23,7 @@ export interface IPublishDialogStore {
expandedPubItem?: PubItem;
// 错误提示
errParamsMap?: ErrPubParamsMapType;
+ warningParamsMap?: ErrPubParamsMapType;
// 发布时间
pubTime?: string;
}
@@ -53,6 +54,7 @@ const store: IPublishDialogStore = {
},
expandedPubItem: undefined,
errParamsMap: undefined,
+ warningParamsMap: undefined,
};
const getStore = () => {
@@ -81,6 +83,11 @@ export const usePublishDialog = create(
errParamsMap,
});
},
+ setWarningParamsMap(warningParamsMap: ErrPubParamsMapType) {
+ set({
+ warningParamsMap,
+ });
+ },
setStep(step: number) {
set({ step });
},
@@ -143,30 +150,40 @@ export const usePublishDialog = create(
for (let i = 0; i < pubList.length; i++) {
const v = pubList[i];
const platConfig = AccountPlatInfoMap.get(v.account.type)!;
-
+
// 更新描述
if (pubParmas.des !== undefined) {
v.params.des = pubParmas.des;
}
-
+
// 更新标题
if (pubParmas.title !== undefined) {
v.params.title = pubParmas.title;
}
-
+
// 更新视频(如果平台支持)
- if (pubParmas.video !== undefined && platConfig.pubTypes.has(PubType.VIDEO)) {
+ if (
+ pubParmas.video !== undefined &&
+ platConfig.pubTypes.has(PubType.VIDEO)
+ ) {
v.params.video = pubParmas.video;
}
-
+
// 更新图片(如果平台支持)
- if (pubParmas.images !== undefined && platConfig.pubTypes.has(PubType.ImageText)) {
+ if (
+ pubParmas.images !== undefined &&
+ platConfig.pubTypes.has(PubType.ImageText)
+ ) {
v.params.images = pubParmas.images;
}
-
+
// 更新选项
if (pubParmas.option) {
- v.params.option = lodash.merge({}, v.params.option, pubParmas.option);
+ v.params.option = lodash.merge(
+ {},
+ v.params.option,
+ pubParmas.option,
+ );
}
}
@@ -214,7 +231,9 @@ export const usePublishDialog = create(
const v = pubList[i];
const platConfig = AccountPlatInfoMap.get(v.account.type)!;
if (!pubListChoosed.some((k) => k.account.id === v.account.id)) {
- v.params.des = pubParmas.des || "";
+ if (pubParmas.des !== undefined) {
+ v.params.des = pubParmas.des || "";
+ }
if (platConfig.pubTypes.has(PubType.VIDEO) && pubParmas.video) {
v.params.video = pubParmas.video;
}
diff --git a/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialogData.ts b/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialogData.ts
index 514ecf91..c8b39699 100644
--- a/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialogData.ts
+++ b/aitoearn_web/aitoearn-web/src/components/PublishDialog/usePublishDialogData.ts
@@ -55,7 +55,7 @@ export const usePublishDialogData = create(
const res = await apiGetBilibiliPartitions(
useAccountStore
.getState()
- .accountList.find((v) => v.type === PlatType.BILIBILI)!.account,
+ .accountList.find((v) => v.type === PlatType.BILIBILI)!.id,
);
set({
bilibiliPartitions: res?.data,
@@ -114,7 +114,7 @@ export const usePublishDialogData = create(
return;
}
- const res:any = await apiGetYouTubeCategories(youtubeAccount.account, regionCode);
+ const res:any = await apiGetYouTubeCategories(youtubeAccount?.id || '', regionCode);
set({
youTubeCategories: res?.data.items || [],
});
diff --git a/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx b/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx
index 375def80..40ba191c 100644
--- a/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/SignInCalendar/index.tsx
@@ -1,14 +1,16 @@
"use client";
import React, { useState, useEffect, useMemo } from 'react';
-import { Button, Modal, Calendar, Badge, message } from 'antd';
-import { CalendarOutlined, CheckOutlined } from '@ant-design/icons';
+import { Button, Modal, Calendar, Badge, message, Image } from 'antd';
+import { BranchesOutlined, CheckOutlined } from '@ant-design/icons';
import { useTransClient } from '@/app/i18n/client';
import { signInApi, SignInType, SignInResponse, PublishDayInfoResponse, PublishInfoResponse } from '@/api/signIn';
import { useUserStore } from '@/store/user';
import { useRouter } from 'next/navigation';
import styles from './SignInCalendar.module.scss';
+import faya from "@/assets/images/faya.png";
+
interface SignInCalendarProps {
className?: string;
}
@@ -147,7 +149,7 @@ const SignInCalendar: React.FC<SignInCalendarProps> = ({ className }) => {
<>
<Button
type="text"
- icon={<CalendarOutlined />}
+ icon={<Image src={faya.src} alt="faya" style={{ width: 20, height: 'auto', marginTop: -5 }} preview={false}/>}
onClick={() => setVisible(true)}
className={`${styles.signInButton} ${className || ''}`}
title={t('signIn.title')}
diff --git a/aitoearn_web/aitoearn-web/src/components/VideoPreviewModal.tsx b/aitoearn_web/aitoearn-web/src/components/VideoPreviewModal.tsx
new file mode 100644
index 00000000..478be55a
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/VideoPreviewModal.tsx
@@ -0,0 +1,47 @@
+import { ForwardedRef, forwardRef, memo, useRef } from "react";
+import { Modal } from "antd";
+import { useTransClient } from "@/app/i18n/client";
+
+export interface IVideoPreviewModalRef {}
+
+export interface IVideoPreviewModalProps {
+ open: boolean;
+ videoUrl?: string;
+ onCancel: () => void;
+}
+
+const VideoPreviewModal = memo(
+ forwardRef(
+ (
+ { open, videoUrl, onCancel }: IVideoPreviewModalProps,
+ ref: ForwardedRef<IVideoPreviewModalRef>,
+ ) => {
+ const videoRef = useRef<HTMLVideoElement>(null);
+ const { t } = useTransClient("publish");
+
+ return (
+ <Modal
+ title={t("previewvideo")}
+ open={open}
+ footer={null}
+ onCancel={() => {
+ if (videoRef.current) {
+ videoRef.current.pause();
+ }
+ onCancel();
+ }}
+ width={720}
+ >
+ <video
+ ref={videoRef}
+ controls
+ style={{ width: "100%", maxHeight: "80vh" }}
+ src={videoUrl}
+ />
+ </Modal>
+ );
+ },
+ ),
+);
+
+export default VideoPreviewModal;
diff --git a/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx b/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx
index dc0ffb28..1082c87c 100644
--- a/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/common/DownloadAppModal.tsx
@@ -150,9 +150,10 @@ const DownloadAppModal: React.FC<DownloadAppModalProps> = ({
code
style={{
flex: 1,
- fontSize: '11px',
+ fontSize: '15px',
wordBreak: 'break-all',
- textAlign: 'left'
+ textAlign: 'left',
+
}}
>
{downloadUrl || getMainAppDownloadUrl()}
diff --git a/aitoearn_web/aitoearn-web/src/components/common/LanguageSwitcher.tsx b/aitoearn_web/aitoearn-web/src/components/common/LanguageSwitcher.tsx
new file mode 100644
index 00000000..477fcbeb
--- /dev/null
+++ b/aitoearn_web/aitoearn-web/src/components/common/LanguageSwitcher.tsx
@@ -0,0 +1,131 @@
+"use client";
+
+import { Button, Dropdown, MenuProps } from "antd";
+import { CaretDownOutlined } from "@ant-design/icons";
+import Image from "next/image";
+import { useRouter } from "next/navigation";
+import { useUserStore } from "@/store/user";
+import zhLang from "@/assets/images/zh.png";
+import enLang from "@/assets/images/us.png";
+
+export interface LanguageSwitcherProps {
+ className?: string;
+ style?: React.CSSProperties;
+ size?: 'small' | 'middle' | 'large';
+}
+
+const LanguageSwitcher = ({ className, style, size = 'middle' }: LanguageSwitcherProps) => {
+ const userStore = useUserStore();
+ const router = useRouter();
+
+ const handleLanguageChange = (newLng: string) => {
+ userStore.setLang(newLng);
+
+ // 获取当前路径并替换语言前缀
+ const currentPath = location.pathname;
+ const pathWithoutLang = currentPath.replace(`/${userStore.lang}`, "") || "/";
+ const newPath = `/${newLng}${pathWithoutLang}`;
+
+ router.push(newPath);
+ };
+
+ // 语言选项配置
+ const languageOptions = [
+ {
+ key: 'en',
+ label: 'English',
+ flag: enLang,
+ current: userStore.lang === 'en'
+ },
+ {
+ key: 'zh-CN',
+ label: '简体中文',
+ flag: zhLang,
+ current: userStore.lang === 'zh-CN'
+ }
+ ];
+
+ const currentLanguage = languageOptions.find(lang => lang.current) || languageOptions[0];
+
+ const languageMenuItems: MenuProps['items'] = languageOptions.map(option => ({
+ key: option.key,
+ label: (
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }}>
+ <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
+ <Image
+ src={option.flag}
+ alt={option.label}
+ width={16}
+ height={16}
+ style={{ borderRadius: '50%' }}
+ />
+ <span style={{ color: option.current ? '#52c41a' : '#000' }}>{option.label}</span>
+ </div>
+ {option.current && <span style={{ color: '#52c41a' }}>✓</span>}
+ </div>
+ ),
+ onClick: () => handleLanguageChange(option.key)
+ }));
+
+ const getButtonSize = () => {
+ switch (size) {
+ case 'small':
+ return {
+ padding: '2px 6px',
+ fontSize: '10px',
+ iconSize: 12
+ };
+ case 'large':
+ return {
+ padding: '6px 12px',
+ fontSize: '14px',
+ iconSize: 16
+ };
+ default:
+ return {
+ padding: '4px 8px',
+ fontSize: '12px',
+ iconSize: 14
+ };
+ }
+ };
+
+ const buttonConfig = getButtonSize();
+
+ return (
+ <Dropdown
+ menu={{ items: languageMenuItems }}
+ trigger={['click']}
+ placement="bottomRight"
+ >
+ <Button
+ type="text"
+ className={className}
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ gap: '8px',
+ padding: '4px 8px',
+ height: 'auto',
+ fontSize: '12px',
+ backgroundColor: '#fff',
+ border: '1px solid #EBEDEC',
+ borderRadius: '30px',
+ ...style
+ }}
+ >
+ <Image
+ src={currentLanguage.flag}
+ alt={currentLanguage.label}
+ width={buttonConfig.iconSize}
+ height={buttonConfig.iconSize}
+ style={{ borderRadius: '50%' }}
+ />
+ <span style={{ fontSize: '12px' }}>{currentLanguage.label}</span>
+ <CaretDownOutlined style={{ fontSize: buttonConfig.fontSize }} />
+ </Button>
+ </Dropdown>
+ );
+};
+
+export default LanguageSwitcher;
diff --git a/aitoearn_web/aitoearn-web/src/components/common/index.ts b/aitoearn_web/aitoearn-web/src/components/common/index.ts
index f68b226a..2c993189 100644
--- a/aitoearn_web/aitoearn-web/src/components/common/index.ts
+++ b/aitoearn_web/aitoearn-web/src/components/common/index.ts
@@ -1,3 +1,4 @@
// 通用组件导出
export { default as DownloadAppModal } from './DownloadAppModal';
+export { default as LanguageSwitcher } from './LanguageSwitcher';
diff --git a/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsx
index 639d9bcd..4273e878 100644
--- a/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/modals/PointsDetailModal.tsx
@@ -73,7 +73,7 @@ const PointsDetailModal = memo(({ open, onClose }: PointsDetailModalProps) => {
footer={null}
width={980}
className={styles.outsideCloseModal}
- destroyOnClose
+ destroyOnHidden
centered
>
<div style={{ background: '#fff', borderRadius: 12 }}>
diff --git a/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsx
index cdbddef1..54ecd368 100644
--- a/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/modals/PointsRechargeModal.tsx
@@ -69,7 +69,7 @@ const PointsRechargeModal = memo(({ open, onClose }: PointsRechargeModalProps) =
width={modalWidth}
centered
className={styles.outsideCloseModal}
- destroyOnClose
+ destroyOnHidden
>
<Space direction="vertical" size={16} style={{width:'100%'}}>
<div style={{display:'flex', justifyContent:'space-between', alignItems:'center', marginTop:18}}>
diff --git a/aitoearn_web/aitoearn-web/src/components/modals/SubscriptionManagementModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/SubscriptionManagementModal.tsx
index e1cea540..0e82f373 100644
--- a/aitoearn_web/aitoearn-web/src/components/modals/SubscriptionManagementModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/modals/SubscriptionManagementModal.tsx
@@ -29,6 +29,30 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
const { t: tVip } = useTransClient('vip');
const { userInfo } = useUserStore();
+ // 状态判断辅助函数
+ const getVipStatusInfo = (status: string) => {
+ switch (status) {
+ case 'none':
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'trialing':
+ return { isVip: true, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'monthly_once':
+ return { isVip: true, isMonthly: true, isYearly: false, isAutoRenew: false, isOnce: true };
+ case 'yearly_once':
+ return { isVip: true, isMonthly: false, isYearly: true, isAutoRenew: false, isOnce: true };
+ case 'active_monthly':
+ return { isVip: true, isMonthly: true, isYearly: false, isAutoRenew: true, isOnce: false };
+ case 'active_yearly':
+ return { isVip: true, isMonthly: false, isYearly: true, isAutoRenew: true, isOnce: false };
+ case 'active_nonrenewing':
+ return { isVip: true, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'expired':
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ default:
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ }
+ };
+
// 订单相关状态
const [orders, setOrders] = useState<Order[]>([]);
const [subscriptions, setSubscriptions] = useState<Order[]>([]);
@@ -155,7 +179,7 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
[OrderStatus.REFUNDED]: { color: 'purple', text: tProfile('refundSuccess') },
[OrderStatus.EXPIRED]: { color: 'red', text: tProfile('orderCancelled') }
};
- const config = statusMap[status] || { color: 'default', text: `状态${status}` };
+ const config = statusMap[status] || { color: 'default', text: `${tProfile('status')}${status}` };
return <Tag color={config.color}>{config.text}</Tag>;
};
@@ -190,7 +214,7 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
width={1000}
className={styles.subscriptionModal}
- destroyOnClose
+ destroyOnHidden
centered
>
<div className={styles.modalContent}>
@@ -205,10 +229,26 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
</div>
<div className={styles.membershipDetails}>
<div className={styles.membershipName}>
- {userInfo?.vipInfo?.cycleType === 1
- ? tVip('modal.vipInfo.monthly' as any)
- : tVip('modal.vipInfo.yearly' as any)}
- {userInfo?.vipInfo?.autoContinue === false && ` (${tVip('modal.vipInfo.singleMonth' as any)})`}
+ {(() => {
+ if (!userInfo?.vipInfo) return tVip('modal.vipInfo.monthly' as any);
+ const statusInfo = getVipStatusInfo(userInfo.vipInfo.status);
+ if (statusInfo.isYearly && statusInfo.isAutoRenew) {
+ return tVip('modal.vipInfo.yearly' as any);
+ } else if (statusInfo.isYearly && !statusInfo.isAutoRenew) {
+ return tVip('modal.vipInfo.yearly' as any) + ` (${tVip('modal.vipInfo.singleMonth' as any)})`;
+ } else if (statusInfo.isMonthly && statusInfo.isAutoRenew) {
+ return tVip('modal.vipInfo.monthly' as any);
+ } else if (statusInfo.isMonthly && !statusInfo.isAutoRenew) {
+ return tVip('modal.vipInfo.monthly' as any) + ` (${tVip('modal.vipInfo.singleMonth' as any)})`;
+ } else if (statusInfo.isOnce) {
+ return statusInfo.isYearly ? tVip('modal.vipInfo.yearly' as any) + ` (${tVip('modal.vipInfo.singleMonth' as any)})` : tVip('modal.vipInfo.monthly' as any) + ` (${tVip('modal.vipInfo.singleMonth' as any)})`;
+ } else if (userInfo.vipInfo.status === 'trialing') {
+ return tVip('modal.vipInfo.monthly' as any) + ` (${tVip('modal.vipInfo.trial' as any)})`;
+ } else if (userInfo.vipInfo.status === 'active_nonrenewing') {
+ return tVip('modal.vipInfo.cancelled' as any);
+ }
+ return tVip('modal.vipInfo.monthly' as any);
+ })()}
</div>
<div>
@@ -234,9 +274,6 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
{/* 根据 autoContinue 显示不同的内容 */}
<div className={styles.autoRenewal}>
- {userInfo?.vipInfo?.autoContinue ? ( <h3>{tVip('activatedAutoRenewalPlans' as any)}</h3> ) : (
- <h3>{tVip('activatedAutoRenewalPlansno' as any)}</h3>
- )}
{
subscriptions.length ?(
@@ -290,7 +327,7 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
className={styles.copyBtn}
onClick={() => {
navigator.clipboard.writeText(subscription.id);
- message.success('已复制');
+ message.success(tProfile('copySuccess'));
}}
>
📋
@@ -388,10 +425,9 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
<div key={order._id} className={styles.orderCard}>
<div className={styles.orderHeader}>
<div className={styles.orderTitle}>
- {userInfo?.vipInfo?.cycleType === 1
- ? tVip('modal.vipInfo.monthly' as any)
- : tVip('modal.vipInfo.yearly' as any)}
- {userInfo?.vipInfo?.autoContinue === false && ` (${tVip('modal.vipInfo.singleMonth' as any)})`}
+ {
+ getPaymentTypeText(order.metadata?.payment)
+ }
</div>
</div>
<div className={styles.orderDetails}>
@@ -434,7 +470,7 @@ const SubscriptionManagementModal = memo(({ open, onClose }: SubscriptionManagem
className={styles.copyBtn}
onClick={() => {
navigator.clipboard.writeText(order.id);
- message.success('已复制');
+ message.success(tProfile('copySuccess'));
}}
>
📋
diff --git a/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsx b/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsx
index 349d38ba..bc78695d 100644
--- a/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsx
+++ b/aitoearn_web/aitoearn-web/src/components/modals/VipContentModal.tsx
@@ -35,11 +35,37 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
// 辅助函数处理翻译
const translate = (key: string) => t(key as any);
+ // 状态判断辅助函数
+ const getVipStatusInfo = (status: string) => {
+ switch (status) {
+ case 'none':
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'trialing':
+ return { isVip: true, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'monthly_once':
+ return { isVip: true, isMonthly: true, isYearly: false, isAutoRenew: false, isOnce: true };
+ case 'yearly_once':
+ return { isVip: true, isMonthly: false, isYearly: true, isAutoRenew: false, isOnce: true };
+ case 'active_monthly':
+ return { isVip: true, isMonthly: true, isYearly: false, isAutoRenew: true, isOnce: false };
+ case 'active_yearly':
+ return { isVip: true, isMonthly: false, isYearly: true, isAutoRenew: true, isOnce: false };
+ case 'active_nonrenewing':
+ return { isVip: true, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ case 'expired':
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ default:
+ return { isVip: false, isMonthly: false, isYearly: false, isAutoRenew: false, isOnce: false };
+ }
+ };
+
// 判断用户是否为有效会员
const isVip = useMemo(() => {
- return userStore.userInfo?.vipInfo &&
- userStore.userInfo.vipInfo.expireTime &&
- new Date(userStore.userInfo.vipInfo.expireTime) > new Date();
+ const vipInfo = userStore.userInfo?.vipInfo;
+ if (!vipInfo) return false;
+
+ const statusInfo = getVipStatusInfo(vipInfo.status);
+ return statusInfo.isVip && vipInfo.expireTime && new Date(vipInfo.expireTime) > new Date();
}, [userStore.userInfo]);
// 判断用户是否已经是相同类型的会员且未过期
@@ -53,10 +79,11 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
}
const vipInfo = userStore.userInfo.vipInfo;
+ const statusInfo = getVipStatusInfo(vipInfo.status);
return {
- month: vipInfo.cycleType === 1, // 1 是月度
- year: vipInfo.cycleType === 2, // 2 是年度
- once: false // 一次性购买不在此判断范围内
+ month: statusInfo.isMonthly && statusInfo.isAutoRenew, // 连续包月
+ year: statusInfo.isYearly && statusInfo.isAutoRenew, // 连续包年
+ once: statusInfo.isOnce // 一次性购买
};
}, [userStore.userInfo, isVip]);
@@ -159,7 +186,7 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
footer={null}
width={modalWidth}
className={styles.outsideCloseModal}
- destroyOnClose
+ destroyOnHidden
centered
>
<div className={vipStyles.wrapper}>
@@ -215,14 +242,32 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
<div className={vipStyles.planType}>
{translate('modal.vipInfo.planType')}:
<span className={vipStyles.planValue}>
- { userStore.userInfo.vipInfo.cycleType === 2 && ( userStore.userInfo.vipInfo.autoContinue ? translate('modal.vipInfo.yearly') : translate('modal.vipInfo.yearly2'))}
- { userStore.userInfo.vipInfo.cycleType === 1 && ( userStore.userInfo.vipInfo.autoContinue ? translate('modal.vipInfo.monthly') : translate('modal.vipInfo.monthly2'))}
-
- {/* {!userStore.userInfo.vipInfo.autoContinue && ` (${translate('modal.vipInfo.singleMonth')})`} */}
+ {(() => {
+ const statusInfo: any = getVipStatusInfo(userStore.userInfo.vipInfo.status);
+ if (statusInfo.isYearly && statusInfo.isAutoRenew) {
+ return translate('modal.vipInfo.yearly');
+ } else if (statusInfo.isYearly && !statusInfo.isAutoRenew) {
+ return translate('modal.vipInfo.yearly2');
+ } else if (statusInfo.isMonthly && statusInfo.isAutoRenew) {
+ return translate('modal.vipInfo.monthly');
+ } else if (statusInfo.isMonthly && !statusInfo.isAutoRenew) {
+ return translate('modal.vipInfo.monthly2');
+ } else if (statusInfo.isOnce) {
+ return statusInfo.isYearly ? translate('modal.vipInfo.yearly2') : translate('modal.vipInfo.monthly2');
+ } else if (userStore.userInfo.vipInfo.status === 'trialing') {
+ return ` ${translate('modal.vipInfo.trial' as any)}`;
+ } else if (userStore.userInfo.vipInfo.status === 'active_nonrenewing') {
+ return translate('modal.vipInfo.cancelled' as any);
+ }
+ return translate('modal.vipInfo.monthly');
+ })()}
</span>
</div>
<div className={vipStyles.expireTime}>
- { userStore.userInfo.vipInfo.autoContinue ? translate('modal.vipInfo.xufeiTime') : translate('modal.vipInfo.expireTime')}:
+ {(() => {
+ const statusInfo = getVipStatusInfo(userStore.userInfo.vipInfo.status);
+ return statusInfo.isAutoRenew ? translate('modal.vipInfo.xufeiTime') : translate('modal.vipInfo.expireTime');
+ })()}:
<span className={vipStyles.expireValue}>
{new Date(userStore.userInfo.vipInfo.expireTime).toLocaleDateString()}
</span>
@@ -261,7 +306,12 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
{translate('modal.tabs.monthly')} <Tag style={{ marginLeft: 6, border: '1px solid rgba(184,221,255,.08)' }}>{translate('modal.savings.monthly')}</Tag>
</div>
{
- !userStore.userInfo?.vipInfo?.autoContinue && (
+ (() => {
+ const vipInfo = userStore.userInfo?.vipInfo;
+ if (!vipInfo) return true;
+ const statusInfo = getVipStatusInfo(vipInfo.status);
+ return !statusInfo.isAutoRenew;
+ })() && (
<div onClick={() => handleTabClick('once')} className={`${vipStyles.switchBtn} ${activeTab === 'once' ? vipStyles.active : ''}`}>
{translate('modal.tabs.once')}
</div>
@@ -284,8 +334,9 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
<Button disabled className={vipStyles.freeBtn}>
{isVip ? translate('modal.free.freePlan') : translate('modal.free.currentPlan')}
</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div>
+ {/* <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div> */}
<ul className={vipStyles.featureList}>
+ <li>{translate('modal.free.points')}</li>
<li>{translate('modal.free.features.dailyPoints')}</li>
<li>{translate('modal.free.features.maxPoints')}</li>
<li>{translate('modal.free.features.videos')}</li>
@@ -304,14 +355,14 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
className={vipStyles.primaryBtn}
onClick={() => handleActivate('year')}
loading={loading}
- disabled={isCurrentPlan.year&& userStore.userInfo?.vipInfo?.autoContinue}
+ disabled={isCurrentPlan.year || isCurrentPlan.month}
>
- {(isCurrentPlan.year && userStore.userInfo?.vipInfo?.autoContinue) ? translate('currentPlan') : translate('modal.plans.goumai')}
+ {isCurrentPlan.year ? translate('currentPlan') : translate('modal.plans.goumai')}
</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.yearly.points')}</div>
- <div className={vipStyles.subDesc}>{translate('modal.plans.yearly.description')}</div>
+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.yearly.features.dailyPoints')}</div>
+ <div className={vipStyles.subDesc}>{translate('modal.plans.yearly.points')}</div>
<ul className={vipStyles.featureList}>
- <li>{translate('modal.plans.yearly.features.dailyPoints')}</li>
+ <li>{translate('modal.plans.yearly.description')}</li>
<li>{translate('modal.plans.yearly.features.contentReview')}</li>
<li>{translate('modal.plans.yearly.features.multiModel')}</li>
<li>{translate('modal.plans.yearly.features.textToVideo')}</li>
@@ -333,8 +384,8 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
<Button disabled className={vipStyles.freeBtn}>
{isVip ? translate('modal.free.freePlan') : translate('modal.free.currentPlan')}
</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div>
<ul className={vipStyles.featureList}>
+ <li>{translate('modal.free.points')}</li>
<li>{translate('modal.free.features.dailyPoints')}</li>
<li>{translate('modal.free.features.maxPoints')}</li>
<li>{translate('modal.free.features.videos')}</li>
@@ -353,14 +404,14 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
className={vipStyles.primaryBtn}
onClick={() => handleActivate('month')}
loading={loading}
- disabled={isCurrentPlan.month&& userStore.userInfo?.vipInfo?.autoContinue}
+ disabled={isCurrentPlan.month || isCurrentPlan.year}
>
- {(isCurrentPlan.month && userStore.userInfo?.vipInfo?.autoContinue) ? translate('currentPlan') : translate('modal.plans.goumai')}
+ {isCurrentPlan.month ? translate('currentPlan') : translate('modal.plans.goumai')}
</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.monthly.points')}</div>
- <div className={vipStyles.subDesc}>{translate('modal.plans.monthly.description')}</div>
+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.yearly.features.dailyPoints')}</div>
+ <div className={vipStyles.subDesc}>{translate('modal.plans.monthly.points')}</div>
<ul className={vipStyles.featureList}>
- <li>{translate('modal.plans.yearly.features.dailyPoints')}</li>
+ <li>{translate('modal.plans.monthly.description')}</li>
<li>{translate('modal.plans.yearly.features.contentReview')}</li>
<li>{translate('modal.plans.yearly.features.multiModel')}</li>
<li>{translate('modal.plans.yearly.features.textToVideo')}</li>
@@ -381,8 +432,8 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
<Button disabled className={vipStyles.freeBtn}>
{isVip ? translate('modal.free.freePlan') : translate('modal.free.currentPlan')}
</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.free.points')}</div>
<ul className={vipStyles.featureList}>
+ <li>{translate('modal.free.points')}</li>
<li>{translate('modal.free.features.dailyPoints')}</li>
<li>{translate('modal.free.features.maxPoints')}</li>
<li>{translate('modal.free.features.videos')}</li>
@@ -401,10 +452,10 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
>
{translate('modal.plans.goumai')}
</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.once.points')}</div>
- <div className={vipStyles.subDesc}>{translate('modal.plans.once.description')}</div>
+ <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> {translate('modal.plans.yearly.features.dailyPoints')}</div>
+ <div className={vipStyles.subDesc}>{translate('modal.plans.once.points')}</div>
<ul className={vipStyles.featureList}>
- <li>{translate('modal.plans.yearly.features.dailyPoints')}</li>
+ <li>{translate('modal.plans.once.description')}</li>
<li>{translate('modal.plans.yearly.features.contentReview')}</li>
<li>{translate('modal.plans.yearly.features.multiModel')}</li>
<li>{translate('modal.plans.yearly.features.textToVideo')}</li>
@@ -415,68 +466,6 @@ const VipContentModal = memo(({ open, onClose }: VipContentModalProps) => {
</>
)}
- {/* <div className={vipStyles.freeCard}>
- <div className={vipStyles.freeTitle}>免费</div>
- <div className={vipStyles.freePrice}><span>¥</span>0<span className={vipStyles.unit}>每月</span></div>
- <div className={vipStyles.freeForever}>永久</div>
- <Button disabled className={vipStyles.freeBtn}>当前计划</Button>
- <div className={vipStyles.freeItem}>发布赠送积分</div>
- </div>
-
- <div className={vipStyles.planCard}>
- <div className={vipStyles.planHead}>一次性月度会员</div>
- <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>¥</span><span className={vipStyles.bigNum}>1</span><span className={vipStyles.unit}>天</span></div>
- <div className={vipStyles.planDesc}>1元试用7天,首年5折¥329 · 次年¥659自动续费</div>
- <Button className={vipStyles.primaryBtn}>¥1 试用7天</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> 1,080积分每月</div>
- <div className={vipStyles.subDesc}>最多生成4320张图和216个视频</div>
- <ul className={vipStyles.featureList}>
- <li>每天赠送积分</li>
- <li>生成类视频无限次加速</li>
- <li>生成作品去除品牌水印</li>
- <li>视频内置罩</li>
- <li>内容安全审核</li>
- <li>视频更流畅(可补帧到最高60FPS)</li>
- </ul>
- </div>
-
- <div className={vipStyles.planCard}>
- <div className={vipStyles.planHead}>✚ 月度会员</div>
- <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>¥</span><span className={vipStyles.bigNum}>949</span><span className={vipStyles.unit}>每年</span></div>
- <div className={vipStyles.planDesc}>首年5折¥949 · 次年续费金额¥1,899 · 包年可随时取消</div>
- <Button className={vipStyles.primaryBtn}>¥949 首年5折</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> 4,000积分每月</div>
- <div className={vipStyles.subDesc}>最多生成16000张图和800个视频</div>
- <ul className={vipStyles.featureList}>
- <li>每天赠送积分</li>
- <li>生成类视频无限次加速</li>
- <li>生成作品去除品牌水印</li>
- <li>视频内置罩</li>
- <li>内容安全审核</li>
- <li>视频更流畅(可补帧到最高60FPS)</li>
- </ul>
- </div>
-
- <div className={`${vipStyles.planCard} ${vipStyles.premium}`} >
- <div className={vipStyles.planHead}>✚ 年度会员 <Tag color="#5b7cff">最划算</Tag></div>
- <div className={vipStyles.planPriceLine}><span className={vipStyles.currency}>¥</span><span className={vipStyles.bigNum}>2,599</span><span className={vipStyles.unit}>每年</span></div>
- <div className={vipStyles.planDesc}>首年5折¥2,599 · 次年续费金额¥5,199 · 包年可随时取消</div>
- <Button className={vipStyles.primaryBtn}>¥2,599 首年5折</Button>
- <div className={vipStyles.benefitBox}><span className={vipStyles.dot} /> 15,000积分每月</div>
- <div className={vipStyles.subDesc}>最多生成60000张图和3000个视频</div>
- <ul className={vipStyles.featureList}>
- <li>每天赠送积分</li>
- <li>生成类视频无限次加速(最快)</li>
- <li>生成作品去除品牌水印</li>
- <li>视频内置罩</li>
- <li>内容安全审核</li>
- <li>视频更流畅(可补帧到最高60FPS)</li>
- </ul>
- </div> */}
-
-
-
-
</div>
</div>
diff --git a/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.css b/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.css
index a414d18b..f1e1c189 100644
--- a/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.css
+++ b/aitoearn_web/aitoearn-web/src/components/modals/vipContentModal.module.css
@@ -131,7 +131,10 @@
.currency { font-size: 18px; }
.bigNum { font-size: 44px; font-weight: 800; color: #111827; }
.planDesc { font-size: 12px; color: #6b7280; margin-bottom: 12px; line-height: 1.6; }
-.primaryBtn { width: 100%; background: #a66ae4; border-color: #a66ae4; color: #ffffff; font-weight: 700; margin-bottom: 16px; }
+
+
+
+.primaryBtn { width: 100%; background: linear-gradient(92deg,#66e9ff,#b5e9fd 34.5%,#a396ff 66.5%,#a66ae4) !important; border-color: #a66ae4; color: #ffffff; font-weight: 600 !important; margin-bottom: 16px; }
.primaryBtn:hover { background: #9556d1; border-color: #9556d1; }
.benefitBox { background: #f8f4ff; border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; color: #7c3aed; margin-bottom: 8px; }
diff --git a/aitoearn_web/aitoearn-web/src/hooks/useSystem.ts b/aitoearn_web/aitoearn-web/src/hooks/useSystem.ts
index c704e288..f28726c9 100644
--- a/aitoearn_web/aitoearn-web/src/hooks/useSystem.ts
+++ b/aitoearn_web/aitoearn-web/src/hooks/useSystem.ts
@@ -1,7 +1,14 @@
import { useParams } from "next/navigation";
-import { fallbackLng } from "@/app/i18n/settings";
+import { fallbackLng, languages } from "@/app/i18n/settings";
export function useGetClientLng() {
- const lng = useParams()?.lng || fallbackLng;
- return lng as string;
+ const params = useParams();
+ const lng = params?.lng;
+
+ // 确保返回的语言在支持的语言列表中
+ if (lng && languages.includes(lng as string)) {
+ return lng as string;
+ }
+
+ return fallbackLng;
}
diff --git a/aitoearn_web/aitoearn-web/src/store/user.ts b/aitoearn_web/aitoearn-web/src/store/user.ts
index f82fa494..ac6951b8 100644
--- a/aitoearn_web/aitoearn-web/src/store/user.ts
+++ b/aitoearn_web/aitoearn-web/src/store/user.ts
@@ -19,9 +19,9 @@ export interface UserInfo {
popularizeCode?: string;
vipInfo?: {
id: string;
- cycleType: number;
expireTime: string;
- autoContinue: boolean;
+ startTime: string;
+ status: 'none' | 'trialing' | 'monthly_once' | 'yearly_once' | 'active_monthly' | 'active_yearly' | 'active_nonrenewing' | 'expired';
_id: string;
};
}
diff --git a/aitoearn_web/aitoearn-web/src/utils/index.ts b/aitoearn_web/aitoearn-web/src/utils/index.ts
index be67e865..3c00b640 100644
--- a/aitoearn_web/aitoearn-web/src/utils/index.ts
+++ b/aitoearn_web/aitoearn-web/src/utils/index.ts
@@ -116,3 +116,14 @@ export async function sensitivityLoading() {
}
message.destroy(key);
}
+
+// base64转Blob
+export function dataURLToBlob(dataURL: string): Blob {
+ const [header, data] = dataURL.split(",");
+ const mime = header.match(/data:(.*?);base64/)?.[1] || "image/png";
+ const binary = atob(data);
+ const len = binary.length;
+ const u8 = new Uint8Array(len);
+ for (let i = 0; i < len; i++) u8[i] = binary.charCodeAt(i);
+ return new Blob([u8], { type: mime });
+}