Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #121 Add profile dropdown menu for user's profile #261

Merged
merged 1 commit into from
Apr 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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