浏览代码

fix: 统一title 至导航栏中间位置

王晓东 3 周之前
父节点
当前提交
b808566afa

+ 1 - 1
project.private.config.json

@@ -60,5 +60,5 @@
       ]
     }
   },
-  "libVersion": "2.27.3"
+  "libVersion": "3.3.5"
 }

+ 1 - 1
src/components/buttons/WemetaButtonNative.tsx

@@ -24,6 +24,6 @@ export default function WemetaButton({ onClick, type = 'primary', disabled = fal
     }
   }
   return (
-    <Button style={style} className={`p-14 text-14 leading-20 block font-normal rounded-8 items-center justify-center font-pingfangSCMedium  ${typeClass} ${disabled ? 'opacity-50': ''} ${className}`} onClick={handleClick}>{children}</Button>
+    <Button disabled={disabled} style={style} className={`p-14 text-14 leading-20 block font-normal rounded-8 items-center justify-center font-pingfangSCMedium  ${typeClass} ${disabled ? 'opacity-50': ''} ${className}`} onClick={handleClick}>{children}</Button>
   );
 }

+ 1 - 1
src/pages/account/index.tsx

@@ -13,7 +13,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal backText="账号管理"></NavBarNormal>
+      <NavBarNormal>账号管理</NavBarNormal>
       <View className="w-full px-16 py-24 flex flex-col gap-16">
         <ListWrapper>
           <ListRow underline rightRenderer={()=> <View className="flex-center text-gray-5">{whoami?.mobile}</View>}>

+ 5 - 3
src/pages/agent/components/AgentSetting/index.tsx

@@ -5,7 +5,8 @@ import AgentKnowledgeLib from './components/AgentKnowledgeLib'
 import AgentCard from './components/AgentCard'
 import AgentContactCard from './components/AgentContactCard'
 import BottomBar from "@/components/BottomBar/indexNative";
-import WemetaButton from "@/components/buttons/WemetaButton";
+// import WemetaButton from "@/components/buttons/WemetaButton";
+import { useModalStore } from "@/store/modalStore";
 import WemetaButtonNative from "@/components/buttons/WemetaButtonNative";
 
 
