Initial import of weiyuan frontend

This commit is contained in:
qiubaishen
2026-10-15 16:33:46 +08:00
commit d8f3aee261
774 changed files with 374914 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
/*
Copyright (C) 2025 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
/*
* 系统设置(/console/setting)页面 tab 的单一数据源。
* 供 Setting/index.jsx 与运营设置中的「下放管理员」勾选 UI 共用,避免两处 tab 列表漂移。
* labelKey 为传入 t() 的 i18n 键(本项目使用中文作为键)。
*/
export const SETTING_TABS = [
{ key: 'operation', labelKey: '运营设置' },
{ key: 'data-security', labelKey: '数据安全' },
{ key: 'content-guard', labelKey: '大模型内容防护' },
{ key: 'dashboard', labelKey: '仪表盘设置' },
{ key: 'chats', labelKey: '聊天设置' },
{ key: 'drawing', labelKey: '绘图设置' },
{ key: 'payment', labelKey: '支付设置' },
{ key: 'amount-options', labelKey: '充值档位管理' },
{ key: 'org-amount-options', labelKey: '企业充值档位' },
{ key: 'membership', labelKey: '会员管理' },
{ key: 'ratio', labelKey: '分组与模型定价设置' },
{ key: 'level_policy', labelKey: '等级与模型访问' },
{ key: 'ratelimit', labelKey: '速率限制设置' },
{ key: 'models', labelKey: '模型相关设置' },
{ key: 'customer-service', labelKey: '客服设置' },
{ key: 'tutorial-video', labelKey: '教程视频管理' },
{ key: 'system', labelKey: '系统设置' },
{ key: 'other', labelKey: '其他设置' },
];
// 会员管理本就对普通管理员开放,无需通过下放配置即可见。
export const ALWAYS_ADMIN_VISIBLE_TABS = ['membership'];
// 可下放给普通管理员的 tab(排除本就对管理员开放的 membership)。
export const ROOT_ONLY_SETTING_TABS = ['content-guard'];
export const DELEGATABLE_SETTING_TABS = SETTING_TABS.filter(
(t) =>
!ALWAYS_ADMIN_VISIBLE_TABS.includes(t.key) &&
!ROOT_ONLY_SETTING_TABS.includes(t.key),
);