diff --git a/src/routes/admin.js b/src/routes/admin.js index 90024d0a..b8db9666 100644 --- a/src/routes/admin.js +++ b/src/routes/admin.js @@ -5396,6 +5396,7 @@ router.get('/oem-settings', async (req, res) => { siteName: 'Claude Relay Service', siteIcon: '', siteIconData: '', // Base64编码的图标数据 + showAdminButton: true, // 是否显示管理后台按钮 updatedAt: new Date().toISOString() } @@ -5425,7 +5426,7 @@ router.get('/oem-settings', async (req, res) => { // 更新OEM设置 router.put('/oem-settings', authenticateAdmin, async (req, res) => { try { - const { siteName, siteIcon, siteIconData } = req.body + const { siteName, siteIcon, siteIconData, showAdminButton } = req.body // 验证输入 if (!siteName || typeof siteName !== 'string' || siteName.trim().length === 0) { @@ -5456,6 +5457,7 @@ router.put('/oem-settings', authenticateAdmin, async (req, res) => { siteName: siteName.trim(), siteIcon: (siteIcon || '').trim(), siteIconData: (siteIconData || '').trim(), // Base64数据 + showAdminButton: showAdminButton !== false, // 默认为true updatedAt: new Date().toISOString() } diff --git a/web/admin-spa/src/stores/settings.js b/web/admin-spa/src/stores/settings.js index a6d0ebfc..986ce327 100644 --- a/web/admin-spa/src/stores/settings.js +++ b/web/admin-spa/src/stores/settings.js @@ -8,6 +8,7 @@ export const useSettingsStore = defineStore('settings', () => { siteName: 'Claude Relay Service', siteIcon: '', siteIconData: '', + showAdminButton: true, // 控制管理后台按钮的显示 updatedAt: null }) @@ -64,6 +65,7 @@ export const useSettingsStore = defineStore('settings', () => { siteName: 'Claude Relay Service', siteIcon: '', siteIconData: '', + showAdminButton: true, updatedAt: null } diff --git a/web/admin-spa/src/views/ApiStatsView.vue b/web/admin-spa/src/views/ApiStatsView.vue index 3d4a4cf9..f26df4e5 100644 --- a/web/admin-spa/src/views/ApiStatsView.vue +++ b/web/admin-spa/src/views/ApiStatsView.vue @@ -17,6 +17,7 @@
@@ -31,6 +32,7 @@+ 隐藏后,用户需要直接访问 /admin/login 页面登录 +
+自定义您的站点品牌名称
++ 上传自定义图标或输入图标URL +
++ 支持 .ico, .png, .jpg, .svg 格式,最大 350KB +
+控制登录按钮在首页的显示
++ 隐藏后,用户需要直接访问 /admin/login 页面登录 +
+