feat: 前端UI标题栏优化与配置更新

- 更新.gitignore,添加frontend/.next/忽略
- 优化RecordModal、index、recurring、search、stats页面标题栏样式
- 新增frontend/lib/utils.js工具函数
- 更新useCategories.js钩子
- 添加代码优化计划文档

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Developer
2026-03-18 16:33:29 +08:00
co-authored by Claude
parent ad6387e49e
commit 127f491167
9 changed files with 2350 additions and 48 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import { DEFAULT_CATEGORIES } from '../lib/categories';
export function useCategories() {
const [categories, setCategories] = useState(DEFAULT_CATEGORIES);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
useEffect(() => {
if (!isLoggedIn()) {
@@ -33,6 +34,7 @@ export function useCategories() {
}
} catch (err) {
console.error(err);
setError(err);
} finally {
setLoading(false);
}
@@ -41,5 +43,5 @@ export function useCategories() {
loadCategories();
}, []);
return { categories, loading };
return { categories, loading, error };
}