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:
@@ -201,14 +201,14 @@ function formatRelativeTime(timestamp, t) {
|
||||
const days = Math.floor(hours / 24);
|
||||
|
||||
if (seconds < 60) return t('刚刚');
|
||||
if (minutes < 60) return minutes + t('分钟前');
|
||||
if (hours < 24) return hours + t('小时前');
|
||||
if (days < 30) return days + t('天前');
|
||||
if (minutes < 60) return t('{{n}} 分钟前', { n: minutes });
|
||||
if (hours < 24) return t('{{n}} 小时前', { n: hours });
|
||||
if (days < 30) return t('{{n}} 天前', { n: days });
|
||||
return new Date(timestamp * 1000).toLocaleDateString();
|
||||
}
|
||||
|
||||
const OrgAudit = ({ orgId }) => {
|
||||
const { t } = useTranslation();
|
||||
const { t, i18n } = useTranslation();
|
||||
const quotaPerUnit = getQuotaPerUnit();
|
||||
const { logs, total, loading, fetch } = useOrgAuditLogs(orgId);
|
||||
const [page, setPage] = useState(1);
|
||||
@@ -372,7 +372,7 @@ const OrgAudit = ({ orgId }) => {
|
||||
width: 150,
|
||||
render: (v) =>
|
||||
v ? (
|
||||
<Tooltip content={new Date(v * 1000).toLocaleString('zh-CN')}>
|
||||
<Tooltip content={new Date(v * 1000).toLocaleString(i18n.language)}>
|
||||
<time
|
||||
className='oc-audit-time'
|
||||
dateTime={new Date(v * 1000).toISOString()}
|
||||
|
||||
Reference in New Issue
Block a user