Browse Source

fix: 为图片增加 ai 生成标记

王晓东 1 week ago
parent
commit
e7d17a7779

+ 13 - 0
src/pages/agent-avatars/index.module.less

@@ -84,4 +84,17 @@
   line-height: 18px;
   color: white;
   background-color: rgba(black, .45);
+}
+
+.aiTips{
+  position: absolute;
+  z-index: 1;
+  right: 6px;
+  bottom: 6px;
+  font-family: PingFangSC-Medium;
+  font-weight: 500;
+  font-size: 8px;
+  color: rgba(#fff, .5);
+  line-height: 8px;
+  text-shadow: 1px 1px 0 rgba(#000, .3);
 }

+ 2 - 0
src/pages/agent-avatars/index.tsx

@@ -127,6 +127,8 @@ export default function Index() {
             </View>
           )}
 
+          {!avatar.isOriginal && <View className={style.aiTips}>图片由AI生成</View> }
+
           {renderMedia(avatar)}
         </View>
       );

+ 1 - 0
src/pages/agent-gen/components/step/StepConfirm.tsx

@@ -42,6 +42,7 @@ export default React.memo(function Index({prev, pickedAvatar}:IProps) {
         <View className={style.confirmChatAvatarBg}>
           <View className={style.confirmChatAvatarImage}>
             <AvatarMedia roundedFull={false}  source={pickedAvatar?.avatarUrl} className={style.confirmChatAvatarImage} />
+            {!pickedAvatar.isOriginal && <View className={style.aiTips}>图片由AI生成</View> }
             {/* <Image
               mode="widthFix"
               className="w-full"

+ 2 - 0
src/pages/agent-gen/components/step/StepPick.tsx

@@ -167,6 +167,8 @@ export default React.memo(function Index({ prev, next, taskId, avatars, videos,
                 {avatar.isOriginal && <View className={style.pickAvatarOriginal}>
                   <View>原图</View>
                 </View> }
+                {!avatar.isOriginal && <View className={style.aiTips}>图片由AI生成</View> }
+                
               </View>
             </SwiperItem>
           })}

+ 13 - 0
src/pages/agent-gen/components/step/index.module.less

@@ -196,4 +196,17 @@
 .block3{
   .block();
   width: 192px;
+}
+
+.aiTips{
+  position: absolute;
+  z-index: 1;
+  right: 12px;
+  bottom: 12px;
+  font-family: PingFangSC-Medium;
+  font-weight: 500;
+  font-size: 12px;
+  color: rgba(#fff, .5);
+  line-height: 12px;
+  text-shadow: 1px 1px 0 rgba(#000, .3);
 }

+ 7 - 0
src/pages/chat/index.module.less

@@ -29,4 +29,11 @@
   background-repeat: no-repeat;
   background-position: center center;
   background-size: 100%;
+}
+
+.aiTips{
+  width: 100%;
+  text-align: center;
+  font-size: 10px;
+  color: rgba(#000, .4);
 }

+ 11 - 6
src/pages/chat/index.tsx

@@ -16,6 +16,7 @@ import ButtonEnableStreamVoice from "./components/OptionButtons/ButtonEnableStre
 
 import RecommendQuestions from "./components/RecommendQuestions";
 import { usePersistentState } from "@/hooks/usePersistentState";
+import style from './index.module.less'
 
 // 导入我们抽离的 hooks 和常量
 import {
@@ -193,6 +194,7 @@ export default function Index() {
             )}
           </View>
         </ScrollView>
+        
         <View
           className="w-full h-60"
           style={{
@@ -210,6 +212,12 @@ export default function Index() {
           <View className="bg-[#F5FAFF]">
             {agent && (
               <View className="flex flex-col w-full gap-8">
+                <View>
+                  <ButtonEnableStreamVoice
+                    setEnable={setStreamVoiceEnable}
+                    enable={streamVoiceEnable}
+                  />
+                </View>
                 <InputBar
                   enableOutputAudioStream={streamVoiceEnable}
                   agent={agent}
@@ -220,17 +228,14 @@ export default function Index() {
                   setIsVoice={setIsVoice}
                   disabled={disabled}
                 />
-                <View>
-                  <ButtonEnableStreamVoice
-                    setEnable={setStreamVoiceEnable}
-                    enable={streamVoiceEnable}
-                  />
-                </View>
+                
               </View>
             )}
+            <View className={style.aiTips}>内容由AI生成,仅供参考</View>
           </View>
         </View>
       </View>
+      
     </PageCustom>
   );
 }

+ 2 - 2
src/pages/index/components/WelcomeTips/index.tsx

@@ -54,7 +54,7 @@ export default function Index({}: IProps) {
             <View className={style.list}>
                 <View className="flex items-center gap-6">
                   <Image src={IconIndexProfile} className="w-16 h-16"></Image>
-                  <View>企业 + 个人资料统一管理</View>
+                  <View>企业+个人资料统一管理</View>
                 </View>
                 <View className="flex items-center gap-6">
                   <Image src={IconIndexChat} className="w-16 h-16"></Image>
@@ -62,7 +62,7 @@ export default function Index({}: IProps) {
                 </View>
                 <View className="flex items-center gap-6">
                   <Image src={IconIndexContent} className="w-16 h-16"></Image>
-                  <View>你的内容一页呈现</View>
+                  <View>你的内容一页呈现</View>
                 </View>
             </View>
           </View>