From b167170aa9040cf45b326a76e77275e4c24bf7b3 Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 8 Jul 2025 11:27:11 +0800 Subject: [PATCH] style: tag tooltip content width --- src/components/status-tag/index.tsx | 4 +++- src/global.less | 2 +- src/locales/en-US/resources.ts | 4 ++-- src/locales/ja-JP/resources.ts | 8 ++++---- src/locales/ru-RU/resources.ts | 8 ++++---- src/pages/resources/components/workers.tsx | 1 + 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/components/status-tag/index.tsx b/src/components/status-tag/index.tsx index 175db791..db303538 100644 --- a/src/components/status-tag/index.tsx +++ b/src/components/status-tag/index.tsx @@ -29,6 +29,7 @@ type StatusTagProps = { download?: { percent: number; }; + maxTooltipWidth?: number; extra?: React.ReactNode; actions?: { label: string; @@ -44,6 +45,7 @@ const StatusTag: React.FC = ({ download, extra, actions = [], + maxTooltipWidth = 250, type = 'tag' }) => { const { text, status } = statusValue; @@ -118,7 +120,7 @@ const StatusTag: React.FC = ({
Copy the token menu.', + 'Click the Copy token menu.', 'resources.register.worker.step2': 'Click the Quick Config menu.', 'resources.register.worker.step3': @@ -82,7 +82,7 @@ export default { 'resources.register.worker.step4': 'Select Worker as the service role.', 'resources.register.worker.step5': - 'Enter the Server URL.', + 'Enter the Server URL.', 'resources.register.worker.step6': 'Paste the Token.', 'resources.register.worker.step7': diff --git a/src/locales/ja-JP/resources.ts b/src/locales/ja-JP/resources.ts index ba16b5fe..4d174227 100644 --- a/src/locales/ja-JP/resources.ts +++ b/src/locales/ja-JP/resources.ts @@ -75,7 +75,7 @@ export default { 'resources.modelfiles.copy.tips': 'フルパスをコピー', 'resources.filter.path': 'パスでフィルタ', 'resources.register.worker.step1': - 'Click the Copy the token menu.', + 'Click the Copy token menu.', 'resources.register.worker.step2': 'Click the Quick Config menu.', 'resources.register.worker.step3': @@ -83,7 +83,7 @@ export default { 'resources.register.worker.step4': 'Select Worker as the service role.', 'resources.register.worker.step5': - 'Enter the Server URL.', + 'Enter the Server URL.', 'resources.register.worker.step6': 'Paste the Token.', 'resources.register.worker.step7': @@ -93,11 +93,11 @@ export default { }; // ========== To-Do: Translate Keys (Remove After Translation) ========== -// 1. 'resources.register.worker.step1': 'Click the Copy the token menu.', +// 1. 'resources.register.worker.step1': 'Click the Copy token menu.', // 2. 'resources.register.worker.step2': 'Click the Quick Config menu.', // 3. 'resources.register.worker.step3': 'Click the General tab.', // 4. 'resources.register.worker.step4': 'Select Worker as the service role.', -// 5. 'resources.register.worker.step5': 'Enter the Server URL.', +// 5. 'resources.register.worker.step5': 'Enter the Server URL.', // 6. 'resources.register.worker.step6': 'Paste the Token.', // 7. 'resources.register.worker.step7': 'Click Restart to apply the settings.', // 8. 'resources.register.install.title': 'Install GPUStack', diff --git a/src/locales/ru-RU/resources.ts b/src/locales/ru-RU/resources.ts index 3c708c50..03d74be0 100644 --- a/src/locales/ru-RU/resources.ts +++ b/src/locales/ru-RU/resources.ts @@ -73,7 +73,7 @@ export default { 'resources.modelfiles.copy.tips': 'Скопировать полный путь', 'resources.filter.path': 'Фильтрация по пути', 'resources.register.worker.step1': - 'Click the Copy the token menu.', + 'Click the Copy token menu.', 'resources.register.worker.step2': 'Click the Quick Config menu.', 'resources.register.worker.step3': @@ -81,7 +81,7 @@ export default { 'resources.register.worker.step4': 'Select Worker as the service role.', 'resources.register.worker.step5': - 'Enter the Server URL.', + 'Enter the Server URL.', 'resources.register.worker.step6': 'Paste the Token.', 'resources.register.worker.step7': @@ -91,11 +91,11 @@ export default { }; // ========== To-Do: Translate Keys (Remove After Translation) ========== -// 1. 'resources.register.worker.step1': 'Click the Copy the token menu.', +// 1. 'resources.register.worker.step1': 'Click the Copy token menu.', // 2. 'resources.register.worker.step2': 'Click the Quick Config menu.', // 3. 'resources.register.worker.step3': 'Click the General tab.', // 4. 'resources.register.worker.step4': 'Select Worker as the service role.', -// 5. 'resources.register.worker.step5': 'Enter the Server URL.', +// 5. 'resources.register.worker.step5': 'Enter the Server URL.', // 6. 'resources.register.worker.step6': 'Paste the Token.', // 7. 'resources.register.worker.step7': 'Click Restart to apply the settings.', // 8. 'resources.register.install.title': 'Install GPUStack', diff --git a/src/pages/resources/components/workers.tsx b/src/pages/resources/components/workers.tsx index 37fd4d99..c1dbfc2a 100644 --- a/src/pages/resources/components/workers.tsx +++ b/src/pages/resources/components/workers.tsx @@ -283,6 +283,7 @@ const Workers: React.FC = () => { render={(text, record: ListItem) => { return (