Add pictogram icons for chief complaints and make symptom selector image-friendly

This commit is contained in:
Dualmind-Assistant
2026-04-21 13:04:29 +00:00
parent fea8c105ab
commit 4d2a3595ed
10 changed files with 75 additions and 12 deletions
+27 -2
View File
@@ -4,6 +4,7 @@ const modelValue = defineModel<string | null>()
interface QuestionOption {
value: string
label: string
icon?: string
}
const props = defineProps<{
@@ -28,7 +29,10 @@ function select(value: string) {
:class="{ active: opt.value === modelValue }"
@click="select(opt.value)"
>
{{ opt.label }}
<span class="icon-wrapper" v-if="opt.icon">
<img :src="opt.icon" :alt="opt.label" class="icon" />
</span>
<span class="label">{{ opt.label }}</span>
</button>
</div>
</div>
@@ -47,7 +51,7 @@ h2 {
}
.symptom-btn {
padding: 0.85rem 0.75rem;
padding: 0.75rem 0.75rem;
border-radius: 18px;
border: 1px solid #e5e7eb;
background: #f9fafb;
@@ -55,10 +59,31 @@ h2 {
font-size: 0.95rem;
color: #111827;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.75rem;
transition: background 0.12s ease-out, border-color 0.12s ease-out, box-shadow 0.12s ease-out,
transform 0.08s ease-out;
}
.icon-wrapper {
flex-shrink: 0;
width: 44px;
height: 44px;
border-radius: 14px;
overflow: hidden;
}
.icon {
width: 100%;
height: 100%;
object-fit: cover;
}
.label {
flex: 1;
}
.symptom-btn:hover {
background: #f3f4f6;
}
@@ -5,6 +5,7 @@ const API_BASE_URL = import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:8000
export interface QuestionOption {
value: string
label: string
icon?: string
}
export interface Question {