mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Tracker: add context menu to the "EditIssue" dialog (#1788)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
This commit is contained in:
parent
4824d911e5
commit
9f5b620dfd
@ -18,7 +18,18 @@
|
||||
import { Panel } from '@anticrm/panel'
|
||||
import presentation, { createQuery, getClient, MessageViewer } from '@anticrm/presentation'
|
||||
import type { Issue, IssueStatus, Team } from '@anticrm/tracker'
|
||||
import { Button, EditBox, IconDownOutline, IconEdit, IconMoreH, IconUpOutline, Scroller } from '@anticrm/ui'
|
||||
import {
|
||||
ActionIcon,
|
||||
Button,
|
||||
EditBox,
|
||||
IconDownOutline,
|
||||
IconEdit,
|
||||
IconMoreH,
|
||||
IconUpOutline,
|
||||
Scroller,
|
||||
showPopup
|
||||
} from '@anticrm/ui'
|
||||
import { ContextMenu } from '@anticrm/view-resources'
|
||||
import { StyledTextArea } from '@anticrm/text-editor'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import tracker from '../../../plugin'
|
||||
@ -109,6 +120,12 @@
|
||||
isEditing = false
|
||||
}
|
||||
|
||||
function showMenu (ev?: Event): void {
|
||||
if (issue) {
|
||||
showPopup(ContextMenu, { object: issue }, (ev as MouseEvent).target as HTMLElement)
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
dispatch('open', { ignoreKeys: ['comments', 'name', 'description', 'number'] })
|
||||
})
|
||||
@ -149,6 +166,7 @@
|
||||
<Button disabled={!canSave} label={presentation.string.Save} on:click={save} />
|
||||
{:else}
|
||||
<Button icon={IconEdit} kind="transparent" size="medium" on:click={edit} />
|
||||
<ActionIcon icon={IconMoreH} size={'medium'} action={showMenu} />
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user