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