feat: 添加聊天助手主页

This commit is contained in:
风雨火
2025-08-11 15:10:21 +08:00
parent 5596115a98
commit ccf961ecb8
4 changed files with 54 additions and 26 deletions
+18
View File
@@ -0,0 +1,18 @@
.chatPage {
display: flex;
flex-direction: column;
}
.header {
@apply flex flex-row items-end mx-[32px];
}
.logo {
width: 127.15px;
height: 113px;
}
.intro {
@apply text-[38px] leading-tight font-[500];
}
+6 -5
View File
@@ -1,9 +1,8 @@
import { getLocaleOnServer } from '@/i18n/server'
// import { getLocaleOnServer } from '@/i18n/server'
import { Suspense } from 'react'
import { Inter } from 'next/font/google'
import '@/styles/tailwind.css'
const inter = Inter({ subsets: ['latin'] })
export const metadata = {
title: 'AI Agent Chatflow',
description: 'A chat application powered by AI agents',
@@ -23,11 +22,13 @@ const LocaleLayout = async ({
}: {
children: React.ReactNode
}) => {
const locale = await getLocaleOnServer()
// const locale = await getLocaleOnServer()
return (
<html lang={locale ?? 'en'} className="h-full">
<html lang='en' className="h-full" style={{
fontSize: '100px', // 注意:驼峰式写法 fontSize,而不是 font-size
'--tpx': '0.01rem' // 自定义 CSS 变量使用字符串值
} as React.CSSProperties}>
<body className={inter.className}>
{/* Main content wrapper with safe padding */}
<div className="flex min-h-screen flex-col px-safe-left pr-safe-right pt-safe-top pb-safe-bottom overflow-auto">
<Suspense fallback={<div>Loading...</div>}>
{children}
+30 -21
View File
@@ -1,27 +1,36 @@
"use client";
import Image from "next/image";
import maomaoPng from "@/assets/maomao@2x.png";
import styles from './chatPage.module.css'
import FAQGuide from '@/app/components/FAQGuide'
import {INavieAppSuggesQuestionItem} from "@/types/app"
export default function Home() {
const questions: INavieAppSuggesQuestionItem[] = [
{
"收派": [
"联系不上客户怎么办?",
"打火机可以寄吗?",
"包装破损了怎么办?"
]
},
{
"数据统计": [
"联系不上客户怎么办?",
"打火机可以寄吗?",
"包装破损了怎么办?"
]
}
]
return (
<div>
<h1 className="text-2xl">AI Agent Chatflow</h1>
<div className={styles.chatPage}>
<div className={styles.header}>
<Image className={styles.logo} src={maomaoPng} alt="Maomao" />
<h1 className={styles.intro}>MAOMAO</h1>
</div>
<div className="w-[375px] text-base border border-black rounded-md p-2">
w-375px
</div>
<div className="w-[750px] text-base border border-black"> w-750px </div>
<article className="prose lg:prose-xl">
<h1>Garlic bread with cheese: What the science tells us</h1>
<p>
For years parents have espoused the health benefits of eating garlic bread with cheese to their
children, with the food earning such an iconic status in our culture that kids will often dress
up as warm, cheesy loaf for Halloween.
</p>
<p>
But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
springing up around the country.
</p>
</article>
{/* 问题建议 */}
<FAQGuide suggestions={questions}></FAQGuide>
</div>
);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB