mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
parent
e87b7fd27f
commit
50b6fa1877
@ -82,7 +82,7 @@
|
||||
|
||||
$: if (editableMap) updateTxes(object)
|
||||
|
||||
$: newTxPos = newTx(txes, $lastViews)
|
||||
$: newTxPos = newTx(txesF, $lastViews)
|
||||
|
||||
function newTx (txes: DisplayTx[], lastViews: Map<Ref<Doc>, number> | undefined): number {
|
||||
const lastView = lastViews?.get(object._id)
|
||||
@ -129,7 +129,12 @@
|
||||
{#if txesF}
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
{#each txesF as tx, i}
|
||||
<TxView {tx} {viewlets} isNew={newTxPos === i} />
|
||||
<TxView
|
||||
{tx}
|
||||
{viewlets}
|
||||
isNew={newTxPos <= i && newTxPos !== -1}
|
||||
isNextNew={newTxPos < i && newTxPos !== -1}
|
||||
/>
|
||||
{/each}
|
||||
</Grid>
|
||||
{/if}
|
||||
@ -166,7 +171,12 @@
|
||||
{#if txesF}
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
{#each txesF as tx, i}
|
||||
<TxView {tx} {viewlets} isNew={newTxPos === i} />
|
||||
<TxView
|
||||
{tx}
|
||||
{viewlets}
|
||||
isNew={newTxPos <= i && newTxPos !== -1}
|
||||
isNextNew={newTxPos < i && newTxPos !== -1}
|
||||
/>
|
||||
{/each}
|
||||
</Grid>
|
||||
{/if}
|
||||
|
@ -42,6 +42,7 @@
|
||||
export let viewlets: Map<ActivityKey, TxViewlet>
|
||||
export let showIcon: boolean = true
|
||||
export let isNew: boolean = false
|
||||
export let isNextNew: boolean = false
|
||||
// export let showDocument = false
|
||||
|
||||
let ptx: DisplayTx | undefined
|
||||
@ -141,7 +142,7 @@
|
||||
</script>
|
||||
|
||||
{#if (viewlet !== undefined && !((viewlet?.hideOnRemove ?? false) && tx.removed)) || model.length > 0}
|
||||
<div class="flex-between msgactivity-container" class:showIcon>
|
||||
<div class="flex-between msgactivity-container" class:showIcon class:isNew class:isNextNew>
|
||||
{#if showIcon}
|
||||
<div class="flex-center icon">
|
||||
{#if viewlet}
|
||||
@ -156,7 +157,6 @@
|
||||
|
||||
<div
|
||||
class="flex-grow flex-col clear-mins"
|
||||
class:isNew
|
||||
class:comment={viewlet && viewlet?.editable}
|
||||
class:mention={viewlet?.display === 'emphasized' || isMessageType(model[0]?.attribute)}
|
||||
>
|
||||
@ -351,11 +351,6 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.isNew {
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid var(--highlight-red);
|
||||
}
|
||||
|
||||
.showIcon {
|
||||
&::after,
|
||||
&::before {
|
||||
@ -364,6 +359,19 @@
|
||||
width: 1px;
|
||||
background-color: var(--popup-divider);
|
||||
}
|
||||
&.isNew {
|
||||
&::before {
|
||||
background-color: var(--highlight-red);
|
||||
}
|
||||
.icon {
|
||||
border: 1px solid var(--highlight-red);
|
||||
}
|
||||
&.isNextNew {
|
||||
&:after {
|
||||
background-color: var(--highlight-red);
|
||||
}
|
||||
}
|
||||
}
|
||||
&::before {
|
||||
top: -1.5rem;
|
||||
height: 1.5rem;
|
||||
|
Loading…
Reference in New Issue
Block a user