Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: add background color for chat bubble in light and dark themes (#22472)

Wu Tianweiaef67ed7ece1
diff --git a/web/app/components/base/chat/chat/question.tsx b/web/app/components/base/chat/chat/question.tsx
index cae8e2b8ce9..666a869a32e 100644
--- a/web/app/components/base/chat/chat/question.tsx
+++ b/web/app/components/base/chat/chat/question.tsx
@@ -130,7 +130,7 @@ const Question: FC<QuestionProps> = ({
/>
)
}
- { !isEditing
+ {!isEditing
? <Markdown content={content} />
: <div className="
flex flex-col gap-2 rounded-xl
@@ -151,8 +151,8 @@ const Question: FC<QuestionProps> = ({
<Button variant='ghost' onClick={handleCancelEditing}>{t('common.operation.cancel')}</Button>
<Button variant='primary' onClick={handleResend}>{t('common.chat.resend')}</Button>
</div>
- </div> }
- { !isEditing && <ContentSwitch
+ </div>}
+ {!isEditing && <ContentSwitch
count={item.siblingCount}
currentIndex={item.siblingIndex}
prevDisabled={!item.prevSibling}
diff --git a/web/tailwind-common-config.ts b/web/tailwind-common-config.ts
index eff1530017b..350c1c29d25 100644
--- a/web/tailwind-common-config.ts
+++ b/web/tailwind-common-config.ts
@@ -90,6 +90,9 @@ const config = {
fontSize: {
'2xs': '0.625rem',
},
+ backgroundColor: {
+ 'background-gradient-bg-fill-chat-bubble-bg-3': 'var(--color-background-gradient-bg-fill-chat-bubble-bg-3)',
+ },
backgroundImage: {
'chatbot-bg': 'var(--color-chatbot-bg)',
'chat-bubble-bg': 'var(--color-chat-bubble-bg)',
diff --git a/web/themes/manual-dark.css b/web/themes/manual-dark.css
index ed5f12bbc45..316fd7573a1 100644
--- a/web/themes/manual-dark.css
+++ b/web/themes/manual-dark.css
@@ -63,4 +63,5 @@ html[data-theme="dark"] {
--color-premium-badge-border-highlight-color: #ffffff33;
--color-price-enterprise-background: linear-gradient(180deg, rgba(185, 211, 234, 0.00) 0%, rgba(180, 209, 234, 0.92) 100%);
--color-grid-mask-background: linear-gradient(0deg, rgba(0, 0, 0, 0.00) 0%, rgba(24, 24, 25, 0.1) 62.25%, rgba(24, 24, 25, 0.10) 100%);
+ --color-background-gradient-bg-fill-chat-bubble-bg-3: #27314d;
}
diff --git a/web/themes/manual-light.css b/web/themes/manual-light.css
index c20155036e9..1198ab83969 100644
--- a/web/themes/manual-light.css
+++ b/web/themes/manual-light.css
@@ -63,4 +63,5 @@ html[data-theme="light"] {
--color-premium-badge-border-highlight-color: #fffffff2;
--color-price-enterprise-background: linear-gradient(180deg, rgba(185, 211, 234, 0.00) 0%, rgba(180, 209, 234, 0.92) 100%);
--color-grid-mask-background: linear-gradient(0deg, #FFF 0%, rgba(217, 217, 217, 0.10) 62.25%, rgba(217, 217, 217, 0.10) 100%);
+ --color-background-gradient-bg-fill-chat-bubble-bg-3: #e1effe;
}