mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 02:30:51 +08:00
fix(i18n): localize splash strings
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { INLINE_LOGO_JPEG } from '@/assets/logoInline';
|
||||
import './SplashScreen.scss';
|
||||
|
||||
@@ -10,6 +11,8 @@ interface SplashScreenProps {
|
||||
const FADE_OUT_DURATION = 400;
|
||||
|
||||
export function SplashScreen({ onFinish, fadeOut = false }: SplashScreenProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
if (!fadeOut) return;
|
||||
const finishTimer = setTimeout(() => {
|
||||
@@ -25,8 +28,8 @@ export function SplashScreen({ onFinish, fadeOut = false }: SplashScreenProps) {
|
||||
<div className={`splash-screen ${fadeOut ? 'fade-out' : ''}`}>
|
||||
<div className="splash-content">
|
||||
<img src={INLINE_LOGO_JPEG} alt="CPAMC" className="splash-logo" />
|
||||
<h1 className="splash-title">CLI Proxy API</h1>
|
||||
<p className="splash-subtitle">Management Center</p>
|
||||
<h1 className="splash-title">{t('splash.title')}</h1>
|
||||
<p className="splash-subtitle">{t('splash.subtitle')}</p>
|
||||
<div className="splash-loader">
|
||||
<div className="splash-loader-bar" />
|
||||
</div>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
"login": "CLI Proxy API Management Center",
|
||||
"abbr": "CPAMC"
|
||||
},
|
||||
"splash": {
|
||||
"title": "CLI Proxy API",
|
||||
"subtitle": "Management Center"
|
||||
},
|
||||
"auto_login": {
|
||||
"title": "Auto Login in Progress...",
|
||||
"message": "Attempting to connect to server using locally saved connection information"
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
"login": "Центр управления CLI Proxy API",
|
||||
"abbr": "CPAMC"
|
||||
},
|
||||
"splash": {
|
||||
"title": "CLI Proxy API",
|
||||
"subtitle": "Центр управления"
|
||||
},
|
||||
"auto_login": {
|
||||
"title": "Автовход...",
|
||||
"message": "Пытаемся подключиться к серверу, используя сохранённые данные"
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
"login": "CLI Proxy API Management Center",
|
||||
"abbr": "CPAMC"
|
||||
},
|
||||
"splash": {
|
||||
"title": "CLI Proxy API",
|
||||
"subtitle": "管理中心"
|
||||
},
|
||||
"auto_login": {
|
||||
"title": "正在自动登录...",
|
||||
"message": "正在使用本地保存的连接信息尝试连接服务器"
|
||||
|
||||
@@ -188,8 +188,8 @@ export function LoginPage() {
|
||||
/* 启动动画 */
|
||||
<div className={styles.splashContent}>
|
||||
<img src={INLINE_LOGO_JPEG} alt="CPAMC" className={styles.splashLogo} />
|
||||
<h1 className={styles.splashTitle}>CLI Proxy API</h1>
|
||||
<p className={styles.splashSubtitle}>Management Center</p>
|
||||
<h1 className={styles.splashTitle}>{t('splash.title')}</h1>
|
||||
<p className={styles.splashSubtitle}>{t('splash.subtitle')}</p>
|
||||
<div className={styles.splashLoader}>
|
||||
<div className={styles.splashLoaderBar} />
|
||||
</div>
|
||||
|
||||
@@ -190,7 +190,7 @@ export function OAuthPage() {
|
||||
await navigator.clipboard.writeText(url);
|
||||
showNotification(t('notification.link_copied'), 'success');
|
||||
} catch {
|
||||
showNotification('Copy failed', 'error');
|
||||
showNotification(t('notification.copy_failed'), 'error');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user