mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-04 22:37:00 +00: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 { Panel } from '@anticrm/panel'
|
||||||
import presentation, { createQuery, getClient, MessageViewer } from '@anticrm/presentation'
|
import presentation, { createQuery, getClient, MessageViewer } from '@anticrm/presentation'
|
||||||
import type { Issue, IssueStatus, Team } from '@anticrm/tracker'
|
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 { StyledTextArea } from '@anticrm/text-editor'
|
||||||
import { createEventDispatcher, onMount } from 'svelte'
|
import { createEventDispatcher, onMount } from 'svelte'
|
||||||
import tracker from '../../../plugin'
|
import tracker from '../../../plugin'
|
||||||
@ -109,6 +120,12 @@
|
|||||||
isEditing = false
|
isEditing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showMenu (ev?: Event): void {
|
||||||
|
if (issue) {
|
||||||
|
showPopup(ContextMenu, { object: issue }, (ev as MouseEvent).target as HTMLElement)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
dispatch('open', { ignoreKeys: ['comments', 'name', 'description', 'number'] })
|
dispatch('open', { ignoreKeys: ['comments', 'name', 'description', 'number'] })
|
||||||
})
|
})
|
||||||
@ -149,6 +166,7 @@
|
|||||||
<Button disabled={!canSave} label={presentation.string.Save} on:click={save} />
|
<Button disabled={!canSave} label={presentation.string.Save} on:click={save} />
|
||||||
{:else}
|
{:else}
|
||||||
<Button icon={IconEdit} kind="transparent" size="medium" on:click={edit} />
|
<Button icon={IconEdit} kind="transparent" size="medium" on:click={edit} />
|
||||||
|
<ActionIcon icon={IconMoreH} size={'medium'} action={showMenu} />
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user