mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-03 17:05:16 +03:00
UBER-379 Align comment right after title. (#3360)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
34147e980f
commit
7391ce1c44
@ -538,6 +538,8 @@ export function createModel (builder: Builder): void {
|
||||
props: {},
|
||||
displayProps: { key: 'title' }
|
||||
},
|
||||
{ key: 'comments', displayProps: { key: 'comments' } },
|
||||
{ key: 'attachments', displayProps: { key: 'attachments' } },
|
||||
{ key: '', label: tracker.string.SubIssues, presenter: tracker.component.SubIssuesSelector, props: {} },
|
||||
{
|
||||
key: 'labels',
|
||||
@ -545,14 +547,22 @@ export function createModel (builder: Builder): void {
|
||||
displayProps: { optional: true, compression: true },
|
||||
props: { kind: 'list', full: false }
|
||||
},
|
||||
{ key: 'attachments', displayProps: { key: 'attachments', optional: true } },
|
||||
{ key: 'comments', displayProps: { key: 'comments', optional: true } },
|
||||
{
|
||||
key: '',
|
||||
label: tracker.string.DueDate,
|
||||
presenter: tracker.component.DueDatePresenter,
|
||||
displayProps: { key: 'dueDate', optional: true, compression: true },
|
||||
props: { kind: 'list' }
|
||||
label: tracker.string.Milestone,
|
||||
presenter: tracker.component.MilestoneEditor,
|
||||
props: {
|
||||
kind: 'list',
|
||||
size: 'small',
|
||||
shape: 'round',
|
||||
shouldShowPlaceholder: false
|
||||
},
|
||||
displayProps: {
|
||||
key: 'milestone',
|
||||
excludeByKey: 'milestone',
|
||||
compression: true,
|
||||
optional: true
|
||||
}
|
||||
},
|
||||
{
|
||||
key: '',
|
||||
@ -573,20 +583,10 @@ export function createModel (builder: Builder): void {
|
||||
},
|
||||
{
|
||||
key: '',
|
||||
label: tracker.string.Milestone,
|
||||
presenter: tracker.component.MilestoneEditor,
|
||||
props: {
|
||||
kind: 'list',
|
||||
size: 'small',
|
||||
shape: 'round',
|
||||
shouldShowPlaceholder: false
|
||||
},
|
||||
displayProps: {
|
||||
key: 'milestone',
|
||||
excludeByKey: 'milestone',
|
||||
compression: true,
|
||||
optional: true
|
||||
}
|
||||
label: tracker.string.DueDate,
|
||||
presenter: tracker.component.DueDatePresenter,
|
||||
displayProps: { key: 'dueDate', optional: true, compression: true },
|
||||
props: { kind: 'list' }
|
||||
},
|
||||
{ key: '', displayProps: { grow: true } },
|
||||
{
|
||||
|
@ -14,7 +14,9 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
import { ButtonSize } from '../../types'
|
||||
|
||||
export let size: ButtonSize
|
||||
export let fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
import { ButtonSize } from '../../types'
|
||||
|
||||
export let size: ButtonSize
|
||||
const fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
|
@ -15,30 +15,50 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { Doc } from '@hcengineering/core'
|
||||
import { IconAttachment, tooltip } from '@hcengineering/ui'
|
||||
import { Button, ButtonKind, ButtonSize, IconAttachment, tooltip } from '@hcengineering/ui'
|
||||
import { DocNavLink } from '@hcengineering/view-resources'
|
||||
import AttachmentPopup from './AttachmentPopup.svelte'
|
||||
|
||||
export let value: number | undefined
|
||||
export let object: Doc
|
||||
export let size: 'small' | 'medium' | 'large' = 'small'
|
||||
export let size: ButtonSize = 'small'
|
||||
export let kind: ButtonKind = 'link'
|
||||
export let showCounter = true
|
||||
</script>
|
||||
|
||||
{#if value && value > 0}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<DocNavLink {object} inline noUnderline={true}>
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: AttachmentPopup,
|
||||
props: { objectId: object._id, attachments: value, object }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
<span class="icon"><IconAttachment {size} /></span>
|
||||
{#if showCounter}
|
||||
{value}
|
||||
{/if}
|
||||
</div>
|
||||
{#if kind === 'list'}
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: AttachmentPopup,
|
||||
props: { objectId: object._id, attachments: value, object }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
<Button {kind} {size}>
|
||||
<div slot="content" class="flex-row-center">
|
||||
<span class="icon"><IconAttachment {size} /></span>
|
||||
{#if showCounter}
|
||||
{value}
|
||||
{/if}
|
||||
</div></Button
|
||||
>
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: AttachmentPopup,
|
||||
props: { objectId: object._id, attachments: value, object }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
<span class="icon"><IconAttachment {size} /></span>
|
||||
{#if showCounter}
|
||||
{value}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</DocNavLink>
|
||||
{/if}
|
||||
|
@ -15,13 +15,14 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { Doc } from '@hcengineering/core'
|
||||
import { IconThread, tooltip } from '@hcengineering/ui'
|
||||
import { Button, ButtonKind, ButtonSize, IconThread, tooltip } from '@hcengineering/ui'
|
||||
import { DocNavLink } from '@hcengineering/view-resources'
|
||||
import CommentPopup from './CommentPopup.svelte'
|
||||
|
||||
export let value: number | undefined
|
||||
export let object: Doc
|
||||
export let size: 'small' | 'medium' | 'large' = 'small'
|
||||
export let size: ButtonSize = 'small'
|
||||
export let kind: ButtonKind = 'link'
|
||||
export let showCounter = true
|
||||
export let withInput: boolean = true
|
||||
</script>
|
||||
@ -29,17 +30,36 @@
|
||||
{#if (value && value > 0) || withInput}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<DocNavLink {object} inline noUnderline={true}>
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: CommentPopup,
|
||||
props: { objectId: object._id, object, withInput }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
<span class="icon"><IconThread {size} /></span>
|
||||
{#if showCounter && value && value !== 0}
|
||||
{value}
|
||||
{/if}
|
||||
</div>
|
||||
{#if kind === 'list'}
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: CommentPopup,
|
||||
props: { objectId: object._id, object, withInput }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
<Button {kind} {size}>
|
||||
<div slot="content" class="flex-row-center">
|
||||
<span class="icon"><IconThread size={'x-small'} /></span>
|
||||
{#if showCounter}
|
||||
{value}
|
||||
{/if}
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: CommentPopup,
|
||||
props: { objectId: object._id, object, withInput }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
<span class="icon"><IconThread {size} /></span>
|
||||
{#if showCounter && value && value !== 0}
|
||||
{value}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</DocNavLink>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user