mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Add KanbanCard description icon (#1814)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
parent
250d22d261
commit
efa67f4b4f
@ -20,8 +20,9 @@
|
||||
import contact, { Employee } from '@anticrm/contact'
|
||||
import type { Ref, WithLookup } from '@anticrm/core'
|
||||
import notification from '@anticrm/notification'
|
||||
import view from '@anticrm/view'
|
||||
import { getClient, UserBoxList } from '@anticrm/presentation'
|
||||
import { Button, Component, EditBox, IconEdit, Label, numberToHexColor, showPopup } from '@anticrm/ui'
|
||||
import { Button, Component, EditBox, Icon, IconEdit, Label, numberToHexColor, showPopup } from '@anticrm/ui'
|
||||
import { ContextMenu } from '@anticrm/view-resources'
|
||||
import board from '../plugin'
|
||||
import CardLabels from './editor/CardLabels.svelte'
|
||||
@ -29,6 +30,7 @@
|
||||
import { hasDate, openCardPanel, updateCard, updateCardMembers } from '../utils/CardUtils'
|
||||
import { getElementPopupAlignment } from '../utils/PopupUtils'
|
||||
import CheckListsPresenter from './presenters/ChecklistsPresenter.svelte'
|
||||
import NotificationPresenter from './presenters/NotificationPresenter.svelte'
|
||||
|
||||
export let object: WithLookup<Card>
|
||||
|
||||
@ -172,11 +174,22 @@
|
||||
</div>
|
||||
<div class="flex-between mb-1" style:pointer-events={dragoverAttachment ? 'none' : 'all'}>
|
||||
<div class="float-left-box">
|
||||
<!-- TODO: adjust icons -->
|
||||
<div class="float-left">
|
||||
<NotificationPresenter {object} />
|
||||
</div>
|
||||
{#if object.date && hasDate(object)}
|
||||
<div class="float-left ml-1">
|
||||
<div class="float-left">
|
||||
<DatePresenter value={object.date} size="x-small" on:update={updateDate} />
|
||||
</div>
|
||||
{/if}
|
||||
{#if object.description}
|
||||
<div class="float-left">
|
||||
<div class="sm-tool-icon ml-1 mr-1">
|
||||
<span class="icon"><Icon icon={view.icon.Table} size="small" /></span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if (object.attachments ?? 0) > 0}
|
||||
<div class="float-left">
|
||||
<AttachmentsPresenter value={object.attachments} {object} size="small" />
|
||||
|
@ -30,7 +30,7 @@
|
||||
<Icon icon={board.icon.Card} {size} />
|
||||
{done}/{total}
|
||||
{#if item.dueTo !== null}
|
||||
<DatePresenter value={item.dueTo} size="small" icon={getDateIcon(item)} kind="transparent" />
|
||||
<DatePresenter value={item.dueTo} size="x-small" icon={getDateIcon(item)} kind="transparent" />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -0,0 +1,34 @@
|
||||
<!--
|
||||
// Copyright © 2022 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Doc } from '@anticrm/core'
|
||||
import notification from '@anticrm/notification'
|
||||
import { NotificationClientImpl } from '@anticrm/notification-resources'
|
||||
import { Icon, IconSize } from '@anticrm/ui'
|
||||
|
||||
export let object: Doc
|
||||
export let size: IconSize = 'small'
|
||||
|
||||
const notificationClient = NotificationClientImpl.getClient()
|
||||
const lastViews = notificationClient.getLastViews()
|
||||
$: lastView = $lastViews.get(object._id)
|
||||
$: subscribed = lastView !== undefined && lastView !== -1
|
||||
</script>
|
||||
|
||||
{#if subscribed}
|
||||
<div class="sm-tool-icon ml-1 mr-1 flex-center">
|
||||
<span class="icon"><Icon icon={notification.icon.Notifications} {size} /></span>
|
||||
</div>
|
||||
{/if}
|
Loading…
Reference in New Issue
Block a user