|
135 | 135 | <el-text type="info">{{ $t('chat.noHistory') }}</el-text> |
136 | 136 | </div> |
137 | 137 | </el-sub-menu> |
138 | | - <el-dropdown trigger="click" type="primary" class="w-full"> |
| 138 | + |
| 139 | + <div v-if="!chatUser.chat_profile?.authentication" class="no-auth-avatar"> |
| 140 | + <el-avatar :size="32"> |
| 141 | + <img src="@/assets/user-icon.svg" style="width: 54%" alt="" /> |
| 142 | + </el-avatar> |
| 143 | + </div> |
| 144 | + <el-dropdown v-else trigger="click" type="primary" class="w-full"> |
139 | 145 | <div class="flex align-center user-info"> |
140 | 146 | <el-avatar :size="32"> |
141 | 147 | <img src="@/assets/user-icon.svg" style="width: 54%" alt="" /> |
142 | 148 | </el-avatar> |
143 | | - <!-- TODO --> |
144 | | - <span v-show="!isPcCollapse" class="ml-8 color-text-primary">{{ 222 }}</span> |
| 149 | + <span v-show="!isPcCollapse" class="ml-8 color-text-primary">{{ chatUser.chatUserProfile?.nick_name }}</span> |
145 | 150 | </div> |
146 | 151 |
|
147 | 152 | <template #dropdown> |
148 | 153 | <el-dropdown-menu class="avatar-dropdown"> |
149 | | - <div class="flex align-center" style="padding: 12px;"> |
| 154 | + <div class="flex align-center" style="padding: 8px 12px;"> |
150 | 155 | <div class="mr-8 flex align-center"> |
151 | 156 | <el-avatar :size="40"> |
152 | 157 | <img src="@/assets/user-icon.svg" style="width: 54%" alt="" /> |
153 | 158 | </el-avatar> |
154 | 159 | </div> |
155 | 160 | <div> |
156 | | - <!-- TODO --> |
157 | | - <h4 class="medium mb-4">{{ 111 }}</h4> |
158 | | - <div class="color-secondary">{{ `${t('common.username')}: 222` }}</div> |
| 161 | + <h4 class="medium mb-4">{{ chatUser.chatUserProfile?.nick_name }}</h4> |
| 162 | + <div class="color-secondary">{{ `${t('common.username')}: ${chatUser.chatUserProfile?.username}` }}</div> |
159 | 163 | </div> |
160 | 164 | </div> |
161 | | - <el-dropdown-item class="border-t" style="padding-top: 8px; padding-bottom: 8px;" @click="openResetPassword"> |
| 165 | + <el-dropdown-item v-if="chatUser.chatUserProfile?.source === 'LOCAL'" class="border-t" style="padding-top: 8px; padding-bottom: 8px;" @click="openResetPassword"> |
162 | 166 | <AppIcon iconName="app-export" /> |
163 | 167 | {{ $t('views.login.resetPassword') }} |
164 | 168 | </el-dropdown-item> |
165 | | - <el-dropdown-item class="border-t" @click="logout"> |
| 169 | + <el-dropdown-item v-if="chatUser.chatUserProfile?.source === 'LOCAL'" class="border-t" style="padding-top: 8px; padding-bottom: 8px;" @click="logout"> |
166 | 170 | <AppIcon iconName="app-export" /> |
167 | 171 | {{ $t('layout.logout') }} |
168 | 172 | </el-dropdown-item> |
@@ -545,6 +549,14 @@ onMounted(() => { |
545 | 549 | background: transparent; |
546 | 550 | } |
547 | 551 |
|
| 552 | + .no-auth-avatar { |
| 553 | + margin-top: auto; |
| 554 | + padding: 16px; |
| 555 | + .el-avatar { |
| 556 | + cursor: default; |
| 557 | + } |
| 558 | + } |
| 559 | +
|
548 | 560 | .el-dropdown { |
549 | 561 | margin-top: auto; |
550 | 562 | .user-info { |
|
0 commit comments