From 4bd3c856f5c9158c0e14274054bbb7f0bfc4dcd2 Mon Sep 17 00:00:00 2001 From: 666ghj <670939375@qq.com> Date: Tue, 16 Dec 2025 19:17:35 +0800 Subject: [PATCH] Enhance Step5Interaction component with updated UI elements and improved functionality - Added an action bar icon and adjusted layout for better visual appeal and usability. - Updated button labels to Chinese for improved localization. - Introduced a new method for selecting the survey tab, enhancing user interaction. - Adjusted CSS styles for better responsiveness and alignment of elements within the action bar and dropdowns. --- frontend/src/components/Step5Interaction.vue | 61 +++++++++++++++++--- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/Step5Interaction.vue b/frontend/src/components/Step5Interaction.vue index c585397..7957542 100644 --- a/frontend/src/components/Step5Interaction.vue +++ b/frontend/src/components/Step5Interaction.vue @@ -79,10 +79,15 @@
-
+
+ + + +
Interactive Tools {{ profiles.length }} agents available
+
@@ -418,9 +423,17 @@ const selectReportAgentChat = () => { chatHistory.value = [] } +const selectSurveyTab = () => { + activeTab.value = 'survey' + selectedAgent.value = null + selectedAgentIndex.value = null + showAgentDropdown.value = false +} + const toggleAgentDropdown = () => { showAgentDropdown.value = !showAgentDropdown.value if (showAgentDropdown.value) { + activeTab.value = 'chat' chatTarget.value = 'agent' } } @@ -1110,10 +1123,21 @@ watch(() => props.simulationId, (newId) => { } .action-bar-header { + display: flex; + align-items: center; + gap: 12px; + min-width: 160px; +} + +.action-bar-icon { + color: #1F2937; + flex-shrink: 0; +} + +.action-bar-text { display: flex; flex-direction: column; gap: 2px; - min-width: 140px; } .action-bar-title { @@ -1184,10 +1208,18 @@ watch(() => props.simulationId, (newId) => { } .agent-pill { - min-width: 120px; + width: 200px; justify-content: space-between; } +.agent-pill span { + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + text-align: left; +} + .survey-pill { background: #ECFDF5; color: #047857; @@ -1730,14 +1762,26 @@ watch(() => props.simulationId, (newId) => { } .survey-setup { + flex: 1; + display: flex; + flex-direction: column; padding: 24px; border-bottom: 1px solid #E5E7EB; + overflow: hidden; } .setup-section { margin-bottom: 24px; } +.setup-section:first-child { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + min-height: 0; +} + .setup-section:last-child { margin-bottom: 0; } @@ -1765,9 +1809,10 @@ watch(() => props.simulationId, (newId) => { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; - max-height: 200px; + flex: 1; overflow-y: auto; padding: 4px; + align-content: start; } .agent-checkbox {