1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-31 01:27:26 +01:00

refs #258 Display avatar in global header

This commit is contained in:
AkiraFukushima 2018-04-22 16:36:58 +09:00
parent f58ca80182
commit c7cd6f5176

View File

@ -9,7 +9,8 @@
text-color="#909399" text-color="#909399"
active-text-color="#ffffff"> active-text-color="#ffffff">
<el-menu-item :index="index.toString()" v-for="(account, index) in accounts" v-bind:key="account._id" :route="{path: `/${account._id}/home`}" @click="select(account)"> <el-menu-item :index="index.toString()" v-for="(account, index) in accounts" v-bind:key="account._id" :route="{path: `/${account._id}/home`}" @click="select(account)">
<i class="el-icon-menu"></i> <i v-if="account.avatar === undefined || account.avatar === null || account.avatar === ''" class="el-icon-menu"></i>
<img v-else :src="account.avatar" class="avatar" />
<span slot="title">{{ account.domain }}</span> <span slot="title">{{ account.domain }}</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="/login" @click="login"> <el-menu-item index="/login" @click="login">
@ -77,6 +78,21 @@ export default {
.el-tooltip { .el-tooltip {
outline: 0; outline: 0;
text-align: center;
padding: 0 !important;
}
.avatar {
width: 42px;
height: 42px;
border-radius: 50%;
mix-blend-mode: overlay;
}
.is-active {
.avatar {
mix-blend-mode: normal;
}
} }
} }