diff --git a/README.md b/README.md index 431d7b831..973d6e6a3 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,13 @@

- Platform + Platform Electron React chat on Discord + Downloads License

diff --git a/README.zh-CN.md b/README.zh-CN.md index 3a76ebbe8..3184b8aef 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -19,12 +19,13 @@

- Platform + Platform Electron React chat on Discord + Downloads License

diff --git a/src/pages/Setup/index.tsx b/src/pages/Setup/index.tsx index 0085497d4..41a272d7e 100644 --- a/src/pages/Setup/index.tsx +++ b/src/pages/Setup/index.tsx @@ -23,6 +23,7 @@ import { import { TitleBar } from '@/components/layout/TitleBar'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; +import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip'; import { Label } from '@/components/ui/label'; import { cn } from '@/lib/utils'; import { useGatewayStore } from '@/stores/gateway'; @@ -559,27 +560,43 @@ function RuntimeContent({ onStatusChange }: RuntimeContentProps) { } }; + const ERROR_TRUNCATE_LEN = 30; + const renderStatus = (status: 'checking' | 'success' | 'error', message: string) => { if (status === 'checking') { return ( - - + + {message || 'Checking...'} ); } if (status === 'success') { return ( - - + + {message} ); } + + const isLong = message.length > ERROR_TRUNCATE_LEN; + const displayMsg = isLong ? message.slice(0, ERROR_TRUNCATE_LEN) : message; + return ( - - - {message} + + + {displayMsg} + {isLong && ( + + + ... + + + {message} + + + )} ); }; @@ -599,23 +616,27 @@ function RuntimeContent({ onStatusChange }: RuntimeContentProps) {
-
- {t('runtime.nodejs')} - {renderStatus(checks.nodejs.status, checks.nodejs.message)} +
+ {t('runtime.nodejs')} +
+ {renderStatus(checks.nodejs.status, checks.nodejs.message)} +
-
-
+
+
{t('runtime.openclaw')} {openclawDir && ( -

+

{openclawDir}

)}
- {renderStatus(checks.openclaw.status, checks.openclaw.message)} +
+ {renderStatus(checks.openclaw.status, checks.openclaw.message)} +
-
-
+
+
Gateway Service {checks.gateway.status === 'error' && ( )}
- {renderStatus(checks.gateway.status, checks.gateway.message)} +
+ {renderStatus(checks.gateway.status, checks.gateway.message)} +