Update profile display logic in Step2EnvSetup and modal components for consistency

- Changed profile display from 'realname' to 'username' and 'name' for better clarity and consistency across the application.
- Enhanced CSS for header alignment in multiple views, ensuring a centered layout for improved visual appeal.
This commit is contained in:
666ghj 2025-12-12 18:51:08 +08:00
parent f590784345
commit 307990d7b6
5 changed files with 30 additions and 5 deletions

View file

@ -90,8 +90,8 @@
@click="selectProfile(profile)" @click="selectProfile(profile)"
> >
<div class="profile-header"> <div class="profile-header">
<span class="profile-realname">{{ profile.realname || 'Unknown' }}</span> <span class="profile-realname">{{ profile.username || 'Unknown' }}</span>
<span class="profile-username">@{{ profile.username || `agent_${idx}` }}</span> <span class="profile-username">@{{ profile.name || `agent_${idx}` }}</span>
</div> </div>
<div class="profile-meta"> <div class="profile-meta">
<span class="profile-profession">{{ profile.profession || '未知职业' }}</span> <span class="profile-profession">{{ profile.profession || '未知职业' }}</span>
@ -535,8 +535,8 @@
<div class="modal-header"> <div class="modal-header">
<div class="modal-header-info"> <div class="modal-header-info">
<div class="modal-name-row"> <div class="modal-name-row">
<span class="modal-realname">{{ selectedProfile.realname }}</span> <span class="modal-realname">{{ selectedProfile.username }}</span>
<span class="modal-username">@{{ selectedProfile.username }}</span> <span class="modal-username">@{{ selectedProfile.name }}</span>
</div> </div>
<span class="modal-profession">{{ selectedProfile.profession }}</span> <span class="modal-profession">{{ selectedProfile.profession }}</span>
</div> </div>
@ -929,7 +929,7 @@ const fetchProfilesRealtime = async () => {
lastLoggedProfileCount = currentCount lastLoggedProfileCount = currentCount
const total = expectedTotal.value || '?' const total = expectedTotal.value || '?'
const latestProfile = profiles.value[currentCount - 1] const latestProfile = profiles.value[currentCount - 1]
const profileName = latestProfile?.realname || latestProfile?.username || `Agent_${currentCount}` const profileName = latestProfile?.name || latestProfile?.username || `Agent_${currentCount}`
if (currentCount === 1) { if (currentCount === 1) {
addLog(`开始生成Agent人设...`) addLog(`开始生成Agent人设...`)
} }

View file

@ -424,6 +424,13 @@ onUnmounted(() => {
padding: 0 24px; padding: 0 24px;
background: #FFF; background: #FFF;
z-index: 100; z-index: 100;
position: relative;
}
.header-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
} }
.brand { .brand {

View file

@ -1137,6 +1137,9 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 12px;
position: absolute;
left: 50%;
transform: translateX(-50%);
} }
.step-badge { .step-badge {

View file

@ -330,6 +330,13 @@ onUnmounted(() => {
padding: 0 24px; padding: 0 24px;
background: #FFF; background: #FFF;
z-index: 100; z-index: 100;
position: relative;
}
.header-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
} }
.brand { .brand {
@ -437,3 +444,4 @@ onUnmounted(() => {
border-right: 1px solid #EAEAEA; border-right: 1px solid #EAEAEA;
} }
</style> </style>

View file

@ -317,6 +317,7 @@ onMounted(async () => {
padding: 0 24px; padding: 0 24px;
background: #FFF; background: #FFF;
z-index: 100; z-index: 100;
position: relative;
} }
.brand { .brand {
@ -327,6 +328,12 @@ onMounted(async () => {
cursor: pointer; cursor: pointer;
} }
.header-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.view-switcher { .view-switcher {
display: flex; display: flex;
background: #F5F5F5; background: #F5F5F5;