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