Files
syops/frontend/src/config.ts
T
runny 91b7233872 Merge branch 'dev' into runny827
feat(training): 新增精益培训视频与周任务管理

# Conflicts:
#	backend/app/models/__init__.py
2026-09-08 18:30:09 +08:00

81 lines
3.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* config.ts
* 用途:前端应用级开关与默认配置(登录模式、工作台模块、管理模块可见性)。
* 依赖:无运行时依赖;应用标题通过 common.app.title i18n key 解析。
* 逻辑:main.ts / router guards 使用 i18n.t(config.appTitleKey) 设置 document.title。
*/
export const config = {
/** Browser title base name — resolve via i18n `t(config.appTitleKey)`. */
appTitleKey: 'common.app.title',
auth: {
// Login mode switch:
// - 'casdoor': submit username/password to backend Casdoor password-login API.
// - 'password': submit to legacy local /api/user/login.
loginMode: 'casdoor',
casdoor: {
enabled: true,
authorizeApi: '/api/user/casdoor/authorize-url',
loginApi: '/api/user/casdoor/login',
passwordLoginApi: '/api/user/casdoor/password-login',
refreshApi: '/api/user/casdoor/refresh',
callbackPath: '/casdoor-callback',
// Casdoor Provider「Name」字段须一致(当前 IdP:wecom)。留空则仅用后端 CASDOOR_WECOM_PROVIDER_HINT。
wecomProviderHint: 'wecom',
},
wecom: {
enabled: true,
// true: login button uses Casdoor OAuth (WeCom as Casdoor provider). false: legacy /api/user/wecom/* OAuth.
loginViaCasdoor: true,
authorizeApi: '/api/user/wecom/authorize-url',
loginApi: '/api/user/wecom/login',
completeBindApi: '/api/user/wecom/complete-bind',
callbackPath: '/workspace',
deeplinkTraceApi: '/api/user/wecom/deeplink-opened',
taskCompleteApi: '/api/user/wecom/task-complete'
}
},
workspace: {
// true 显示评分区;false 隐藏评分区
showChatRating: true,
// 聊天窗口“源文件展示”开关配置
sourceFiles: {
// 是否显示源文件区域(包含上方文件按钮 + 下方“源文档”详情)
showSourceFiles: true,
// 是否显示 MD 源文件(文件名后缀为 .md/.markdown)
showMdFiles: false,
// 当 showMdFiles=true 时,MD 源文件是否默认展开“源文档”详情
expandMdByDefault: false,
},
modules: {
announcements: true,
favorites: true,
quickQuestions: false,
embedded: false,
allAgents: true
}
},
admin: {
modules: {
dashboard: true, // 仪表盘
approvals: true, // 用户审批
users: true, // 用户管理
departments: true, // 部门管理
agents: true, // 应用管理
knowledge_base: true, // 知识库管理
announcements: true, // 公告管理
questions: true, // 常用问题
wecom: true, // 企业微信
linked_services: true, // 关联服务(侧栏跳转入口)
permissions: true, // 应用权限
platform_apps: true, // 平台应用说明
requests: true, // 审批权限
reports: true, // 数据报表
schedules: true, // 定时任务
shipping_inventory: true, // 货代配置
procurement_contract: true, // 采购合同审查(模板库 + 历史)
training_config: true,
integration_connector: true, // 集成连接器配置
}
}
};