Merge pull request #334 from hcengineering/fix-activity-view

Fix activity view
This commit is contained in:
Andrey Sobolev 2021-11-22 17:23:11 +07:00 committed by GitHub
commit a520705763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@
</script> </script>
{#if displayTx && (viewlet !== undefined || model.length > 0)} {#if displayTx && (viewlet !== undefined || model.length > 0)}
<div class="flex-col msg-container"> <div class="flex-col msgactivity-container">
<div class="flex-between"> <div class="flex-between">
<div class="flex-center icon"> <div class="flex-center icon">
<div class="scale-75"> <div class="scale-75">
@ -89,7 +89,7 @@
{/if} {/if}
</div> </div>
</div> </div>
<div class="flex flex-grow label"> <div class="flex-grow label">
<b> <b>
{#if employee} {#if employee}
{formatName(employee.name)} {formatName(employee.name)}
@ -102,12 +102,8 @@
{/if} {/if}
{#if viewlet === undefined && model.length > 0 && utx} {#if viewlet === undefined && model.length > 0 && utx}
{#each model as m} {#each model as m}
<div class='change'> changed {m.label} to
changed {m.label} to <strong><svelte:component this={m.presenter} value={getValue(utx, m.key)}/></strong>
<div class='value'>
<svelte:component this={m.presenter} value={getValue(utx, m.key)}/>
</div>
</div>
{/each} {/each}
{:else if viewlet && viewlet.display === 'inline' && viewlet.component} {:else if viewlet && viewlet.display === 'inline' && viewlet.component}
<Component is={viewlet.component} props={{ tx: displayTx }} /> <Component is={viewlet.component} props={{ tx: displayTx }} />
@ -123,18 +119,7 @@
</div> </div>
{/if} {/if}
<style lang="scss"> <style lang="scss">
.change { .msgactivity-container {
display: inline-flex;
align-items: center;
gap: 10px;
.value {
gap: 10px;
display: flex;
align-items: center;
font-weight: 500;
}
}
.msg-container {
position: relative; position: relative;
&::after { &::after {
content: ''; content: '';
@ -146,7 +131,7 @@
background-color: var(--theme-card-divider); background-color: var(--theme-card-divider);
} }
} }
:global(.msg-container + .msg-container::before) { :global(.msgactivity-container + .msgactivity-container::before) {
content: ''; content: '';
position: absolute; position: absolute;
top: -1.5rem; top: -1.5rem;
@ -177,11 +162,12 @@
} }
.label { .label {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
margin: 0 1rem; margin: 0 1rem;
b { color: var(--theme-caption-color); } b { color: var(--theme-caption-color); }
strong {
font-weight: 500;
color: var(--theme-content-accent-color);
}
} }
</style> </style>