mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 03:14:40 +03: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, {
|
||||
objectClass: chunter.class.DirectMessage,
|
||||
skip: [{ _class: core.class.TxMixin }, { _class: core.class.TxCreateDoc }, { _class: core.class.TxRemoveDoc }],
|
||||
allowedFields: ['members']
|
||||
skip: [
|
||||
{ _class: core.class.TxMixin },
|
||||
{ _class: core.class.TxCreateDoc },
|
||||
{ _class: core.class.TxRemoveDoc },
|
||||
{ _class: core.class.TxUpdateDoc }
|
||||
]
|
||||
})
|
||||
|
||||
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, {
|
||||
presenter: chunter.component.ChatMessagePreview
|
||||
})
|
||||
|
@ -351,6 +351,17 @@ export const chunterOperation: MigrateOperation = {
|
||||
func: async (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">
|
||||
{#if count != null && count > 0}
|
||||
<div class="antiHSpacer" />
|
||||
<NotifyMarker {count} />
|
||||
<div class="notify">
|
||||
<NotifyMarker {count} />
|
||||
</div>
|
||||
<div class="antiHSpacer" />
|
||||
{:else if secondaryNotifyMarker}
|
||||
<div class="antiHSpacer" />
|
||||
<NotifyMarker count={0} kind="with-dot" />
|
||||
<div class="notify">
|
||||
<NotifyMarker count={0} kind="simple" size="xx-small" />
|
||||
</div>
|
||||
<div class="antiHSpacer" />
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
@ -126,4 +130,12 @@
|
||||
background-color: var(--global-ui-highlight-BackgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
.notify {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
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'
|
||||
|
||||
const maxNumber = 9
|
||||
@ -34,10 +34,6 @@
|
||||
<div class="notifyMarker {size} {kind}" />
|
||||
{/if}
|
||||
|
||||
{#if kind === 'with-dot'}
|
||||
<div class="notifyMarker {size} {kind}">●</div>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
.notifyMarker {
|
||||
display: flex;
|
||||
@ -48,7 +44,6 @@
|
||||
font-weight: 700;
|
||||
|
||||
&.simple,
|
||||
&.with-dot,
|
||||
&.primary {
|
||||
background-color: var(--global-higlight-Color);
|
||||
color: var(--global-on-accent-TextColor);
|
||||
@ -75,10 +70,5 @@
|
||||
height: 1.25rem;
|
||||
font-size: 0.625rem;
|
||||
}
|
||||
|
||||
&.with-dot {
|
||||
font-weight: 400;
|
||||
font-size: 0.25rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user