@@ -16,6 +17,7 @@ import { useAgentStore } from "@/store/agentStore";
 export default forwardRef(function Index({save}: {save: ()=> void}, ref) {
   console.log('agent setting')
   const agentEdit = useAgentStore((state) => state.agentEdit)
+  const isVisible = useModalStore((state) => state.isVisible);
   const enableSave = useAgentStore((state) => state.enableSave)
   const [isPolishing, setIsPolishing] = useState(false)
   // Create ref for AgentSettingList
@@ -47,9 +49,9 @@ export default forwardRef(function Index({save}: {save: ()=> void}, ref) {
       <View className="py-12">
         <AgentKnowledgeLib></AgentKnowledgeLib>
       </View>
-      <BottomBar>
+      {!isVisible && <BottomBar>
         <WemetaButtonNative disabled={isDisabled} className="flex-1" onClick={save}>{buttonText}</WemetaButtonNative>
-      </BottomBar>
+      </BottomBar>}
     </View>
   );
 })

+ 3 - 3
src/pages/agreement/index.tsx

@@ -15,7 +15,7 @@ export default function Index() {
   const [agreements, setAgreements] = useState<TAgreementItem[]>([])
   const fetchPageData = async () => {
     const response = await getSysAgreements('register')
-    
+
     if(isSuccess(response.status)){
       setAgreements(response.data)
     }
@@ -24,10 +24,10 @@ export default function Index() {
   useEffect(()=> {
     fetchPageData()
   }, [])
-  
+
   return (
     <PageCustom>
-      <NavBarNormal backText="服务协议"></NavBarNormal>
+      <NavBarNormal>服务协议</NavBarNormal>
       <View className="w-full px-16 py-24 flex flex-col gap-16">
         <ListWrapper>
           { agreements.map((item)=> {

+ 5 - 5
src/pages/chat-session-messages/index.tsx

@@ -49,7 +49,7 @@ export default () => {
     createKey(`api/v1/my/visitor/sessions${visitorId}`, 10, [sessionId]),
     fetcher,
     );
-  
+
   // const parsedList = list.map((item: TMessage) => {
   //     if(item.contentType == EContentType.AiseekQA){
   //       try{
@@ -81,7 +81,7 @@ export default () => {
             }
           }
           qaList.push(item);
-          
+
         }else{
           item.assistant = null
           qaList.push(item);
@@ -90,7 +90,7 @@ export default () => {
         i++; // 跳过下一个元素,因为它已经被配对了
       }
     }
-    
+
 
     const handleEdit = (item: TVisitorChat|null)=> {
       if(!item){
@@ -161,10 +161,10 @@ export default () => {
       </View>
     );
   };
-  
+
   return (
     <PageCustom>
-      <NavBarNormal backText="对话记录" scrollFadeIn></NavBarNormal>
+      <NavBarNormal scrollFadeIn>对话记录</NavBarNormal>
       {visitor ? <VisitorSummary data={visitor} /> : <></>}
       <View className="flex-1 overflow-hidden w-full mb-100">
         <View className="flex flex-col gap-16 px-16 w-full">

+ 1 - 2
src/pages/contact-us/index.tsx

@@ -65,8 +65,7 @@ export default function Index() {
     <PageCustom>
       <NavBarNormal
         scrollFadeIn
-        backText="联系我们"
-      ></NavBarNormal>
+      >联系我们</NavBarNormal>
       <View className="flex flex-col items-center w-full gap-16 p-16 pb-140">
         <FormItem labelText="您的姓名" required>
           <WemetaInput

+ 1 - 1
src/pages/dislike-messages/index.tsx

@@ -175,7 +175,7 @@ export default function Index() {
 
   return (
     <PageCustom fullPage>
-      <NavBarNormal scrollFadeIn backText="待处理差评"></NavBarNormal>
+      <NavBarNormal scrollFadeIn>待处理差评</NavBarNormal>
       <View className="w-full flex flex-col overflow-hidden h-full pt-2">
         <View className="rounded-container-header"></View>
         {/* <View className="text-14 font-medium leading-22 px-16 pb-16">

+ 1 - 1
src/pages/editor-correction-item/index.tsx

@@ -169,7 +169,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal scrollFadeIn backText={'纠错记录'}></NavBarNormal>
+      <NavBarNormal scrollFadeIn>纠错记录</NavBarNormal>
       <View className="w-full pb-120">
         <View className="p-16">
           <View className="flex flex-col gap-16">

+ 1 - 1
src/pages/editor-knowledge-item/index.tsx

@@ -172,7 +172,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal scrollFadeIn backText={knowledgeTitle ?? '...'}></NavBarNormal>
+      <NavBarNormal scrollFadeIn>{knowledgeTitle ?? '...'}</NavBarNormal>
       <View className="w-full pb-120">
         <View className="p-16">
           <View className="flex flex-col gap-16">

+ 1 - 1
src/pages/editor-pages/editor-greeting-questions/index.tsx

@@ -60,7 +60,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal backText="开场提问引导"></NavBarNormal>
+      <NavBarNormal>开场提问引导</NavBarNormal>
       <View className="flex flex-col items-center w-full gap-16 p-16">
         {inputs.map((item) => {
           return (

+ 1 - 1
src/pages/knowledge-item/index.tsx

@@ -123,7 +123,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal backText="知识库"></NavBarNormal>
+      <NavBarNormal>知识库</NavBarNormal>
       <View className="w-full overflow-hidden">
         <View className="p-16">
           <View className="mb-16">

+ 1 - 1
src/pages/message-editor/index.tsx

@@ -199,7 +199,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal scrollFadeIn backText={isDislike ? '纠错记录' : '编辑问答'}></NavBarNormal>
+      <NavBarNormal scrollFadeIn>{isDislike ? '纠错记录' : '编辑问答'}</NavBarNormal>
       <View className="w-full pb-120">
         <View className="p-16">
           {isDislike && <View className="text-gray-4 text-12 text-center py-8">修改后的问答将存入知识库,持续训练提升您的智能体</View>}

+ 1 - 1
src/pages/privacy/index.tsx

@@ -29,7 +29,7 @@ export default function Index() {
   })
   return (
     <PageCustom>
-      <NavBarNormal backText="隐私设置"></NavBarNormal>
+      <NavBarNormal>隐私设置</NavBarNormal>
       <View className="w-full px-16 py-24 flex flex-col gap-16">
         <ListWrapper>
           <ListRow underline>

+ 1 - 1
src/pages/test/index.tsx

@@ -76,7 +76,7 @@ export default function Index() {
 
   return (
     <PageCustom>
-      <NavBarNormal backText="创建"></NavBarNormal>
+      <NavBarNormal>创建</NavBarNormal>
       <View className="px-16 w-full flex flex-col gap-20">
         <View className="w-full">
           <TabBarButtons

+ 1 - 1
src/pages/visiteor-detail/index.tsx

@@ -70,7 +70,7 @@ export default () => {
 
   return (
     <PageCustom fullPage style={{ overflow: "hidden" }}>
-      <NavBarNormal scrollFadeIn backText="访问详情"></NavBarNormal>
+      <NavBarNormal scrollFadeIn>访问详情</NavBarNormal>
       {visitor ? <VisitorSummary data={visitor} /> : <></>}
       <View className="rounded-container-header">
         <View className="text-14 font-medium text-black font-pingfangSCMedium px-16 pb-14">

+ 1 - 1
src/pages/voice/index.tsx

@@ -151,7 +151,7 @@ const VoiceTabs: React.FC<Props> = ({}) => {
 
   return (
     <PageCustom fullPage >
-      <NavBarNormal backText="声音"></NavBarNormal>
+      <NavBarNormal>声音</NavBarNormal>
       <View className={style.container}>
         <View className={style.playContainer}>
           <VoicePlayerBar