Skip to content

Let's use AI to Earn!

fix(web): jiaoben416 (#417)

布莱恩·奥夫托·杰森张b355968e4ece
diff --git a/project/web/src/app/[lng]/layout.tsx b/project/web/src/app/[lng]/layout.tsx
index 7be137d9..15ec57fd 100644
--- a/project/web/src/app/[lng]/layout.tsx
+++ b/project/web/src/app/[lng]/layout.tsx
@@ -34,6 +34,13 @@ export default async function RootLayout({
return (
<html lang={lng} dir={dir(lng)} suppressHydrationWarning>
<body>
+ {/* Rewardful 脚本 */}
+ <script
+ dangerouslySetInnerHTML={{
+ __html: `(function(w,r){w._rwq=r;w[r]=w[r]||function(){(w[r].q=w[r].q||[]).push(arguments)}})(window,'rewardful');`,
+ }}
+ />
+ <script async src="https://r.wdfl.co/rw.js" data-rewardful="ded70f" />
<Providers lng={lng}>
{/* 移动端顶部导航 - fixed 定位,独立于 flex 布局 */}
<MobileNav />
diff --git a/project/web/src/app/i18n/locales/en/chat.json b/project/web/src/app/i18n/locales/en/chat.json
index deadc003..de1f46b3 100644
--- a/project/web/src/app/i18n/locales/en/chat.json
+++ b/project/web/src/app/i18n/locales/en/chat.json
@@ -34,7 +34,8 @@
"startChat": "Start Creating",
"aiCreation": "AI Creation",
"supportUpload": "Support image/video upload",
- "enterToSend": "Press Enter to send"
+ "enterToSend": "Press Enter to send",
+ "connectTools": "Can help you publish to"
},
"history": {
"title": "Task History",
diff --git a/project/web/src/app/i18n/locales/zh-CN/chat.json b/project/web/src/app/i18n/locales/zh-CN/chat.json
index 8f049a67..1d5f4ff5 100644
--- a/project/web/src/app/i18n/locales/zh-CN/chat.json
+++ b/project/web/src/app/i18n/locales/zh-CN/chat.json
@@ -34,7 +34,8 @@
"startChat": "开始创作",
"aiCreation": "AI 智能创作",
"supportUpload": "支持图片/视频上传",
- "enterToSend": "按 Enter 发送"
+ "enterToSend": "按 Enter 发送",
+ "connectTools": "可以帮您发布到"
},
"history": {
"title": "任务记录",
diff --git a/project/web/src/components/Chat/ChatInput/index.tsx b/project/web/src/components/Chat/ChatInput/index.tsx
index 561a534f..88d02ecd 100644
--- a/project/web/src/components/Chat/ChatInput/index.tsx
+++ b/project/web/src/components/Chat/ChatInput/index.tsx
@@ -101,6 +101,10 @@ export function ChatInput({
return (
<div
+ style={{
+ position: 'relative',
+ zIndex: 2,
+ }}
className={cn(
'w-full rounded-2xl border bg-card transition-all duration-300 border-border shadow-sm hover:border-border/80 hover:shadow-md',
mode === 'large' ? 'p-4' : 'p-3',
diff --git a/project/web/src/components/Home/HomeChat/index.tsx b/project/web/src/components/Home/HomeChat/index.tsx
index 96611fba..d65315f1 100644
--- a/project/web/src/components/Home/HomeChat/index.tsx
+++ b/project/web/src/components/Home/HomeChat/index.tsx
@@ -16,6 +16,7 @@ import { useAgentStore } from '@/store/agent'
import { useMediaUpload } from '@/hooks/useMediaUpload'
import { toast } from '@/lib/toast'
import { cn } from '@/lib/utils'
+import { AccountPlatInfoArr, PlatType } from '@/app/config/platConfig'
import logo from '@/assets/images/logo.png'
/** 应用的提示词数据 */
@@ -174,8 +175,51 @@ export function HomeChat({
isUploading={isUploading}
placeholder={t('input.placeholder' as any)}
mode="large"
+
/>
+ {/* 平台工具链接提示 */}
+ <div
+ className="flex items-center justify-between gap-2 mb-2"
+ style={{
+ backgroundColor: '#F2F2F1',
+ borderBottomLeftRadius: '10px',
+ borderBottomRightRadius: '10px',
+ paddingTop: '20px',
+ paddingBottom: '8px',
+ paddingLeft: '16px',
+ paddingRight: '16px',
+ marginTop: '-12px',
+ zIndex: -1,
+ }}
+ >
+ <span
+ className="text-sm text-muted-foreground self-start pt-1"
+ style={{ zIndex: 10, position: 'relative', marginRight: '-8px' }}
+ >
+ {t('home.connectTools' as any)}
+ </span>
+ <div className="flex items-center">
+ {AccountPlatInfoArr.map(([key, value], index) => (
+ <Image
+ key={key}
+ src={value.icon}
+ alt={value.name}
+ width={24}
+ height={24}
+ className="w-6 h-6 rounded-full object-contain cursor-pointer hover:opacity-80 transition-opacity"
+ style={{
+ marginLeft: index > 0 ? '-8px' : '0',
+ zIndex: AccountPlatInfoArr.length - index,
+ position: 'relative',
+ }}
+ title={value.name}
+ onClick={() => router.push(`/${lng}/accounts?addChannel=${key}`)}
+ />
+ ))}
+ </div>
+ </div>
+
{/* 提示标签 */}
<div className="flex flex-wrap items-center justify-center gap-2 mt-4">
<span className="inline-flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted text-foreground text-xs font-medium">