TSK-1020. Highlighting the subject name only in comments and attachments (#2884)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-04-05 10:04:34 +03:00 committed by GitHub
parent 66a8b32e10
commit b2fe37e540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 22 deletions

View File

@ -369,22 +369,15 @@ input.search {
flex-wrap: wrap; flex-wrap: wrap;
min-width: 0; min-width: 0;
& > * { & > * { margin-right: 0.25rem; }
margin-right: 0.25rem; & > *:last-child { margin-right: 0; }
}
& > *:last-child {
margin-right: 0;
}
.bold { .bold {
font-weight: 500; font-weight: 500;
color: var(--caption-color); color: var(--caption-color);
} }
.strong { .strong { color: var(--accent-color); }
color: var(--accent-color); .lower { text-transform: lowercase; }
}
.lower {
text-transform: lowercase;
}
} }
.gap-1, .gap-1-5 { .gap-1, .gap-1-5 {

View File

@ -130,3 +130,5 @@ body {
// TSK-1026. Experiment, don't forget to delete. // TSK-1026. Experiment, don't forget to delete.
.theme-dark .p-activity .msgactivity-content.comment .msgactivity-content__title.labels-row > .bold, .theme-dark .p-activity .msgactivity-content.comment .msgactivity-content__title.labels-row > .bold,
.theme-dark .p-activity .msgactivity-content.comment .activity-content.content .p-inline { color: rgba(255, 255, 255, .8); } .theme-dark .p-activity .msgactivity-content.comment .activity-content.content .p-inline { color: rgba(255, 255, 255, .8); }
.theme-light .p-activity .msgactivity-content.comment .msgactivity-content__title.labels-row > .bold,
.theme-light .p-activity .msgactivity-content.comment .activity-content.content .p-inline { color: rgba(0, 0, 0, .8); }

View File

@ -186,7 +186,7 @@
<div class="msgactivity-content" class:content={isColumn} class:comment={isComment || isAttach}> <div class="msgactivity-content" class:content={isColumn} class:comment={isComment || isAttach}>
<div class="msgactivity-content__header"> <div class="msgactivity-content__header">
<div class="msgactivity-content__title labels-row"> <div class="msgactivity-content__title labels-row">
<span class="bold"> <span class={isComment || isAttach ? 'bold' : 'strong'}>
{#if employee} {#if employee}
{getName(employee)} {getName(employee)}
{:else} {:else}
@ -201,7 +201,7 @@
{#if tx.updated} {#if tx.updated}
<span class="lower"><Label label={activity.string.Edited} /></span> <span class="lower"><Label label={activity.string.Edited} /></span>
{/if} {/if}
<span class="time"><TimeSince value={tx.tx.modifiedOn} /></span> <span class="time ml-1"><TimeSince value={tx.tx.modifiedOn} /></span>
{:else if viewlet && viewlet.label} {:else if viewlet && viewlet.label}
<span class="lower"> <span class="lower">
<Label label={viewlet.label} params={viewlet.labelParams ?? {}} /> <Label label={viewlet.label} params={viewlet.labelParams ?? {}} />
@ -306,7 +306,7 @@
{/if} {/if}
{#if viewlet && viewlet.display !== 'inline'} {#if viewlet && viewlet.display !== 'inline'}
<div class="activity-content content" class:contentHidden> <div class="activity-content content" class:indent={isAttach} class:contentHidden>
<ShowMore ignore={edit}> <ShowMore ignore={edit}>
{#if tx.collectionAttribute !== undefined && (tx.txDocIds?.size ?? 0) > 1} {#if tx.collectionAttribute !== undefined && (tx.txDocIds?.size ?? 0) > 1}
<div class="flex-row-center flex-grow flex-wrap clear-mins"> <div class="flex-row-center flex-grow flex-wrap clear-mins">
@ -321,7 +321,7 @@
</div> </div>
{:else if hasMessageType && model.length > 0 && (tx.updateTx || tx.mixinTx)} {:else if hasMessageType && model.length > 0 && (tx.updateTx || tx.mixinTx)}
{#await getValue(client, model[0], tx) then value} {#await getValue(client, model[0], tx) then value}
<div class="activity-content content" class:contentHidden> <div class="activity-content content" class:indent={isAttach} class:contentHidden>
<ShowMore ignore={edit}> <ShowMore ignore={edit}>
{#if value.isObjectSet} {#if value.isObjectSet}
<ObjectPresenter value={value.set} inline /> <ObjectPresenter value={value.set} inline />
@ -384,11 +384,6 @@
flex-direction: column; flex-direction: column;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
} }
&.comment {
.activity-content {
margin-top: 0.25rem;
}
}
&:not(.comment) { &:not(.comment) {
.msgactivity-content__header { .msgactivity-content__header {
min-height: 1.75rem; min-height: 1.75rem;
@ -470,7 +465,6 @@
.activity-content { .activity-content {
overflow: hidden; overflow: hidden;
visibility: visible; visibility: visible;
margin-top: 0.125rem;
max-height: max-content; max-height: max-content;
opacity: 1; opacity: 1;
transition-property: max-height, opacity; transition-property: max-height, opacity;
@ -484,5 +478,8 @@
max-height: 0; max-height: 0;
opacity: 0; opacity: 0;
} }
&.indent {
margin-top: 0.5rem;
}
} }
</style> </style>