fix(chat): 优化chat页面项部样式
This commit is contained in:
1 parent
0d3a812e16
commit
4474ef7e3f
5 files changed
+25
-22
No files matched your search
@@ -31,23 +31,16 @@ const emit = defineEmits<{
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const avatarLabel = computed(() => (props.agentName === '人事规章' ? 'HR' : 'AI'));
|
||||
|
||||
const welcomeTitle = computed(() => (
|
||||
props.agentName === '人事规章'
|
||||
? '你好,我是人事规章 AI 助手'
|
||||
: t('chat.welcomeTitle')
|
||||
));
|
||||
const displayAgentName = computed(() => props.agentName || t('chat.assistantLabel'));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex h-full min-h-0 w-full flex-col items-center px-4 pb-2 pt-2 md:pb-3">
|
||||
<template v-if="suggestedQuestionsStyle === 'styled' && styledSections.length > 0">
|
||||
<div class="mb-6 mt-2 flex h-16 w-16 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-2xl font-bold text-white shadow-lg shadow-brand-500/20">
|
||||
{{ avatarLabel }}
|
||||
</div>
|
||||
<h2 class="mb-6 shrink-0 text-center text-xl font-bold text-primary md:text-2xl">
|
||||
{{ welcomeTitle }}
|
||||
<h2 class="mb-8 mt-12 shrink-0 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
|
||||
<span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
|
||||
<span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
|
||||
<span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
|
||||
</h2>
|
||||
|
||||
<div class="min-h-0 w-full flex-1 overflow-y-auto pb-2">
|
||||
@@ -81,11 +74,10 @@ const welcomeTitle = computed(() => (
|
||||
</template>
|
||||
|
||||
<template v-else-if="suggestedQuestions.length > 0">
|
||||
<div class="mb-6 mt-2 flex h-16 w-16 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-2xl font-bold text-white shadow-lg shadow-brand-500/20">
|
||||
AI
|
||||
</div>
|
||||
<h2 class="mb-6 shrink-0 text-center text-xl font-medium text-primary md:text-2xl">
|
||||
{{ $t('chat.welcomeTitle') }}
|
||||
<h2 class="mb-8 mt-12 shrink-0 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
|
||||
<span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
|
||||
<span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
|
||||
<span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
|
||||
</h2>
|
||||
|
||||
<div class="min-h-0 w-full flex-1 overflow-y-auto pb-2">
|
||||
@@ -104,11 +96,10 @@ const welcomeTitle = computed(() => (
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<div class="mb-6 mt-2 flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-2xl font-bold text-white shadow-lg shadow-brand-500/20">
|
||||
AI
|
||||
</div>
|
||||
<h2 class="text-center text-xl font-medium text-primary md:text-2xl">
|
||||
{{ $t('chat.welcomeTitle') }}
|
||||
<h2 class="mt-12 text-center text-2xl font-bold text-primary md:mt-16 md:text-3xl">
|
||||
<span>{{ $t('chat.welcomeAgentTitlePrefix') }}</span>
|
||||
<span class="mx-1 text-brand-600">{{ displayAgentName }}</span>
|
||||
<span>{{ $t('chat.welcomeAgentTitleSuffix') }}</span>
|
||||
</h2>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -175,6 +175,9 @@
|
||||
"langTh": "Thai",
|
||||
"logout": "Logout",
|
||||
"welcomeTitle": "Hello, I am Hexin AI Digital Human",
|
||||
"welcomeAgentTitle": "Hello, you are now in the {agentName} agent",
|
||||
"welcomeAgentTitlePrefix": "Hello, you are now in the",
|
||||
"welcomeAgentTitleSuffix": "agent",
|
||||
"askAnything": "Ask me anything...",
|
||||
"voiceFeature": "Voice feature",
|
||||
"voiceListening": "Listening...",
|
||||
|
||||
@@ -175,6 +175,9 @@
|
||||
"langTh": "ไทย",
|
||||
"logout": "ออกจากระบบ",
|
||||
"welcomeTitle": "สวัสดี ฉันคือ AI Digital Human ของ Hexin",
|
||||
"welcomeAgentTitle": "สวัสดี คุณเข้าสู่ตัวแทน {agentName} แล้ว",
|
||||
"welcomeAgentTitlePrefix": "สวัสดี คุณเข้าสู่ตัวแทน",
|
||||
"welcomeAgentTitleSuffix": "แล้ว",
|
||||
"askAnything": "ถามฉันได้ทุกเรื่อง...",
|
||||
"voiceFeature": "ฟีเจอร์เสียง",
|
||||
"voiceListening": "กำลังฟัง...",
|
||||
|
||||
@@ -179,6 +179,9 @@
|
||||
"langTh": "ไทย",
|
||||
"logout": "退出登录",
|
||||
"welcomeTitle": "你好,我是和信AI数字人",
|
||||
"welcomeAgentTitle": "你好,您已进入{agentName}智能体",
|
||||
"welcomeAgentTitlePrefix": "你好,您已进入",
|
||||
"welcomeAgentTitleSuffix": "智能体",
|
||||
"askAnything": "问我任何事...",
|
||||
"voiceFeature": "语音功能",
|
||||
"voiceListening": "正在聆听…",
|
||||
|
||||
@@ -175,6 +175,9 @@
|
||||
"langTh": "ไทย",
|
||||
"logout": "退出登入",
|
||||
"welcomeTitle": "你好,我是和信AI數字人",
|
||||
"welcomeAgentTitle": "你好,您已進入{agentName}智能體",
|
||||
"welcomeAgentTitlePrefix": "你好,您已進入",
|
||||
"welcomeAgentTitleSuffix": "智能體",
|
||||
"askAnything": "問我任何事...",
|
||||
"voiceFeature": "語音功能",
|
||||
"voiceListening": "正在聆聽…",
|
||||
|
||||
Reference in new issue
Block a user