mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
Fix chat actions labels (#6474)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
4b07b31126
commit
a16b0a64d7
@ -169,7 +169,7 @@ export function defineActions (builder: Builder): void {
|
|||||||
icon: view.icon.EyeCrossed,
|
icon: view.icon.EyeCrossed,
|
||||||
label: view.string.Hide,
|
label: view.string.Hide,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: { $nin: [chunter.class.DirectMessage, chunter.class.Channel] }
|
objectClass: { $nin: [chunter.class.DirectMessage, chunter.class.Channel] }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chunter.action.RemoveChannel
|
chunter.action.RemoveChannel
|
||||||
@ -181,7 +181,7 @@ export function defineActions (builder: Builder): void {
|
|||||||
...actionTemplates.removeChannel,
|
...actionTemplates.removeChannel,
|
||||||
label: chunter.string.CloseConversation,
|
label: chunter.string.CloseConversation,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: chunter.class.DirectMessage
|
objectClass: chunter.class.DirectMessage
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chunter.action.CloseConversation
|
chunter.action.CloseConversation
|
||||||
@ -194,7 +194,7 @@ export function defineActions (builder: Builder): void {
|
|||||||
action: chunter.actionImpl.LeaveChannel,
|
action: chunter.actionImpl.LeaveChannel,
|
||||||
label: chunter.string.LeaveChannel,
|
label: chunter.string.LeaveChannel,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: chunter.class.Channel
|
objectClass: chunter.class.Channel
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chunter.action.LeaveChannel
|
chunter.action.LeaveChannel
|
||||||
@ -204,7 +204,7 @@ export function defineActions (builder: Builder): void {
|
|||||||
...notificationActionTemplates.pinContext,
|
...notificationActionTemplates.pinContext,
|
||||||
label: chunter.string.StarChannel,
|
label: chunter.string.StarChannel,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: chunter.class.Channel
|
objectClass: chunter.class.Channel
|
||||||
},
|
},
|
||||||
override: [notification.action.PinDocNotifyContext]
|
override: [notification.action.PinDocNotifyContext]
|
||||||
})
|
})
|
||||||
@ -213,7 +213,7 @@ export function defineActions (builder: Builder): void {
|
|||||||
...notificationActionTemplates.unpinContext,
|
...notificationActionTemplates.unpinContext,
|
||||||
label: chunter.string.UnstarChannel,
|
label: chunter.string.UnstarChannel,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: chunter.class.Channel
|
objectClass: chunter.class.Channel
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ export function defineActions (builder: Builder): void {
|
|||||||
...notificationActionTemplates.pinContext,
|
...notificationActionTemplates.pinContext,
|
||||||
label: chunter.string.StarConversation,
|
label: chunter.string.StarConversation,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: chunter.class.DirectMessage
|
objectClass: chunter.class.DirectMessage
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -229,21 +229,21 @@ export function defineActions (builder: Builder): void {
|
|||||||
...notificationActionTemplates.unpinContext,
|
...notificationActionTemplates.unpinContext,
|
||||||
label: chunter.string.UnstarConversation,
|
label: chunter.string.UnstarConversation,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: chunter.class.DirectMessage
|
objectClass: chunter.class.DirectMessage
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
createAction(builder, {
|
createAction(builder, {
|
||||||
...notificationActionTemplates.pinContext,
|
...notificationActionTemplates.pinContext,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: { $nin: [chunter.class.DirectMessage, chunter.class.Channel] }
|
objectClass: { $nin: [chunter.class.DirectMessage, chunter.class.Channel] }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
createAction(builder, {
|
createAction(builder, {
|
||||||
...notificationActionTemplates.unpinContext,
|
...notificationActionTemplates.unpinContext,
|
||||||
query: {
|
query: {
|
||||||
attachedToClass: { $nin: [chunter.class.DirectMessage, chunter.class.Channel] }
|
objectClass: { $nin: [chunter.class.DirectMessage, chunter.class.Channel] }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
justify={'left'}
|
justify={'left'}
|
||||||
size={'x-large'}
|
size={'x-large'}
|
||||||
on:click={(evt) => {
|
on:click={(evt) => {
|
||||||
ArchiveChannel(channel, evt, () => dispatch('close'))
|
ArchiveChannel(channel, evt, { afterArchive: () => dispatch('close') })
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -79,7 +79,7 @@ export { default as ChatMessagesPresenter } from './components/chat-message/Chat
|
|||||||
export { default as Header } from './components/Header.svelte'
|
export { default as Header } from './components/Header.svelte'
|
||||||
export { default as ThreadView } from './components/threads/ThreadView.svelte'
|
export { default as ThreadView } from './components/threads/ThreadView.svelte'
|
||||||
|
|
||||||
export async function ArchiveChannel (channel: Channel, evt: any, afterArchive?: () => void): Promise<void> {
|
export async function ArchiveChannel (channel: Channel, evt: any, props?: { afterArchive?: () => void }): Promise<void> {
|
||||||
showPopup(MessageBox, {
|
showPopup(MessageBox, {
|
||||||
label: chunter.string.ArchiveChannel,
|
label: chunter.string.ArchiveChannel,
|
||||||
message: chunter.string.ArchiveConfirm,
|
message: chunter.string.ArchiveConfirm,
|
||||||
@ -88,7 +88,7 @@ export async function ArchiveChannel (channel: Channel, evt: any, afterArchive?:
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
await client.update(channel, { archived: true })
|
await client.update(channel, { archived: true })
|
||||||
if (afterArchive != null) afterArchive()
|
if (props?.afterArchive != null) props.afterArchive()
|
||||||
|
|
||||||
const loc = getLocation()
|
const loc = getLocation()
|
||||||
if (loc.path[3] === channel._id) {
|
if (loc.path[3] === channel._id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user