feat: 支持系统设置中自定义全站名称和副标题

新增 site_name 和 site_subtitle 两个系统配置项,允许管理员在后台自定义
站点品牌名称(默认 Aether)和副标题(默认 AI Gateway)。

- 后端:DEFAULT_CONFIGS 新增配置项,公开 /api/public/site-info 端点
- 后端:邮件发送 app_name 回退链增加 site_name
- 前端:新增 useSiteInfo composable 全局缓存站点信息
- 前端:首页、后台布局、登录页、指南页面全部改为动态读取
- 前端:系统设置页新增「站点信息」配置区块
- 前端:配置导出文件名跟随站点名称
- 优化:请求失败允许重试,保存后即时生效无需刷新页面
- 优化:document.title 随站点名称动态更新

Closes #176

Co-authored-by: LewisPen <LewisPen@nyadoo.com>
This commit is contained in:
fawney19
2026-02-13 21:50:05 +08:00
parent c171d65d3f
commit f464f32e48
14 changed files with 223 additions and 34 deletions

View File

@@ -9,11 +9,11 @@
<div class="flex flex-col items-center text-center mb-8">
<img
src="/aether_adaptive.svg"
alt="Aether"
:alt="siteName"
class="h-16 w-16 mb-4"
>
<h2 class="text-2xl font-semibold text-foreground">
登录到 Aether
登录到 {{ siteName }}
</h2>
</div>
@@ -236,6 +236,7 @@ import Input from '@/components/ui/input.vue'
import Label from '@/components/ui/label.vue'
import { useAuthStore } from '@/stores/auth'
import { useToast } from '@/composables/useToast'
import { useSiteInfo } from '@/composables/useSiteInfo'
import { isDemoMode, DEMO_ACCOUNTS } from '@/config/demo'
import RegisterDialog from './RegisterDialog.vue'
import { authApi } from '@/api/auth'
@@ -254,6 +255,7 @@ const emit = defineEmits<{
const router = useRouter()
const authStore = useAuthStore()
const { success: showSuccess, warning: showWarning, error: showError } = useToast()
const { siteName } = useSiteInfo()
const isOpen = ref(props.modelValue)
const isDemo = computed(() => isDemoMode())