完善站点运营设置:分路由管理、登录可见评论、邮件模板内联与关闭注册 SSR。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 00:17:00 +08:00
parent acde7ee288
commit 6f054a903c
98 changed files with 8239 additions and 2073 deletions

View File

@@ -1,5 +1,5 @@
import { cache } from "react";
import { fetchMe, fetchPublicSettings } from "./api";
import { fetchMe, fetchPublicSettings, fetchSiteState } from "./api";
// 同一 SSR 请求内去重:layout 与页面可能同时需要当前用户,
// 相同 Cookie 头参数下只产生一次 /api/me 调用。
@@ -7,3 +7,6 @@ export const getMeCached = cache((cookieHeader?: string) => fetchMe(cookieHeader
// 同请求内去重:layout 注入主题 CSS 变量、后台页读取当前配置共用
export const getPublicSettingsCached = cache(() => fetchPublicSettings());
// 同请求内去重:注册/找回密码页读取开放状态与提示文案
export const getSiteStateCached = cache(() => fetchSiteState());