diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 0dba78b15..84de778c3 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -83,6 +83,9 @@ i18n interpolation: { escapeValue: false, // React already escapes }, + react: { + useSuspense: false, + }, }); export default i18n; diff --git a/src/main.tsx b/src/main.tsx index 4faf2f106..a2e30fb03 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -5,6 +5,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import { HashRouter } from 'react-router-dom'; import App from './App'; +import './i18n'; import './styles/globals.css'; ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/src/pages/Setup/index.tsx b/src/pages/Setup/index.tsx index 6bbc8c56a..594665e4c 100644 --- a/src/pages/Setup/index.tsx +++ b/src/pages/Setup/index.tsx @@ -20,6 +20,7 @@ import { ExternalLink, BookOpen, } from 'lucide-react'; +import { TitleBar } from '@/components/layout/TitleBar'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; @@ -182,122 +183,125 @@ export function Setup() { return ( -
- {/* Progress Indicator */} -
-
- {steps.map((s, i) => ( -
-
- {i < safeStepIndex ? ( - - ) : ( - {i + 1} - )} -
- {i < steps.length - 1 && ( +
+ +
+ {/* Progress Indicator */} +
+
+ {steps.map((s, i) => ( +
+ {i < safeStepIndex ? ( + + ) : ( + {i + 1} + )} +
+ {i < steps.length - 1 && ( +
+ )} +
+ ))} +
+
+ + {/* Step Content */} + + +
+

{t(`steps.${step.id}.title`)}

+

{t(`steps.${step.id}.description`)}

+
+ + {/* Step-specific content */} +
+ {safeStepIndex === STEP.WELCOME && } + {safeStepIndex === STEP.RUNTIME && } + {safeStepIndex === STEP.PROVIDER && ( + + )} + {safeStepIndex === STEP.CHANNEL && } + {safeStepIndex === STEP.INSTALLING && ( + setCurrentStep((i) => i + 1)} + /> + )} + {safeStepIndex === STEP.COMPLETE && ( + )}
- ))} -
-
- {/* Step Content */} - - -
-

{t(`steps.${step.id}.title`)}

-

{t(`steps.${step.id}.description`)}

-
- - {/* Step-specific content */} -
- {safeStepIndex === STEP.WELCOME && } - {safeStepIndex === STEP.RUNTIME && } - {safeStepIndex === STEP.PROVIDER && ( - - )} - {safeStepIndex === STEP.CHANNEL && } - {safeStepIndex === STEP.INSTALLING && ( - setCurrentStep((i) => i + 1)} - /> - )} - {safeStepIndex === STEP.COMPLETE && ( - - )} -
- - {/* Navigation - hidden during installation step */} - {safeStepIndex !== STEP.INSTALLING && ( -
-
- {!isFirstStep && ( - - )} -
-
- {safeStepIndex === STEP.CHANNEL && ( - - )} - {!isLastStep && safeStepIndex !== STEP.RUNTIME && safeStepIndex !== STEP.CHANNEL && ( - - )} - )} - +
+
+ {safeStepIndex === STEP.CHANNEL && ( + + )} + {!isLastStep && safeStepIndex !== STEP.RUNTIME && safeStepIndex !== STEP.CHANNEL && ( + + )} + +
-
- )} - - + )} + + +
); } @@ -312,7 +316,7 @@ function WelcomeContent() {
🤖

{t('welcome.title')}

-

+

{t('welcome.description')}

@@ -331,7 +335,7 @@ function WelcomeContent() { ))}
-
-
+
{t('runtime.openclaw')} {openclawDir && ( -

+

{openclawDir}

)}
{renderStatus(checks.openclaw.status, checks.openclaw.message)}
-
+
Gateway Service {checks.gateway.status === 'error' && ( @@ -626,7 +630,7 @@ function RuntimeContent({ onStatusChange }: RuntimeContentProps) {

{t('runtime.issue.title')}

-

+

{t('runtime.issue.desc')}

@@ -636,9 +640,9 @@ function RuntimeContent({ onStatusChange }: RuntimeContentProps) { {/* Log viewer panel */} {showLogs && ( -
+
-

Application Logs

+

Application Logs

@@ -904,7 +908,7 @@ function ProviderContent({ onConfiguredChange(false); }} autoComplete="off" - className="bg-white/5 border-white/10" + className="bg-background border-input" />
)} @@ -923,9 +927,9 @@ function ProviderContent({ onConfiguredChange(false); }} autoComplete="off" - className="bg-white/5 border-white/10" + className="bg-background border-input" /> -

+

{t('provider.modelIdDesc')}

@@ -947,12 +951,12 @@ function ProviderContent({ setKeyValid(null); }} autoComplete="off" - className="pr-10 bg-white/5 border-white/10" + className="pr-10 bg-background border-input" /> @@ -978,7 +982,7 @@ function ProviderContent({

)} -

+

{t('provider.storedLocally')}

@@ -1073,12 +1077,12 @@ function SetupChannelContent() {

{t('channel.connected', { name: meta?.name || 'Channel' })}

-

+

{t('channel.connectedDesc')}

@@ -1131,7 +1135,7 @@ function SetupChannelContent() {
@@ -1139,14 +1143,14 @@ function SetupChannelContent() {

{meta?.icon} {t('channel.configure', { name: meta?.name })}

-

{t(meta?.description || '')}

+

{t(meta?.description || '')}

{/* Instructions */} -
+
-

{t('channel.howTo')}

+

{t('channel.howTo')}

{meta?.docsUrl && ( )}
-
    +
      {meta?.instructions.map((inst, i) => (
    1. {t(inst)}
    2. ))} @@ -1176,7 +1180,7 @@ function SetupChannelContent() { const isPassword = field.type === 'password'; return (
      -