added "open in thread view" status button for chat view
This commit is contained in:
parent
0482ec2da2
commit
34b60efede
5 changed files with 27 additions and 1 deletions
|
|
@ -108,6 +108,7 @@
|
|||
fixed-pinned
|
||||
use-default-buttons
|
||||
hide-labels
|
||||
in-chat-view
|
||||
@toggle-replying="$emit('replyRequested', message)"
|
||||
/>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import {
|
|||
faChevronDown,
|
||||
faChevronRight,
|
||||
faComments,
|
||||
faList,
|
||||
faExternalLinkAlt,
|
||||
faEye,
|
||||
faEyeSlash,
|
||||
|
|
@ -58,6 +59,7 @@ library.add(
|
|||
faPencil,
|
||||
faShareAlt,
|
||||
faComments,
|
||||
faList,
|
||||
faExternalLinkAlt,
|
||||
faHistory,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -222,13 +222,30 @@ export const BUTTONS = [
|
|||
// =========
|
||||
// OPEN IN CHAT VIEW
|
||||
// =========
|
||||
name: 'edit',
|
||||
name: 'chat_view',
|
||||
icon: 'comments',
|
||||
label: 'status.open_in_chat_view',
|
||||
if({ chatView }) {
|
||||
return !chatView
|
||||
},
|
||||
action({ router, status }) {
|
||||
router.push({ name: 'conversation2', params: { statusId: status.id } })
|
||||
},
|
||||
},
|
||||
{
|
||||
// =========
|
||||
// OPEN IN THREAD VIEW
|
||||
// =========
|
||||
name: 'thread_view',
|
||||
icon: 'list',
|
||||
label: 'status.open_in_thread_view',
|
||||
if({ chatView }) {
|
||||
return chatView
|
||||
},
|
||||
action({ router, status }) {
|
||||
router.push({ name: 'conversation', params: { id: status.id } })
|
||||
},
|
||||
},
|
||||
{
|
||||
// =========
|
||||
// DELETE
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ const StatusActionButtons = {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
inChatView: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['toggleReplying', 'onSuccess', 'onError'],
|
||||
data() {
|
||||
|
|
@ -98,6 +102,7 @@ const StatusActionButtons = {
|
|||
router: this.$router,
|
||||
currentUser: this.currentUser,
|
||||
loggedIn: !!this.currentUser,
|
||||
chatView: !!this.inChatView,
|
||||
}
|
||||
},
|
||||
triggerAttrs() {
|
||||
|
|
|
|||
|
|
@ -1648,6 +1648,7 @@
|
|||
"edit": "Edit status",
|
||||
"edited_at": "(last edited {time})",
|
||||
"open_in_chat_view": "Open in chat view",
|
||||
"open_in_thread_view": "Open in thread view",
|
||||
"pin": "Pin on profile",
|
||||
"unpin": "Unpin from profile",
|
||||
"pinned": "Pinned",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue