Fix Activity layout (#351) (#352)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Andrey Sobolev 2021-11-24 02:01:13 +07:00 committed by GitHub
parent 2faf60d74e
commit 55d7a85006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 1082 additions and 1076 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -159,6 +159,14 @@ table {
&:hover .icon { color: var(--theme-caption-color); } &:hover .icon { color: var(--theme-caption-color); }
} }
/* Tables */
// .activity-table > tr:last-child > .no-icon-cell {
// min-height: auto;
// height: auto;
// &::after { content: none; }
// }
/* Margins & Paddings */
.step-lr75 + .step-lr75 { margin-left: .75rem; } .step-lr75 + .step-lr75 { margin-left: .75rem; }
.step-tb75 + .step-tb75 { margin-top: .75rem; } .step-tb75 + .step-tb75 { margin-top: .75rem; }

View File

@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
--> -->
<script lang="ts"> <script lang="ts">
import activity, { TxViewlet } from '@anticrm/activity' import activity, { TxViewlet } from '@anticrm/activity'
import chunter from '@anticrm/chunter' import chunter from '@anticrm/chunter'
@ -181,16 +182,5 @@
padding: 1.5rem 2.5rem; padding: 1.5rem 2.5rem;
height: max-content; height: max-content;
} }
.activity {
background-color: var(--theme-bg-accent-color);
&.header {
border-bottom: none;
}
&.content {
flex-grow: 1;
padding-bottom: 0;
background-color: var(--theme-bg-accent-color);
}
}
} }
</style> </style>

View File

@ -127,30 +127,32 @@
</div> </div>
</div> </div>
<div class="flex-grow label"> <div class="flex-grow label">
<b> <div class="bold">
{#if employee} {#if employee}
{formatName(employee.name)} {formatName(employee.name)}
{:else} {:else}
No employee No employee
{/if} {/if}
</b> </div>
{#if viewlet && viewlet.label} {#if viewlet && viewlet.label}
<Label label={viewlet.label} /> <div><Label label={viewlet.label} /></div>
{/if} {/if}
{#if viewlet === undefined && model.length > 0 && utx} {#if viewlet === undefined && model.length > 0 && utx}
{#each model as m} {#each model as m}
changed {m.label} to <span>changed {m.label} to</span>
<strong><svelte:component this={m.presenter} value={getValue(utx, m.key)} /></strong> <div class="strong"><svelte:component this={m.presenter} value={getValue(utx, m.key)} /></div>
{/each} {/each}
{:else if viewlet && viewlet.display === 'inline' && viewlet.component} {:else if viewlet && viewlet.display === 'inline' && viewlet.component}
{#if typeof viewlet.component === 'string'} <div>
<Component is={viewlet.component} {props} /> {#if typeof viewlet.component === 'string'}
{:else} <Component is={viewlet.component} {props} />
<svelte:component this={viewlet.component} {...props} /> {:else}
{/if} <svelte:component this={viewlet.component} {...props} />
{/if}
</div>
{/if} {/if}
</div> </div>
<div class="content-trans-color"><TimeSince value={tx.modifiedOn} /></div> <div class="time"><TimeSince value={tx.modifiedOn} /></div>
</div> </div>
{#if viewlet && viewlet.component && viewlet.display !== 'inline'} {#if viewlet && viewlet.component && viewlet.display !== 'inline'}
<div class="content" class:emphasize={viewlet.display === 'emphasized'}> <div class="content" class:emphasize={viewlet.display === 'emphasized'}>
@ -167,29 +169,32 @@
<style lang="scss"> <style lang="scss">
.msgactivity-container { .msgactivity-container {
position: relative; position: relative;
&::after { &::after,
content: ''; &::before {
position: absolute; position: absolute;
top: 2.25rem;
left: 1.125rem; left: 1.125rem;
bottom: 0;
width: 1px; width: 1px;
background-color: var(--theme-card-divider); background-color: var(--theme-card-divider);
} }
&::before {
top: -1.5rem;
height: 1.5rem;
}
&::after {
content: '';
top: 2.25rem;
bottom: 0;
}
} }
:global(.msgactivity-container + .msgactivity-container::before) { :global(.msgactivity-container + .msgactivity-container::before) {
content: ''; content: '';
position: absolute;
top: -1.5rem;
left: 1.125rem;
height: 1.5rem;
width: 1px;
background-color: var(--theme-card-divider);
} }
// :global(.msgactivity-container > *:last-child::after) { content: none; }
.icon { .icon {
flex-shrink: 0; flex-shrink: 0;
align-self: flex-start; align-self: flex-start;
margin-right: 1rem;
width: 2.25rem; width: 2.25rem;
height: 2.25rem; height: 2.25rem;
color: var(--theme-caption-color); color: var(--theme-caption-color);
@ -206,14 +211,27 @@
border-radius: 0.75rem; border-radius: 0.75rem;
padding: 1rem; padding: 1rem;
} }
.time {
margin-left: 1rem;
color: var(--theme-content-trans-color);
}
.label { .label {
margin: 0 1rem; display: flex;
align-items: center;
flex-wrap: wrap;
b { & > * {
margin-right: 0.5rem;
}
& > *:last-child {
margin-right: 0;
}
.bold {
font-weight: 500;
color: var(--theme-caption-color); color: var(--theme-caption-color);
} }
strong { .strong {
font-weight: 500; font-weight: 500;
color: var(--theme-content-accent-color); color: var(--theme-content-accent-color);
} }

View File

@ -31,25 +31,18 @@
</script> </script>
{#if tx.operations.state} {#if tx.operations.state}
updated State to <div class="flex-row-center update-container">
{#if statePresenter?.presenter} <span>updated State to</span>
{#await client.findOne(core.class.State, { _id: tx.operations.state }) then st} {#if statePresenter?.presenter}
{#if st} {#await client.findOne(core.class.State, { _id: tx.operations.state }) then st}
<Component is={statePresenter.presenter} props={{ value: st }}/> {#if st}
{/if} <Component is={statePresenter.presenter} props={{ value: st }}/>
{/await} {/if}
{/if} {/await}
{/if}
</div>
{/if} {/if}
<style lang='scss'> <style lang="scss">
.state { .update-container span { margin-right: .5rem; }
display: flex;
align-items: center;
span {
margin-left: 10px;
margin-right: 10px;
display: flex;
align-items: center;
}
}
</style> </style>

View File

@ -30,14 +30,14 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: .375rem 1rem; padding: .25rem .75rem;
width: min-content; width: fit-content;
text-transform: uppercase; text-transform: uppercase;
font-weight: 500; font-weight: 500;
letter-spacing: .5px; letter-spacing: .5px;
font-size: .625rem; font-size: .625rem;
color: #fff; color: #fff;
border: 1px solid rgba(0, 0, 0, .1); border: 1px solid rgba(0, 0, 0, .1);
border-radius: .5rem; border-radius: .25rem;
} }
</style> </style>

File diff suppressed because it is too large Load Diff