diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 88cb16d..3fc7b8a 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -186,5 +186,10 @@ "lastMonth": "Last Month", "thisYear": "This Year", "lastYear": "Last Year" + }, + "maintenance": { + "title": "System Upgrade", + "message": "The system is under maintenance. Expected to resume at 23:59 tonight. Please wait patiently.", + "estimatedTime": "Estimated recovery: 23:59 tonight" } -} +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index d8fcaf7..c6c3f8c 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -161,5 +161,10 @@ "lastMonth": "Mes Pasado", "thisYear": "Este Año", "lastYear": "Año Pasado" + }, + "maintenance": { + "title": "Actualización del sistema", + "message": "El sistema está en mantenimiento. Se espera que se reanude a las 23:59 de esta noche. Por favor, espere pacientemente.", + "estimatedTime": "Hora estimada de recuperación: 23:59 esta noche" } -} +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json index 0922bdd..9cea65a 100644 --- a/frontend/src/i18n/locales/fr.json +++ b/frontend/src/i18n/locales/fr.json @@ -161,5 +161,10 @@ "lastMonth": "Mois Dernier", "thisYear": "Cette Année", "lastYear": "Année Dernière" + }, + "maintenance": { + "title": "Mise à jour du système", + "message": "Le système est en maintenance. Reprise prévue à 23h59 ce soir. Veuillez patienter.", + "estimatedTime": "Heure de reprise estimée : 23h59 ce soir" } -} +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json index 206daa5..9d34ee0 100644 --- a/frontend/src/i18n/locales/ru.json +++ b/frontend/src/i18n/locales/ru.json @@ -161,5 +161,10 @@ "lastMonth": "В прошлом месяце", "thisYear": "В этом году", "lastYear": "В прошлом году" + }, + "maintenance": { + "title": "Обновление системы", + "message": "Система находится на техническом обслуживании. Ожидаемое восстановление в 23:59 сегодня. Пожалуйста, подождите.", + "estimatedTime": "Ожидаемое восстановление: сегодня 23:59" } -} +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/zh.json b/frontend/src/i18n/locales/zh.json index 9209488..ae5c709 100644 --- a/frontend/src/i18n/locales/zh.json +++ b/frontend/src/i18n/locales/zh.json @@ -186,5 +186,10 @@ "lastMonth": "上月", "thisYear": "今年", "lastYear": "去年" + }, + "maintenance": { + "title": "系统升级中", + "message": "系统维护升级中,预计今晚 23:59 恢复,请耐心等待", + "estimatedTime": "预计恢复时间:今晚 23:59" } -} +} \ No newline at end of file diff --git a/frontend/src/pages/login-simple/index.tsx b/frontend/src/pages/login-simple/index.tsx index aea3ba6..ca7115d 100644 --- a/frontend/src/pages/login-simple/index.tsx +++ b/frontend/src/pages/login-simple/index.tsx @@ -1,16 +1,35 @@ import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { Button, Input, Toast } from 'antd-mobile' +import { useTranslation } from 'react-i18next' import { useUserStore } from '@/stores/user' +import loginStyles from '../login/login.module.css' import styles from './login-simple.module.css' +// 维护模式开关 - 恢复时改为 false 重新部署即可 +const MAINTENANCE_MODE = true + export default function SimpleLogin() { + const { t } = useTranslation() const navigate = useNavigate() const { login } = useUserStore() const [username, setUsername] = useState('') const [password, setPassword] = useState('') const [loading, setLoading] = useState(false) + if (MAINTENANCE_MODE) { + return ( +
{t('maintenance.message')}
+{t('maintenance.estimatedTime')}
+{t('maintenance.message')}
+{t('maintenance.estimatedTime')}
+