Enhance Step5Interaction component with professional design updates and improved UI elements
- Updated the action bar to a more professional design with enhanced layout and styling. - Introduced new utility classes for better typography and spacing. - Improved button styles for clarity and consistency, including updated labels for interaction buttons. - Enhanced dropdown menu design for better usability and visual appeal. - Adjusted CSS properties for improved responsiveness and overall user experience.
This commit is contained in:
parent
318d60fa42
commit
c43b83f10d
1 changed files with 134 additions and 64 deletions
|
|
@ -77,35 +77,40 @@
|
||||||
|
|
||||||
<!-- RIGHT PANEL: Interaction Interface -->
|
<!-- RIGHT PANEL: Interaction Interface -->
|
||||||
<div class="right-panel" ref="rightPanel">
|
<div class="right-panel" ref="rightPanel">
|
||||||
<!-- Unified Action Bar -->
|
<!-- Unified Action Bar - Professional Design -->
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<div class="action-bar-left">
|
<div class="action-bar-header">
|
||||||
|
<span class="action-bar-title">Interactive Tools</span>
|
||||||
|
<span class="action-bar-subtitle mono">{{ profiles.length }} agents available</span>
|
||||||
|
</div>
|
||||||
|
<div class="action-bar-tabs">
|
||||||
<button
|
<button
|
||||||
class="action-btn"
|
class="tab-pill"
|
||||||
:class="{ active: activeTab === 'chat' && chatTarget === 'report_agent' }"
|
:class="{ active: activeTab === 'chat' && chatTarget === 'report_agent' }"
|
||||||
@click="selectReportAgentChat"
|
@click="selectReportAgentChat"
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>
|
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
<span>与Report Agent对话</span>
|
<span>Report Agent</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="agent-dropdown" v-if="profiles.length > 0">
|
<div class="agent-dropdown" v-if="profiles.length > 0">
|
||||||
<button
|
<button
|
||||||
class="action-btn agent-option"
|
class="tab-pill agent-pill"
|
||||||
:class="{ active: activeTab === 'chat' && chatTarget === 'agent' }"
|
:class="{ active: activeTab === 'chat' && chatTarget === 'agent' }"
|
||||||
@click="toggleAgentDropdown"
|
@click="toggleAgentDropdown"
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
<circle cx="12" cy="7" r="4"></circle>
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
</svg>
|
</svg>
|
||||||
<span>{{ selectedAgent ? `与${selectedAgent.username}对话` : '与世界中的任意个体对话' }}</span>
|
<span>{{ selectedAgent ? selectedAgent.username : 'Select Agent' }}</span>
|
||||||
<svg class="dropdown-arrow" :class="{ open: showAgentDropdown }" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
<svg class="dropdown-arrow" :class="{ open: showAgentDropdown }" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<polyline points="6 9 12 15 18 9"></polyline>
|
<polyline points="6 9 12 15 18 9"></polyline>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div v-if="showAgentDropdown" class="dropdown-menu">
|
<div v-if="showAgentDropdown" class="dropdown-menu">
|
||||||
|
<div class="dropdown-header">选择对话对象</div>
|
||||||
<div
|
<div
|
||||||
v-for="(agent, idx) in profiles"
|
v-for="(agent, idx) in profiles"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
|
|
@ -120,18 +125,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="tab-divider"></div>
|
||||||
<div class="action-bar-right">
|
|
||||||
<button
|
<button
|
||||||
class="action-btn survey-btn"
|
class="tab-pill survey-pill"
|
||||||
:class="{ active: activeTab === 'survey' }"
|
:class="{ active: activeTab === 'survey' }"
|
||||||
@click="activeTab = 'survey'"
|
@click="activeTab = 'survey'"
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M9 11l3 3L22 4"></path>
|
<path d="M9 11l3 3L22 4"></path>
|
||||||
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>
|
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>
|
||||||
</svg>
|
</svg>
|
||||||
<span>在世界中发放问卷</span>
|
<span>Survey</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -754,6 +758,11 @@ watch(() => props.simulationId, (newId) => {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Utility Classes */
|
||||||
|
.mono {
|
||||||
|
font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
/* Main Split Layout */
|
/* Main Split Layout */
|
||||||
.main-split-layout {
|
.main-split-layout {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
@ -1089,74 +1098,110 @@ watch(() => props.simulationId, (newId) => {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Action Bar */
|
/* Action Bar - Professional Design */
|
||||||
.action-bar {
|
.action-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 12px 20px;
|
padding: 14px 20px;
|
||||||
border-bottom: 1px solid #E5E7EB;
|
border-bottom: 1px solid #E5E7EB;
|
||||||
background: #FAFAFA;
|
background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFC 100%);
|
||||||
gap: 12px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-bar-left {
|
.action-bar-header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
min-width: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar-title {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1F2937;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar-subtitle {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #9CA3AF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar-subtitle.mono {
|
||||||
|
font-family: 'JetBrains Mono', 'SF Mono', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
|
flex: 1;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-bar-right {
|
.tab-pill {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-btn {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 8px 14px;
|
padding: 8px 14px;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #4B5563;
|
color: #6B7280;
|
||||||
background: #FFFFFF;
|
background: #F3F4F6;
|
||||||
border: 1px solid #E5E7EB;
|
border: 1px solid transparent;
|
||||||
border-radius: 6px;
|
border-radius: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn:hover {
|
.tab-pill:hover {
|
||||||
background: #F9FAFB;
|
background: #E5E7EB;
|
||||||
border-color: #D1D5DB;
|
color: #374151;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn.active {
|
.tab-pill.active {
|
||||||
background: #1F2937;
|
background: #1F2937;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
border-color: #1F2937;
|
box-shadow: 0 2px 8px rgba(31, 41, 55, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn svg {
|
.tab-pill svg {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.survey-btn {
|
.tab-pill.active svg {
|
||||||
background: #F0FDF4;
|
opacity: 1;
|
||||||
border-color: #86EFAC;
|
|
||||||
color: #166534;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.survey-btn:hover {
|
.tab-divider {
|
||||||
background: #DCFCE7;
|
width: 1px;
|
||||||
border-color: #4ADE80;
|
height: 24px;
|
||||||
|
background: #E5E7EB;
|
||||||
|
margin: 0 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.survey-btn.active {
|
.agent-pill {
|
||||||
background: #166534;
|
min-width: 120px;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey-pill {
|
||||||
|
background: #ECFDF5;
|
||||||
|
color: #047857;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey-pill:hover {
|
||||||
|
background: #D1FAE5;
|
||||||
|
color: #065F46;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey-pill.active {
|
||||||
|
background: #047857;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
border-color: #166534;
|
box-shadow: 0 2px 8px rgba(4, 120, 87, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interaction Header */
|
/* Interaction Header */
|
||||||
|
|
@ -1379,14 +1424,10 @@ watch(() => props.simulationId, (newId) => {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-option {
|
|
||||||
min-width: 180px;
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-arrow {
|
.dropdown-arrow {
|
||||||
margin-left: auto;
|
margin-left: 4px;
|
||||||
transition: transform 0.2s ease;
|
transition: transform 0.2s ease;
|
||||||
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-arrow.open {
|
.dropdown-arrow.open {
|
||||||
|
|
@ -1395,30 +1436,50 @@ watch(() => props.simulationId, (newId) => {
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: calc(100% + 6px);
|
||||||
left: 0;
|
left: 50%;
|
||||||
right: 0;
|
transform: translateX(-50%);
|
||||||
margin-top: 4px;
|
min-width: 240px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border: 1px solid #E5E7EB;
|
border: 1px solid #E5E7EB;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
|
||||||
max-height: 300px;
|
max-height: 320px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown-header {
|
||||||
|
padding: 12px 16px 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #9CA3AF;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
border-bottom: 1px solid #F3F4F6;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-item {
|
.dropdown-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 12px 16px;
|
padding: 10px 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.15s ease;
|
transition: all 0.15s ease;
|
||||||
|
border-left: 3px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item:hover {
|
.dropdown-item:hover {
|
||||||
background: #F9FAFB;
|
background: #F9FAFB;
|
||||||
|
border-left-color: #1F2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-item:first-of-type {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-item:last-child {
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-avatar {
|
.agent-avatar {
|
||||||
|
|
@ -1426,32 +1487,41 @@ watch(() => props.simulationId, (newId) => {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
min-width: 32px;
|
min-width: 32px;
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
background: #1F2937;
|
background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
box-shadow: 0 2px 4px rgba(31, 41, 55, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-info {
|
.agent-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-name {
|
.agent-name {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #1F2937;
|
color: #1F2937;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent-role {
|
.agent-role {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: #9CA3AF;
|
color: #9CA3AF;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chat Messages */
|
/* Chat Messages */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue