Skip to content

Commit

Permalink
Merge pull request #261 from h3poteto/iss-121
Browse files Browse the repository at this point in the history
closes #121 Add profile dropdown menu for user's profile
  • Loading branch information
h3poteto authored Apr 22, 2018
2 parents 7e989d9 + 0708478 commit 564db61
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/renderer/components/TimelineSpace/SideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
<div id="side_menu">
<div class="profile-wrapper" style="-webkit-app-region: drag;">
<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>
</div>
</div>
Expand Down Expand Up @@ -56,6 +65,7 @@

<script>
import { mapState } from 'vuex'
import { shell } from 'electron'
export default {
name: 'side-menu',
Expand All @@ -71,6 +81,13 @@ export default {
methods: {
id () {
return this.$route.params.id
},
handleProfile (command) {
switch (command) {
case 'edit':
shell.openExternal(this.account.baseURL + '/settings/profile')
break
}
}
}
}
Expand All @@ -94,6 +111,10 @@ export default {
box-sizing: border-box;
overflow: hidden;
text-overflow: ellipsis;
.el-dropdown-link {
cursor: pointer;
}
}
}
Expand Down

0 comments on commit 564db61

Please sign in to comment.