@@ -45,9 +45,19 @@
< el-table-column show -overflow -tooltip :tooltip-formatter = "tableRowFormatter" :label = "$t('tabEmailAddress')"
:min-width = "emailWidth" >
< template # default = "props" >
< div style = "display: flex;gap: 5px" >
< div style = "display: flex;gap: 5px;align-items: center " >
< div class = "email-row" > { { props . row . email } } < / div >
< el-tag type = "warning" v-if = "props.row.username" > L < / el -tag >
< template v-if = "oauthPlatform(props.row)" >
< el -avatar v-if = "oauthPlatform(props.row).iconType === 'image'"
:src = "oauthPlatform(props.row).icon"
:size = "16"
class = "oauth-platform-icon" / >
< Icon v-else
:icon = "oauthPlatform(props.row).icon"
width = "16"
height = "16"
class = "oauth-platform-icon" / >
< / template >
< / div >
< / template >
< / el-table-column >
@@ -229,12 +239,12 @@
< / el-dialog >
< el-dialog class = "account-dialog" v-model = "detailsShow" :title="t('userDetails')" >
< div class = "details" >
< div v-if = "userDetails.username"><span class="details-item-title" > LinuxDo : < / span >
< el -avatar :src = "userDetails.avatar" :size = "30" class = "linuxdo -avatar" / >
< span style = "margin: 0 10px" > 用户名 : { { userDetails . username } } < / span >
< span >
等级 : < el-tag type = "success" > { { userDetails . trustLevel } } < / el-tag >
< / span >
< div v-if = "userDetails.platform || userDetails.username" class="oauth- details" >
< el -avatar :src = "userDetails.avatar" :size = "30" class = "oauth -avatar" / >
< span > { { $t ( 'username' ) } } : { { userDetails . username } } < / span >
< span v-if = "userDetails.trustLevel != null" >
{{ $ t ( ' trustLevel ' ) }} : < el -tag type = "success" > { { userDetails . trustLevel } } < / el-tag >
< / span >
< / div >
< div v-if = "!sendNumShow" > < span
class = "details-item-title" > { { $t ( 'tabSent' ) } } : < / span > { { userDetails . sendEmailCount } }
@@ -398,6 +408,19 @@ const {t, locale} = useI18n();
const roleStore = useRoleStore ( )
const userStore = useUserStore ( )
const settingStore = useSettingStore ( )
const oauthPlatformMap = {
google : { key : 'google' , label : 'Google' , icon : 'devicon:google' , iconType : 'iconify' } ,
github : { key : 'github' , label : 'GitHub' , icon : 'codicon:github-inverted' , iconType : 'iconify' } ,
linuxdo : { key : 'linuxdo' , label : 'LinuxDo' , icon : '/image/linuxdo.webp' , iconType : 'image' } ,
}
function oauthPlatform ( row ) {
if ( row ? . platform && oauthPlatformMap [ row . platform ] ) {
return oauthPlatformMap [ row . platform ]
}
// 旧数据可能只有 username、无 platform
if ( row ? . username ) return oauthPlatformMap . linuxdo
return null
}
const filteredValue = [ 'normal' , 'del' ]
const filters = [ { text : t ( 'active' ) , value : 'normal' } , { text : t ( 'deleted' ) , value : 'del' } ]
const preserveExpanded = ref ( false )
@@ -1152,9 +1175,19 @@ function adjustWidth() {
}
}
: deep ( . linuxdo - avatar ) {
position : relative ! important ;
top : 10 px ;
. oauth - details {
display : flex ;
align - items : center ;
gap : 10 px ;
flex - wrap : wrap ;
}
: deep ( . oauth - avatar ) {
flex - shrink : 0 ;
}
: deep ( . oauth - platform - icon ) {
flex - shrink : 0 ;
}
. account - pagination {