From 4d25bf00ba1605ec281cdd3d266c843ea80b94d9 Mon Sep 17 00:00:00 2001 From: lafay <2021211506@stu.hit.edu.cn> Date: Sat, 25 Apr 2026 13:01:36 +0800 Subject: [PATCH] feat(posts): add @mention highlighting and vote segment display - Parse post content to highlight @mentions with blue styling - Render vote segments from post data with formatted options display - Add MessageSegment interface and segments/is_vote fields to Post type - Update API base URL and branding from Carrot BBS to WithYou --- .env.development | 2 +- src/api/client.ts | 2 +- src/components/Layout/Sidebar.tsx | 4 ++-- src/pages/Dashboard.tsx | 4 ++-- src/pages/Login.tsx | 4 ++-- src/pages/Posts.tsx | 19 ++++++++++++++++++- src/types/index.ts | 8 ++++++++ 7 files changed, 34 insertions(+), 9 deletions(-) diff --git a/.env.development b/.env.development index e5c45f1..32e483b 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ # 开发环境 API 地址 -VITE_API_BASE_URL=https://bbs.littlelan.cn/api/v1 \ No newline at end of file +VITE_API_BASE_URL=https://withyou.littlelan.cn/api/v1 \ No newline at end of file diff --git a/src/api/client.ts b/src/api/client.ts index 97eec2c..bc1cf0d 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -2,7 +2,7 @@ import axios from 'axios' import { useAuthStore } from '@/stores/authStore' const apiClient = axios.create({ - baseURL: import.meta.env.VITE_API_BASE_URL || 'https://bbs.littlelan.cn/api/v1', + baseURL: import.meta.env.VITE_API_BASE_URL || 'https://withyou.littlelan.cn/api/v1', timeout: 10000, headers: { 'Content-Type': 'application/json', diff --git a/src/components/Layout/Sidebar.tsx b/src/components/Layout/Sidebar.tsx index 18b7a27..89390b1 100644 --- a/src/components/Layout/Sidebar.tsx +++ b/src/components/Layout/Sidebar.tsx @@ -206,7 +206,7 @@ export default function Sidebar({ collapsed, onCollapse }: SidebarProps) { {/* Logo区域 */}
欢迎来到 Carrot BBS 管理后台
+欢迎来到 WithYou 管理后台