mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Fixes in the Activity Feed (#2848)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
bdbe7de4f1
commit
85e8ddba72
@ -439,7 +439,7 @@ export function createModel (builder: Builder, options = { addApplication: true
|
||||
icon: chunter.icon.Chunter,
|
||||
txClass: core.class.TxCreateDoc,
|
||||
component: chunter.activity.TxCommentCreate,
|
||||
label: chunter.string.LeftComment,
|
||||
// label: chunter.string.LeftComment,
|
||||
display: 'content',
|
||||
editable: true,
|
||||
hideOnRemove: true
|
||||
|
@ -370,7 +370,7 @@ input.search {
|
||||
min-width: 0;
|
||||
|
||||
& > * {
|
||||
margin-right: 0.5rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
& > *:last-child {
|
||||
margin-right: 0;
|
||||
|
@ -111,6 +111,7 @@ body {
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
font-family: var(--font-family);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: var(--body-font-size);
|
||||
color: var(--content-color);
|
||||
|
@ -56,7 +56,7 @@
|
||||
color: var(--accent-color);
|
||||
opacity: 1;
|
||||
}
|
||||
&:focus {
|
||||
&:focus-visible {
|
||||
border: 1px solid var(--primary-button-focused-border);
|
||||
box-shadow: 0 0 0 3px var(--primary-button-outline);
|
||||
.icon {
|
||||
|
@ -28,8 +28,7 @@
|
||||
Label,
|
||||
ShowMore,
|
||||
showPopup,
|
||||
TimeSince,
|
||||
Like
|
||||
TimeSince
|
||||
} from '@hcengineering/ui'
|
||||
import type { AttributeModel } from '@hcengineering/view'
|
||||
import { Menu, ObjectPresenter } from '@hcengineering/view-resources'
|
||||
@ -155,15 +154,9 @@
|
||||
</script>
|
||||
|
||||
{#if (viewlet !== undefined && !((viewlet?.hideOnRemove ?? false) && tx.removed)) || model.length > 0}
|
||||
<div
|
||||
class="msgactivity-container"
|
||||
class:showIcon
|
||||
class:withAvatar={isComment || isMention}
|
||||
class:isNew
|
||||
class:isNextNew
|
||||
>
|
||||
<div class="msgactivity-container" class:showIcon class:withAvatar={isComment} class:isNew class:isNextNew>
|
||||
{#if showIcon}
|
||||
{#if isComment || isMention}
|
||||
{#if isComment}
|
||||
<div class="msgactivity-avatar">
|
||||
<Icon icon={IconProfile} size={'medium'} />
|
||||
</div>
|
||||
@ -192,15 +185,13 @@
|
||||
</span>
|
||||
|
||||
{#if viewlet && viewlet?.editable}
|
||||
<span class="buttons-group small-gap">
|
||||
{#if viewlet.label}
|
||||
<Label label={viewlet.label} params={viewlet.labelParams ?? {}} />
|
||||
{/if}
|
||||
{#if tx.updated}
|
||||
<Label label={activity.string.Edited} />
|
||||
{/if}
|
||||
<span class="time"><TimeSince value={tx.tx.modifiedOn} /></span>
|
||||
</span>
|
||||
{#if viewlet.label}
|
||||
<span class="lower"><Label label={viewlet.label} params={viewlet.labelParams ?? {}} /></span>
|
||||
{/if}
|
||||
{#if tx.updated}
|
||||
<span class="lower"><Label label={activity.string.Edited} /></span>
|
||||
{/if}
|
||||
<span class="time"><TimeSince value={tx.tx.modifiedOn} /></span>
|
||||
{:else if viewlet && viewlet.label}
|
||||
<span class="lower">
|
||||
<Label label={viewlet.label} params={viewlet.labelParams ?? {}} />
|
||||
@ -290,7 +281,7 @@
|
||||
</div>
|
||||
{#if isComment}
|
||||
<div class="buttons-group">
|
||||
<Like />
|
||||
<!-- <Like /> -->
|
||||
{#if tx.tx.modifiedBy === getCurrentAccount()._id}
|
||||
<ActionIcon icon={IconMoreH} size={'small'} action={showMenu} />
|
||||
{/if}
|
||||
@ -305,7 +296,7 @@
|
||||
{/if}
|
||||
|
||||
{#if viewlet && viewlet.display !== 'inline'}
|
||||
<div class="activity-content {viewlet.display}" class:contentHidden>
|
||||
<div class="activity-content content" class:contentHidden>
|
||||
<ShowMore ignore={edit}>
|
||||
{#if tx.collectionAttribute !== undefined && (tx.txDocIds?.size ?? 0) > 1}
|
||||
<div class="flex-row-center flex-grow flex-wrap clear-mins">
|
||||
@ -341,10 +332,6 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
&:hover .time {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.msgactivity-icon,
|
||||
.msgactivity-avatar {
|
||||
display: flex;
|
||||
@ -379,7 +366,7 @@
|
||||
}
|
||||
.msgactivity-content__title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
align-items: baseline;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
@ -387,6 +374,16 @@
|
||||
flex-direction: column;
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
&.comment {
|
||||
.activity-content {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
}
|
||||
&:not(.comment) {
|
||||
.msgactivity-content__header {
|
||||
min-height: 1.75rem;
|
||||
}
|
||||
}
|
||||
&:not(.content) {
|
||||
align-items: center;
|
||||
|
||||
@ -450,14 +447,10 @@
|
||||
.time {
|
||||
font-size: 0.75rem;
|
||||
color: var(--trans-color);
|
||||
opacity: 0.3;
|
||||
|
||||
&.top {
|
||||
align-self: flex-start;
|
||||
}
|
||||
.comment & {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.message {
|
||||
@ -467,7 +460,7 @@
|
||||
.activity-content {
|
||||
overflow: hidden;
|
||||
visibility: visible;
|
||||
margin-top: 0.25rem;
|
||||
margin-top: 0.125rem;
|
||||
max-height: max-content;
|
||||
opacity: 1;
|
||||
transition-property: max-height, opacity;
|
||||
|
@ -1,13 +1,7 @@
|
||||
<!-- !!! Dublicate chunter-assets (cunter, hashtag, lock) !!! -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="chunter" viewBox="0 0 24 24">
|
||||
<path d="M3,21.6c-0.2,0-0.3-0.1-0.4-0.2c-0.2-0.2-0.2-0.4-0.1-0.6l1.8-5.4c-0.6-1.2-0.8-2.5-0.8-3.8c0-3.4,1.9-6.5,4.9-8 c1.2-0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0.3-2.7h2.7L9.4,9.4H6.6z"/>
|
||||
</symbol>
|
||||
<symbol id="lock" viewBox="0 0 16 16">
|
||||
<path d="M12,7.1h-0.7V5.4c0-1.8-1.5-3.3-3.3-3.3c-1.8,0-3.3,1.5-3.3,3.3v1.7H4c-0.8,0-1.5,0.7-1.5,1.5v4.1c0,0.8,0.7,1.5,1.5,1.5h8 c0.8,0,1.5-0.7,1.5-1.5V8.6C13.5,7.8,12.8,7.1,12,7.1z M5.7,5.4c0-1.2,1-2.3,2.3-2.3s2.3,1,2.3,2.3v1.7H5.7V5.4z M12.5,12.7 c0,0.3-0.2,0.5-0.5,0.5H4c-0.3,0-0.5-0.2-0.5-0.5V8.6c0-0.3,0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5V12.7z"/>
|
||||
<symbol id="attachment" viewBox="0 0 16 16">
|
||||
<path d="M12.9,2.1c-1.6-1.7-4.1-1.7-5.7,0L2.1,7.6c-0.3,0.3-0.3,0.7,0,1c0.3,0.3,0.7,0.3,0.9,0l5.1-5.4C9.2,2,10.9,2,12,3.1C13,4.2,13,6,12,7.1l-5.9,6.3c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1.1,0-1.5l5.9-6.3c0.3-0.3,0.3-0.7,0-1c-0.3-0.3-0.7-0.3-0.9,0l-5.9,6.3c-0.9,1-0.9,2.5,0,3.5c0.9,1,2.4,1,3.3,0l5.9-6.3C14.5,6.5,14.5,3.8,12.9,2.1z" />
|
||||
</symbol>
|
||||
<symbol id="fileBrowser" viewBox="0 0 24 24">
|
||||
<path d="M1.7,6.7l10,3.5c0.2,0.1,0.3,0.1,0.5,0l10-3.5c0.3-0.1,0.5-0.4,0.5-0.7s-0.2-0.6-0.5-0.7l-10-3.5 c-0.2-0.1-0.3-0.1-0.5,0l-10,3.5C1.5,5.4,1.3,5.6,1.2,6S1.4,6.6,1.7,6.7z M12,3.3L19.7,6L12,8.7L4.3,6L12,3.3z" />
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.3 KiB |
@ -18,7 +18,7 @@ import attachment, { attachmentId } from '@hcengineering/attachment'
|
||||
|
||||
const icons = require('../assets/icons.svg') as string // eslint-disable-line
|
||||
loadMetadata(attachment.icon, {
|
||||
Attachment: `${icons}#chunter`,
|
||||
Attachment: `${icons}#attachment`,
|
||||
FileBrowser: `${icons}#fileBrowser`
|
||||
})
|
||||
|
||||
|
@ -29,8 +29,7 @@
|
||||
<path d="M9.95479 6.50024H7.0457C6.74445 6.50024 6.50024 6.74445 6.50024 7.0457V9.95479C6.50024 10.256 6.74445 10.5002 7.0457 10.5002H9.95479C10.256 10.5002 10.5002 10.256 10.5002 9.95479V7.0457C10.5002 6.74445 10.256 6.50024 9.95479 6.50024Z"/>
|
||||
</symbol>
|
||||
<symbol id="issue" viewBox="0 0 16 16">
|
||||
<path d="M13.3,8.3c-0.1,2.8-2.5,5.1-5.4,5.1C5,13.4,2.6,11,2.6,8c0-2.9,2.3-5.2,5.1-5.4c0.1-0.4,0.2-0.7,0.4-1c0,0-0.1,0-0.1,0 C4.4,1.7,1.6,4.5,1.6,8c0,3.5,2.9,6.4,6.4,6.4s6.4-2.9,6.4-6.4c0,0,0-0.1,0-0.1C14,8.1,13.7,8.2,13.3,8.3z"/>
|
||||
<ellipse cx="12.1" cy="3.9" rx="2.5" ry="2.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13,1H3C1.9,1,1,1.9,1,3v10c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C15,1.9,14.1,1,13,1z M12.4,6.6l-4.9,4.9c-0.1,0.1-0.2,0.1-0.3,0l-3-3c-0.4-0.4-0.4-1,0-1.3c0.4-0.4,1-0.4,1.3,0l1.8,1.8l3.7-3.7c0.4-0.4,1-0.4,1.3,0C12.8,5.6,12.8,6.2,12.4,6.6z" />
|
||||
</symbol>
|
||||
<symbol id="project" viewBox="0 0 24 24">
|
||||
<path d="M13,1h-2.2H9.4H6.6H5.2H3C1.9,1,1,1.9,1,3v10c0,1.1,0.9,2,2,2h2.2h1.4h2.8h1.4H13c1.1,0,2-0.9,2-2V3C15,1.9,14.1,1,13,1z M3,13.8c-0.4,0-0.8-0.4-0.8-0.8V3c0-0.4,0.4-0.8,0.8-0.8h2.2v11.6H3z M6.6,13.8V2.2h2.8v11.6H6.6z M13.8,13c0,0.4-0.4,0.8-0.8,0.8 h-2.2V2.2H13c0.4,0,0.8,0.4,0.8,0.8V13z"/>
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@ -22,6 +22,7 @@
|
||||
export let shouldShowAvatar = true
|
||||
export let onClick: () => void | undefined
|
||||
export let isInteractive = true
|
||||
export let inline: boolean = false
|
||||
|
||||
function navigateToComponent () {
|
||||
if (!isInteractive) {
|
||||
@ -43,7 +44,7 @@
|
||||
{#if value}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div class="flex" on:click={navigateToComponent}>
|
||||
{#if shouldShowAvatar}
|
||||
{#if !inline && shouldShowAvatar}
|
||||
<div class="mr-2" use:tooltip={{ label: tracker.string.Component }}>
|
||||
<Icon icon={tracker.icon.Component} size={'small'} />
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
||||
{#if value}
|
||||
<DocNavLink object={value} {onClick} {disableClick} {noUnderline} {inline} component={tracker.component.EditIssue}>
|
||||
<span class="issuePresenterRoot" class:inline>
|
||||
{#if shouldShowAvatar}
|
||||
{#if !inline && shouldShowAvatar}
|
||||
<div class="icon" use:tooltip={{ label: tracker.string.Issue }}>
|
||||
<Icon icon={tracker.icon.Issues} size={'small'} />
|
||||
</div>
|
||||
|
@ -19,15 +19,16 @@
|
||||
|
||||
export let value: IssueStatus | undefined
|
||||
export let size: 'small' | 'medium' = 'small'
|
||||
export let inline: boolean = false
|
||||
</script>
|
||||
|
||||
{#if value}
|
||||
{@const icon = $statusStore.byId.get(value._id)?.$lookup?.category?.icon}
|
||||
<div class="flex-presenter">
|
||||
{#if icon}
|
||||
{#if !inline && icon}
|
||||
<IssueStatusIcon {value} {size} />
|
||||
{/if}
|
||||
<span class="overflow-label" class:ml-2={icon !== undefined}>
|
||||
<span class="overflow-label" class:ml-2={!inline && icon !== undefined}>
|
||||
{value.name}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -22,6 +22,7 @@
|
||||
export let shouldShowAvatar: boolean = true
|
||||
export let onClick: () => void | undefined
|
||||
export let isInteractive = true
|
||||
export let inline: boolean = false
|
||||
|
||||
function navigateToSprint () {
|
||||
if (!isInteractive) {
|
||||
@ -42,7 +43,7 @@
|
||||
{#if value}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div class="flex" on:click={navigateToSprint}>
|
||||
{#if shouldShowAvatar}
|
||||
{#if !inline && shouldShowAvatar}
|
||||
<div class="mr-2" use:tooltip={{ label: tracker.string.Sprint }}>
|
||||
<Icon icon={tracker.icon.Sprint} size={'small'} />
|
||||
</div>
|
||||
|
@ -19,9 +19,10 @@
|
||||
import tracker from '../../plugin'
|
||||
|
||||
export let value: WithLookup<IssueTemplate>
|
||||
// export let inline: boolean = false
|
||||
export let disableClick = false
|
||||
export let noUnderline = false
|
||||
export let shouldShowAvatar: boolean = true
|
||||
export let inline: boolean = false
|
||||
|
||||
function handleIssueEditorOpened () {
|
||||
if (disableClick) {
|
||||
@ -36,9 +37,11 @@
|
||||
{#if value}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<span class="issuePresenterRoot" class:noPointer={disableClick} class:noUnderline on:click={handleIssueEditorOpened}>
|
||||
<div class="mr-2" use:tooltip={{ label: tracker.string.IssueTemplate }}>
|
||||
<Icon icon={tracker.icon.Issues} size={'small'} />
|
||||
</div>
|
||||
{#if !inline && shouldShowAvatar}
|
||||
<div class="mr-2" use:tooltip={{ label: tracker.string.IssueTemplate }}>
|
||||
<Icon icon={tracker.icon.Issues} size={'small'} />
|
||||
</div>
|
||||
{/if}
|
||||
<span title={value?.title}>
|
||||
{title}
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user