merge: 合入总仓库 weiyuan(bfdfb339) web/ 新功能,保留 ui-optimization 的 UI 重构
来源:luoguang/monkey-ai weiyuan@bfdfb339 的 web/(经 sync/main-weiyuan-web-bfdfb339 同步)
同步基准:总仓库 a2ca13cb = 本仓库初始导入 d8f3aee2
冲突处理原则:保留 ui-optimization 的 UI(样式/结构/组件),嫁接 weiyuan 的功能逻辑。
- i18n:按键三方合并;ours 的「令牌→密钥」改名键上移植 theirs 的术语修订
- task-logs / OrgLogs:ours 已手工移植同一功能(6ad95e2),保留 ours
- 删除:OrgCreate(theirs 下线 /org/create)、旧 image 组件与 VideoRegenerateModal(theirs 体验中心重写)、
OrgAvatarSection / PricingBentoPage / CommissionConsole(ours 重构中已移除)
- 测试:users-pagination 的 i18next mock 补 t();theirs 新增文件补 license header
This commit is contained in:
@@ -40,12 +40,13 @@ import {
|
||||
toBoolean,
|
||||
isRoot,
|
||||
} from '../../helpers';
|
||||
import SettingsWeyAi from '../../pages/Setting/WeyAi/SettingsWeyAi';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import axios from 'axios';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const SystemSetting = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
let [inputs, setInputs] = useState({
|
||||
PasswordLoginEnabled: '',
|
||||
PasswordRegisterEnabled: '',
|
||||
@@ -1477,7 +1478,15 @@ const SystemSetting = () => {
|
||||
</Text>
|
||||
<Banner
|
||||
type='info'
|
||||
description={`${t('主页链接填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')},${t('重定向 URL 填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/oidc`}
|
||||
description={t(
|
||||
'主页链接填 {{home}},重定向 URL 填 {{callback}}',
|
||||
{
|
||||
home: inputs.ServerAddress
|
||||
? inputs.ServerAddress
|
||||
: t('网站地址'),
|
||||
callback: `${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/oidc`,
|
||||
},
|
||||
)}
|
||||
style={{ marginBlock: '16px' }}
|
||||
/>
|
||||
<Text>
|
||||
@@ -1551,7 +1560,15 @@ const SystemSetting = () => {
|
||||
<Text>{t('用以支持通过 GitHub 进行登录注册')}</Text>
|
||||
<Banner
|
||||
type='info'
|
||||
description={`${t('Homepage URL 填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')},${t('Authorization callback URL 填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/github`}
|
||||
description={t(
|
||||
'Homepage URL 填 {{home}},Authorization callback URL 填 {{callback}}',
|
||||
{
|
||||
home: inputs.ServerAddress
|
||||
? inputs.ServerAddress
|
||||
: t('网站地址'),
|
||||
callback: `${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/github`,
|
||||
},
|
||||
)}
|
||||
style={{ marginBlock: '16px' }}
|
||||
/>
|
||||
<Row
|
||||
@@ -1582,7 +1599,15 @@ const SystemSetting = () => {
|
||||
<Text>{t('用以支持通过 Discord 进行登录注册')}</Text>
|
||||
<Banner
|
||||
type='info'
|
||||
description={`${t('Homepage URL 填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')},${t('Authorization callback URL 填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/discord`}
|
||||
description={t(
|
||||
'Homepage URL 填 {{home}},Authorization callback URL 填 {{callback}}',
|
||||
{
|
||||
home: inputs.ServerAddress
|
||||
? inputs.ServerAddress
|
||||
: t('网站地址'),
|
||||
callback: `${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/discord`,
|
||||
},
|
||||
)}
|
||||
style={{ marginBlock: '16px' }}
|
||||
/>
|
||||
<Row
|
||||
@@ -1628,7 +1653,9 @@ const SystemSetting = () => {
|
||||
</Text>
|
||||
<Banner
|
||||
type='info'
|
||||
description={`${t('回调 URL 填')} ${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/linuxdo`}
|
||||
description={t('回调 URL 填 {{callback}}', {
|
||||
callback: `${inputs.ServerAddress ? inputs.ServerAddress : t('网站地址')}/oauth/linuxdo`,
|
||||
})}
|
||||
style={{ marginBlock: '16px' }}
|
||||
/>
|
||||
<Row
|
||||
@@ -1872,10 +1899,25 @@ const SystemSetting = () => {
|
||||
<Spin size='large' />
|
||||
</div>
|
||||
)}
|
||||
{/* WeyAi 账号接入配置:仅超级管理员可见(后端同样按 root-only 校验) */}
|
||||
{/* WeyAi 配置已移到「WeyAi」页签(M21);这条提示保留一个版本后删除 */}
|
||||
{isLoaded && isRoot() && (
|
||||
<div className='settings-section'>
|
||||
<SettingsWeyAi />
|
||||
<Banner
|
||||
type='info'
|
||||
closeIcon={null}
|
||||
description={
|
||||
<span>
|
||||
{t('WeyAi 配置已移到「WeyAi」页签')}
|
||||
<Button
|
||||
theme='borderless'
|
||||
size='small'
|
||||
onClick={() => navigate('/console/setting?tab=weyai')}
|
||||
>
|
||||
{t('前往')}
|
||||
</Button>
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user