Merge pull request #513 from h3poteto/iss-512
closes #512 Add show profile menu
This commit is contained in:
commit
cedc4057da
|
@ -35,6 +35,7 @@
|
|||
}
|
||||
},
|
||||
"side_menu": {
|
||||
"show_profile": "Profil ansehen",
|
||||
"edit_profile": "Profil bearbeiten",
|
||||
"home": "Home",
|
||||
"notification": "Benachrichtigung",
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
}
|
||||
},
|
||||
"side_menu": {
|
||||
"show_profile": "Show profile",
|
||||
"edit_profile": "Edit profile",
|
||||
"home": "Home",
|
||||
"notification": "Notification",
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
}
|
||||
},
|
||||
"side_menu": {
|
||||
"show_profile": "Voir le profil",
|
||||
"edit_profile": "Éditer mon profil",
|
||||
"home": "Accueil",
|
||||
"notification": "Notifications",
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
}
|
||||
},
|
||||
"side_menu": {
|
||||
"edit_profile": "編集",
|
||||
"show_profile": "プロフィール確認",
|
||||
"edit_profile": "プロフィール編集",
|
||||
"home": "ホーム",
|
||||
"notification": "通知",
|
||||
"favourite": "お気に入り",
|
||||
|
|
|
@ -43,7 +43,7 @@ export default {
|
|||
load () {
|
||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Timeline/fetchTimeline', this.account)
|
||||
.catch(() => {
|
||||
this.message({
|
||||
this.$message({
|
||||
message: this.$t('message.timeline_fetch_error'),
|
||||
type: 'error'
|
||||
})
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="show">{{ $t("side_menu.show_profile") }}</el-dropdown-item>
|
||||
<el-dropdown-item command="edit">{{ $t("side_menu.edit_profile") }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
@ -115,6 +116,16 @@ export default {
|
|||
},
|
||||
handleProfile (command) {
|
||||
switch (command) {
|
||||
case 'show':
|
||||
const accountURL = `${this.account.baseURL}/@${this.account.username}`
|
||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/searchAccount', accountURL)
|
||||
.then((account) => {
|
||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
|
||||
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
|
||||
})
|
||||
|
||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
|
||||
break
|
||||
case 'edit':
|
||||
shell.openExternal(this.account.baseURL + '/settings/profile')
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue