refs #121 Add profile dropdown menu for user's profile
This commit is contained in:
parent
7e989d9ec2
commit
070847881b
|
@ -2,7 +2,16 @@
|
||||||
<div id="side_menu">
|
<div id="side_menu">
|
||||||
<div class="profile-wrapper" style="-webkit-app-region: drag;">
|
<div class="profile-wrapper" style="-webkit-app-region: drag;">
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<div>@{{ account.username }}</div>
|
<div>@{{ account.username }}
|
||||||
|
<el-dropdown trigger="click" @command="handleProfile">
|
||||||
|
<span class="el-dropdown-link">
|
||||||
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="edit">Edit profile</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
<span>{{ account.domain }}</span>
|
<span>{{ account.domain }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,6 +65,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
import { shell } from 'electron'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'side-menu',
|
name: 'side-menu',
|
||||||
|
@ -71,6 +81,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
id () {
|
id () {
|
||||||
return this.$route.params.id
|
return this.$route.params.id
|
||||||
|
},
|
||||||
|
handleProfile (command) {
|
||||||
|
switch (command) {
|
||||||
|
case 'edit':
|
||||||
|
shell.openExternal(this.account.baseURL + '/settings/profile')
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,6 +111,10 @@ export default {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
.el-dropdown-link {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue