- Add human_message_inactive_text_color

This commit is contained in:
Josako
2025-11-13 10:19:39 +01:00
parent 82ca6b537a
commit 5dd711bcd2
5 changed files with 36 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ def get_default_chat_customisation(tenant_customisation=None):
'ai_message_text_color': '#212529', 'ai_message_text_color': '#212529',
'human_message_background': '#212529', 'human_message_background': '#212529',
'human_message_text_color': '#ffffff', 'human_message_text_color': '#ffffff',
'human_message_inactive_text_color': '#808080'
} }
# If no tenant customization is provided, return the defaults # If no tenant customization is provided, return the defaults

View File

@@ -82,6 +82,11 @@ configuration:
description: "Human Message Text Color" description: "Human Message Text Color"
type: "color" type: "color"
required: false required: false
human_message_inactive_text_color:
name: "Human Message Inactive Text Color"
description: "Human Message Inactive Text Color"
type: "color"
required: false
metadata: metadata:
author: "Josako" author: "Josako"
date_added: "2024-06-06" date_added: "2024-06-06"

View File

@@ -1,6 +1,6 @@
{ {
"dist/chat-client.js": "dist/chat-client.f7f06623.js", "dist/chat-client.js": "dist/chat-client.f7134231.js",
"dist/chat-client.css": "dist/chat-client.cf7bc0ef.css", "dist/chat-client.css": "dist/chat-client.99e10656.css",
"dist/main.js": "dist/main.6a617099.js", "dist/main.js": "dist/main.6a617099.js",
"dist/main.css": "dist/main.06893f70.css" "dist/main.css": "dist/main.06893f70.css"
} }

View File

@@ -49,6 +49,7 @@
:maxlength="maxLength" :maxlength="maxLength"
class="message-input" class="message-input"
:class="{ 'over-limit': isOverLimit }" :class="{ 'over-limit': isOverLimit }"
:style="{ '--placeholder-color': placeholderColor }"
></textarea> ></textarea>
</div> </div>
@@ -170,6 +171,13 @@ export default {
return 'Verzenden...'; return 'Verzenden...';
} }
return this.formData ? 'Verstuur formulier' : 'Verstuur bericht'; return this.formData ? 'Verstuur formulier' : 'Verstuur bericht';
},
// Kleur voor placeholder (inactieve toestand)
placeholderColor() {
const cfg = (typeof window !== 'undefined' && window.chatConfig) ? window.chatConfig : {};
const custom = cfg.customisation || {};
return custom.human_message_inactive_text_color || '#808080';
} }
}, },
watch: { watch: {
@@ -487,6 +495,24 @@ export default {
display: none; display: none;
} }
/* Placeholder kleur op basis van customisation */
.message-input::placeholder {
color: var(--placeholder-color, #808080);
opacity: 1; /* Zorgt ervoor dat de kleur niet gedimd wordt in sommige browsers */
}
.message-input::-webkit-input-placeholder {
color: var(--placeholder-color, #808080);
}
.message-input::-moz-placeholder {
color: var(--placeholder-color, #808080);
}
.message-input:-ms-input-placeholder {
color: var(--placeholder-color, #808080);
}
.message-input::-ms-input-placeholder {
color: var(--placeholder-color, #808080);
}
/* Input actions */ /* Input actions */
.input-actions { .input-actions {

View File

@@ -29,6 +29,8 @@
'name': tenant_make.name or 'EveAI', 'name': tenant_make.name or 'EveAI',
'logo_url': tenant_make.logo_url or '' 'logo_url': tenant_make.logo_url or ''
}|tojson|safe }}, }|tojson|safe }},
// Geef volledige customisation door naar de client
customisation: {{ customisation|tojson|safe }},
// Environment-aware static base provided by Flask's overridden url_for // Environment-aware static base provided by Flask's overridden url_for
staticBase: {{ static_url|tojson }} staticBase: {{ static_url|tojson }}
}; };