@@ -67,14 +75,14 @@ export const TailchatNetwork: React.FC = React.memo(() => {
diff --git a/server/admin-next/src/client/routes/socketio.tsx b/server/admin-next/src/client/routes/socketio.tsx
index ca792360..505ed92f 100644
--- a/server/admin-next/src/client/routes/socketio.tsx
+++ b/server/admin-next/src/client/routes/socketio.tsx
@@ -1,23 +1,24 @@
import React from 'react';
-import { Button, Card, Typography } from 'tushan';
+import { Button, Card, Typography, useTranslation } from 'tushan';
/**
* SocketIO 管理
*/
export const SocketIOAdmin: React.FC = React.memo(() => {
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
+ const { t } = useTranslation();
return (
- {'custom.socketio.tip1'}{' '}
+ {t('custom.socketio.tip1')}{' '}
{protocol}://{window.location.host}
- {'custom.socketio.tip2'}
- {'custom.socketio.tip3'}
+ {t('custom.socketio.tip2')}
+ {t('custom.socketio.tip3')}
);
diff --git a/server/admin-next/src/client/routes/system/index.tsx b/server/admin-next/src/client/routes/system/index.tsx
index 626e0d9c..8c46d26c 100644
--- a/server/admin-next/src/client/routes/system/index.tsx
+++ b/server/admin-next/src/client/routes/system/index.tsx
@@ -9,6 +9,7 @@ import {
Message,
Form,
Upload,
+ useTranslation,
} from 'tushan';
import { IconCheck, IconClose, IconDelete } from 'tushan/icon';
import { TailchatImage } from '../../components/TailchatImage';
@@ -17,13 +18,14 @@ import { TailchatImage } from '../../components/TailchatImage';
* Tailchat 系统设置
*/
export const SystemConfig: React.FC = React.memo(() => {
- const [{ value: config = {}, loading }, fetchConfig] = useAsyncRequest(
+ const [{ value: config = {}, loading, error }, fetchConfig] = useAsyncRequest(
async () => {
const { data } = await request.get('/config/client');
return data.config ?? {};
}
);
+ const { t } = useTranslation();
useEffect(() => {
fetchConfig();
@@ -89,17 +91,22 @@ export const SystemConfig: React.FC = React.memo(() => {
return
;
}
+ if (error) {
+ console.log('error', error);
+ return
{String(error)}
;
+ }
+
return (
+
{config.uploadFileLimit}
-
+
{config.emailVerification ? : }
-
+
setServerName(val)}
@@ -108,7 +115,7 @@ export const SystemConfig: React.FC = React.memo(() => {
/>
-
+
{config?.serverEntryImage ? (