mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 08:21:08 +00:00
Chat fixes (#6851)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
d6bbe79c88
commit
ab3df02270
@ -221,8 +221,12 @@ export function createModel (builder: Builder): void {
|
|||||||
|
|
||||||
builder.createDoc<ActivityMessageControl<ChunterSpace>>(activity.class.ActivityMessageControl, core.space.Model, {
|
builder.createDoc<ActivityMessageControl<ChunterSpace>>(activity.class.ActivityMessageControl, core.space.Model, {
|
||||||
objectClass: chunter.class.DirectMessage,
|
objectClass: chunter.class.DirectMessage,
|
||||||
skip: [{ _class: core.class.TxMixin }, { _class: core.class.TxCreateDoc }, { _class: core.class.TxRemoveDoc }],
|
skip: [
|
||||||
allowedFields: ['members']
|
{ _class: core.class.TxMixin },
|
||||||
|
{ _class: core.class.TxCreateDoc },
|
||||||
|
{ _class: core.class.TxRemoveDoc },
|
||||||
|
{ _class: core.class.TxUpdateDoc }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
builder.createDoc(activity.class.DocUpdateMessageViewlet, core.space.Model, {
|
builder.createDoc(activity.class.DocUpdateMessageViewlet, core.space.Model, {
|
||||||
@ -241,16 +245,6 @@ export function createModel (builder: Builder): void {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
builder.createDoc(activity.class.DocUpdateMessageViewlet, core.space.Model, {
|
|
||||||
objectClass: chunter.class.DirectMessage,
|
|
||||||
action: 'update',
|
|
||||||
config: {
|
|
||||||
members: {
|
|
||||||
presenter: chunter.activity.MembersChangedMessage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
builder.mixin(chunter.class.ChatMessage, core.class.Class, activity.mixin.ActivityMessagePreview, {
|
builder.mixin(chunter.class.ChatMessage, core.class.Class, activity.mixin.ActivityMessagePreview, {
|
||||||
presenter: chunter.component.ChatMessagePreview
|
presenter: chunter.component.ChatMessagePreview
|
||||||
})
|
})
|
||||||
|
@ -351,6 +351,17 @@ export const chunterOperation: MigrateOperation = {
|
|||||||
func: async (client) => {
|
func: async (client) => {
|
||||||
await removeDuplicatedDirects(client)
|
await removeDuplicatedDirects(client)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
state: 'remove-direct-members-messages',
|
||||||
|
func: async (client) => {
|
||||||
|
await client.deleteMany<DocUpdateMessage>(DOMAIN_ACTIVITY, {
|
||||||
|
_class: activity.class.DocUpdateMessage,
|
||||||
|
attachedToClass: chunter.class.DirectMessage,
|
||||||
|
action: 'update',
|
||||||
|
'attributeUpdates.attrKey': 'members'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
@ -98,11 +98,15 @@
|
|||||||
<svelte:fragment slot="notify">
|
<svelte:fragment slot="notify">
|
||||||
{#if count != null && count > 0}
|
{#if count != null && count > 0}
|
||||||
<div class="antiHSpacer" />
|
<div class="antiHSpacer" />
|
||||||
<NotifyMarker {count} />
|
<div class="notify">
|
||||||
|
<NotifyMarker {count} />
|
||||||
|
</div>
|
||||||
<div class="antiHSpacer" />
|
<div class="antiHSpacer" />
|
||||||
{:else if secondaryNotifyMarker}
|
{:else if secondaryNotifyMarker}
|
||||||
<div class="antiHSpacer" />
|
<div class="antiHSpacer" />
|
||||||
<NotifyMarker count={0} kind="with-dot" />
|
<div class="notify">
|
||||||
|
<NotifyMarker count={0} kind="simple" size="xx-small" />
|
||||||
|
</div>
|
||||||
<div class="antiHSpacer" />
|
<div class="antiHSpacer" />
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
@ -126,4 +130,12 @@
|
|||||||
background-color: var(--global-ui-highlight-BackgroundColor);
|
background-color: var(--global-ui-highlight-BackgroundColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notify {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let count: number = 0
|
export let count: number = 0
|
||||||
export let kind: 'primary' | 'simple' | 'with-dot' = 'primary'
|
export let kind: 'primary' | 'simple' = 'primary'
|
||||||
export let size: 'xx-small' | 'x-small' | 'small' | 'medium' = 'small'
|
export let size: 'xx-small' | 'x-small' | 'small' | 'medium' = 'small'
|
||||||
|
|
||||||
const maxNumber = 9
|
const maxNumber = 9
|
||||||
@ -34,10 +34,6 @@
|
|||||||
<div class="notifyMarker {size} {kind}" />
|
<div class="notifyMarker {size} {kind}" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if kind === 'with-dot'}
|
|
||||||
<div class="notifyMarker {size} {kind}">●</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.notifyMarker {
|
.notifyMarker {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -48,7 +44,6 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
||||||
&.simple,
|
&.simple,
|
||||||
&.with-dot,
|
|
||||||
&.primary {
|
&.primary {
|
||||||
background-color: var(--global-higlight-Color);
|
background-color: var(--global-higlight-Color);
|
||||||
color: var(--global-on-accent-TextColor);
|
color: var(--global-on-accent-TextColor);
|
||||||
@ -75,10 +70,5 @@
|
|||||||
height: 1.25rem;
|
height: 1.25rem;
|
||||||
font-size: 0.625rem;
|
font-size: 0.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.with-dot {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 0.25rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user