diff --git a/apps/web/index.html b/apps/web/index.html index 5ba57a3..7087b23 100755 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -12,7 +12,7 @@ VITE_APP_VERSION: "$VITE_APP_VERSION", }; - 首长机关信箱 + 信箱 diff --git a/apps/web/src/app/auth/page.tsx b/apps/web/src/app/auth/page.tsx index 59a4e53..dfd7f2a 100644 --- a/apps/web/src/app/auth/page.tsx +++ b/apps/web/src/app/auth/page.tsx @@ -6,6 +6,7 @@ import { LoginForm } from "./login"; import { Card, Typography, Button, Spin, Divider } from "antd"; import { AnimatePresence, motion } from "framer-motion"; import { useAuthForm } from "./useAuthForm"; +import { env } from "@web/src/env"; const { Title, Text, Paragraph } = Typography; @@ -48,7 +49,7 @@ const AuthPage: React.FC = () => { transition={{ delay: 0.2, duration: 0.5 }} >
- 首长机关信箱 + {env.APP_NAME || '信箱'}
聆音于微,润心以答,纾难化雨,解忧惟勤 diff --git a/apps/web/src/assets/logo.png b/apps/web/src/assets/logo.png new file mode 100644 index 0000000..3b0bc2f Binary files /dev/null and b/apps/web/src/assets/logo.png differ diff --git a/apps/web/src/components/layout/main/Header.tsx b/apps/web/src/components/layout/main/Header.tsx index 8c5ae80..ef7b560 100644 --- a/apps/web/src/components/layout/main/Header.tsx +++ b/apps/web/src/components/layout/main/Header.tsx @@ -5,53 +5,46 @@ import Navigation from "./navigation"; import { useAuth } from "@web/src/providers/auth-provider"; import { UserOutlined } from "@ant-design/icons"; import { UserMenu } from "../element/usermenu/usermenu"; - +import logo from "@web/src/assets/logo.png" +import { env } from "@web/src/env"; export const Header = memo(function Header() { const { isAuthenticated } = useAuth(); - return ( -
-
-
+
+
+
{/* 添加relative定位上下文 */}
-
- - 首长机关信箱 - -

- 聆怀若水,应语如风;纾难化困,践诺成春 -

+ {/* 左侧logo部分 */} +
{/* 防止压缩 */} + logo +
+ {env.APP_NAME || '信箱'} +

+ 聆怀若水,应语如风;纾难化困,践诺成春 +

+
-
- -
-
- {!isAuthenticated ? ( - - + {/* 右侧登录部分 */} +
{/* 防止压缩 */} + {!isAuthenticated ? ( + + 登录 ) : ( )}
+ + {/* 独立定位的搜索栏 */} +
+ +
); -}); +}); \ No newline at end of file diff --git a/apps/web/src/components/layout/main/MainLayout.tsx b/apps/web/src/components/layout/main/MainLayout.tsx index 8866b6f..40e97e4 100644 --- a/apps/web/src/components/layout/main/MainLayout.tsx +++ b/apps/web/src/components/layout/main/MainLayout.tsx @@ -2,8 +2,13 @@ import { motion } from 'framer-motion' import { Outlet } from 'react-router-dom' import { Header } from './Header' import { Footer } from './Footer' +import { useEffect } from 'react' +import { env } from '@web/src/env' export function MainLayout() { + useEffect(() => { + document.title = env.APP_NAME || '信箱' + }, []) return ( )} - {fileResources.length > 0 && ( -
-
- {fileResources.map((resource) => ( -
-
- - {getFileIcon(resource.url)} - - )} diff --git a/apps/web/src/components/models/post/list/LetterList.tsx b/apps/web/src/components/models/post/list/LetterList.tsx index d0c672a..2caff81 100644 --- a/apps/web/src/components/models/post/list/LetterList.tsx +++ b/apps/web/src/components/models/post/list/LetterList.tsx @@ -108,6 +108,7 @@ export default function LetterList({ ) : (