diff --git a/src/frontend/client/src/components/Chat/Messages/Content/InvalidImagePlaceholder.tsx b/src/frontend/client/src/components/Chat/Messages/Content/InvalidImagePlaceholder.tsx index 56880080c..c775b545a 100644 --- a/src/frontend/client/src/components/Chat/Messages/Content/InvalidImagePlaceholder.tsx +++ b/src/frontend/client/src/components/Chat/Messages/Content/InvalidImagePlaceholder.tsx @@ -18,13 +18,20 @@ export function InvalidImagePlaceholder({
- - + + {/* pre-line so a translation can place its own break; zh splits the two + clauses onto their own lines rather than letting 100px decide. */} + {localize('com_chat_image_expired')}
diff --git a/src/frontend/client/src/components/Chat/Messages/Content/MessageImage.tsx b/src/frontend/client/src/components/Chat/Messages/Content/MessageImage.tsx index 05bbc450b..d670a4f1a 100644 --- a/src/frontend/client/src/components/Chat/Messages/Content/MessageImage.tsx +++ b/src/frontend/client/src/components/Chat/Messages/Content/MessageImage.tsx @@ -67,7 +67,7 @@ export function MessageImage({ return (
); } @@ -80,7 +80,12 @@ export function MessageImage({ src={url} alt={altText ?? ''} onError={() => setFailed(true)} - className="h-[120px] w-[160px] cursor-pointer rounded-lg object-cover" + // A transparent PNG would otherwise sit on the page's white and lose + // its own black artwork; the tint gives it something to show against. + // Deliberately a fixed light gray rather than a neutral token: the + // artwork inside the file doesn't invert with the theme, so a backdrop + // that darkened alongside it would hide the very thing it's here for. + className="h-[100px] w-[100px] cursor-pointer rounded-lg bg-[#F8F8F8] object-cover" /> diff --git a/src/frontend/client/src/locales/zh-Hans/translation.json b/src/frontend/client/src/locales/zh-Hans/translation.json index 8047fd6b6..75b50914f 100644 --- a/src/frontend/client/src/locales/zh-Hans/translation.json +++ b/src/frontend/client/src/locales/zh-Hans/translation.json @@ -183,7 +183,7 @@ "com_bschoose_confirm": "确认", "com_bschoose_confirmed": "已确认", "com_case_featured": "$t(linsight)精选案例", - "com_chat_image_expired": "图片已失效,无法查看", + "com_chat_image_expired": "图片已失效\n无法查看", "com_chat_knowledge_empty_no_org_kbs": "暂无组织知识库", "com_chat_knowledge_empty_no_spaces": "暂无知识空间", "com_chat_knowledge_placeholder_search_space": "搜索知识空间名称",