Open detail and profile using shortcut in reblog notification
This commit is contained in:
parent
377c9a6225
commit
555e28bff3
|
@ -2,7 +2,7 @@
|
|||
<div
|
||||
class="status"
|
||||
tabIndex="0"
|
||||
v-shortkey="shortcutEnabled ? {next: ['j'], prev: ['k']} : {}"
|
||||
v-shortkey="shortcutEnabled ? {next: ['j'], prev: ['k'], open: ['o'], profile: ['p']} : {}"
|
||||
@shortkey="handleStatusControl"
|
||||
ref="status"
|
||||
@click="$emit('select')"
|
||||
|
@ -182,6 +182,11 @@ export default {
|
|||
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
|
||||
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
|
||||
},
|
||||
openDetail (message) {
|
||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/openTootComponent')
|
||||
this.$store.dispatch('TimelineSpace/Contents/SideBar/TootDetail/changeToot', message)
|
||||
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
|
||||
},
|
||||
mediaAttachments (message) {
|
||||
return message.media_attachments
|
||||
},
|
||||
|
@ -214,6 +219,12 @@ export default {
|
|||
case 'prev':
|
||||
this.$emit('focusPrev')
|
||||
break
|
||||
case 'open':
|
||||
this.openDetail(this.message.status)
|
||||
break
|
||||
case 'profile':
|
||||
this.openUser(this.message.account)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue