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: {},
|
props: {},
|
||||||
displayProps: { key: 'title' }
|
displayProps: { key: 'title' }
|
||||||
},
|
},
|
||||||
|
{ key: 'comments', displayProps: { key: 'comments' } },
|
||||||
|
{ key: 'attachments', displayProps: { key: 'attachments' } },
|
||||||
{ key: '', label: tracker.string.SubIssues, presenter: tracker.component.SubIssuesSelector, props: {} },
|
{ key: '', label: tracker.string.SubIssues, presenter: tracker.component.SubIssuesSelector, props: {} },
|
||||||
{
|
{
|
||||||
key: 'labels',
|
key: 'labels',
|
||||||
@ -545,14 +547,22 @@ export function createModel (builder: Builder): void {
|
|||||||
displayProps: { optional: true, compression: true },
|
displayProps: { optional: true, compression: true },
|
||||||
props: { kind: 'list', full: false }
|
props: { kind: 'list', full: false }
|
||||||
},
|
},
|
||||||
{ key: 'attachments', displayProps: { key: 'attachments', optional: true } },
|
|
||||||
{ key: 'comments', displayProps: { key: 'comments', optional: true } },
|
|
||||||
{
|
{
|
||||||
key: '',
|
key: '',
|
||||||
label: tracker.string.DueDate,
|
label: tracker.string.Milestone,
|
||||||
presenter: tracker.component.DueDatePresenter,
|
presenter: tracker.component.MilestoneEditor,
|
||||||
displayProps: { key: 'dueDate', optional: true, compression: true },
|
props: {
|
||||||
props: { kind: 'list' }
|
kind: 'list',
|
||||||
|
size: 'small',
|
||||||
|
shape: 'round',
|
||||||
|
shouldShowPlaceholder: false
|
||||||
|
},
|
||||||
|
displayProps: {
|
||||||
|
key: 'milestone',
|
||||||
|
excludeByKey: 'milestone',
|
||||||
|
compression: true,
|
||||||
|
optional: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '',
|
key: '',
|
||||||
@ -573,20 +583,10 @@ export function createModel (builder: Builder): void {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '',
|
key: '',
|
||||||
label: tracker.string.Milestone,
|
label: tracker.string.DueDate,
|
||||||
presenter: tracker.component.MilestoneEditor,
|
presenter: tracker.component.DueDatePresenter,
|
||||||
props: {
|
displayProps: { key: 'dueDate', optional: true, compression: true },
|
||||||
kind: 'list',
|
props: { kind: 'list' }
|
||||||
size: 'small',
|
|
||||||
shape: 'round',
|
|
||||||
shouldShowPlaceholder: false
|
|
||||||
},
|
|
||||||
displayProps: {
|
|
||||||
key: 'milestone',
|
|
||||||
excludeByKey: 'milestone',
|
|
||||||
compression: true,
|
|
||||||
optional: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ key: '', displayProps: { grow: true } },
|
{ key: '', displayProps: { grow: true } },
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let size: 'small' | 'medium' | 'large'
|
import { ButtonSize } from '../../types'
|
||||||
|
|
||||||
|
export let size: ButtonSize
|
||||||
export let fill: string = 'currentColor'
|
export let fill: string = 'currentColor'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let size: 'small' | 'medium' | 'large'
|
import { ButtonSize } from '../../types'
|
||||||
|
|
||||||
|
export let size: ButtonSize
|
||||||
const fill: string = 'currentColor'
|
const fill: string = 'currentColor'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -15,30 +15,50 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Doc } from '@hcengineering/core'
|
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 { DocNavLink } from '@hcengineering/view-resources'
|
||||||
import AttachmentPopup from './AttachmentPopup.svelte'
|
import AttachmentPopup from './AttachmentPopup.svelte'
|
||||||
|
|
||||||
export let value: number | undefined
|
export let value: number | undefined
|
||||||
export let object: Doc
|
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 showCounter = true
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if value && value > 0}
|
{#if value && value > 0}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<DocNavLink {object} inline noUnderline={true}>
|
<DocNavLink {object} inline noUnderline={true}>
|
||||||
<div
|
{#if kind === 'list'}
|
||||||
use:tooltip={{
|
<div
|
||||||
component: AttachmentPopup,
|
use:tooltip={{
|
||||||
props: { objectId: object._id, attachments: value, object }
|
component: AttachmentPopup,
|
||||||
}}
|
props: { objectId: object._id, attachments: value, object }
|
||||||
class="sm-tool-icon"
|
}}
|
||||||
>
|
class="sm-tool-icon"
|
||||||
<span class="icon"><IconAttachment {size} /></span>
|
>
|
||||||
{#if showCounter}
|
<Button {kind} {size}>
|
||||||
{value}
|
<div slot="content" class="flex-row-center">
|
||||||
{/if}
|
<span class="icon"><IconAttachment {size} /></span>
|
||||||
</div>
|
{#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>
|
</DocNavLink>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -15,13 +15,14 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Doc } from '@hcengineering/core'
|
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 { DocNavLink } from '@hcengineering/view-resources'
|
||||||
import CommentPopup from './CommentPopup.svelte'
|
import CommentPopup from './CommentPopup.svelte'
|
||||||
|
|
||||||
export let value: number | undefined
|
export let value: number | undefined
|
||||||
export let object: Doc
|
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 showCounter = true
|
||||||
export let withInput: boolean = true
|
export let withInput: boolean = true
|
||||||
</script>
|
</script>
|
||||||
@ -29,17 +30,36 @@
|
|||||||
{#if (value && value > 0) || withInput}
|
{#if (value && value > 0) || withInput}
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<DocNavLink {object} inline noUnderline={true}>
|
<DocNavLink {object} inline noUnderline={true}>
|
||||||
<div
|
{#if kind === 'list'}
|
||||||
use:tooltip={{
|
<div
|
||||||
component: CommentPopup,
|
use:tooltip={{
|
||||||
props: { objectId: object._id, object, withInput }
|
component: CommentPopup,
|
||||||
}}
|
props: { objectId: object._id, object, withInput }
|
||||||
class="sm-tool-icon"
|
}}
|
||||||
>
|
class="sm-tool-icon"
|
||||||
<span class="icon"><IconThread {size} /></span>
|
>
|
||||||
{#if showCounter && value && value !== 0}
|
<Button {kind} {size}>
|
||||||
{value}
|
<div slot="content" class="flex-row-center">
|
||||||
{/if}
|
<span class="icon"><IconThread size={'x-small'} /></span>
|
||||||
</div>
|
{#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>
|
</DocNavLink>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user