diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index 9b85807ef6..a46b10068f 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -28,13 +28,14 @@ export let object: Doc export let panelWidth: number = 0 export let innerWidth: number = 0 + export let isTitle: boolean = true export let isHeader: boolean = true export let isSub: boolean = true export let isAside: boolean = true export let isCustomAttr: boolean = true - +
{#if $$slots.navigator} @@ -97,7 +98,9 @@ {#if withoutActivity} - +
+ +
{:else}
diff --git a/packages/ui/src/components/Panel.svelte b/packages/ui/src/components/Panel.svelte index 3388034c32..41cab5cfcb 100644 --- a/packages/ui/src/components/Panel.svelte +++ b/packages/ui/src/components/Panel.svelte @@ -18,6 +18,7 @@ export let innerWidth: number = 0 export let panelWidth: number = 0 + export let isTitle: boolean = true export let isHeader: boolean = true export let isAside: boolean = true @@ -33,32 +34,34 @@
-
-
-
+ {/if}
{#if $$slots.header && isHeader} diff --git a/plugins/tracker-assets/lang/en.json b/plugins/tracker-assets/lang/en.json index 972eb0e4dc..5885a67438 100644 --- a/plugins/tracker-assets/lang/en.json +++ b/plugins/tracker-assets/lang/en.json @@ -96,6 +96,7 @@ "PastMonth": "Past month", "CopyIssueUrl": "Copy Issue URL to clipboard", "CopyIssueId": "Copy Issue ID to clipboard", + "CopyIssueBranch": "Copy Git branch name to clipboard", "GotoIssues": "Go to issues", "GotoActive": "Go to active issues", @@ -109,7 +110,9 @@ "FilterIs": "is", "FilterIsNot": "is not", "FilterIsEither": "is either of", - "FilterStatesCount": "{value, plural, =1 {1 state} other {# states}}" + "FilterStatesCount": "{value, plural, =1 {1 state} other {# states}}", + + "EditIssue": "Edit {title}" }, "status": {} } \ No newline at end of file diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json index a8d9273d25..72f507d607 100644 --- a/plugins/tracker-assets/lang/ru.json +++ b/plugins/tracker-assets/lang/ru.json @@ -73,7 +73,9 @@ "GotoBacklog": "Перейти к пулу задач", "GotoBoard": "Перейти к канбану", "GotoProjects": "Перейти к проекту", - "GotoTrackerApplication": "Перейти к приложению Трекер" + "GotoTrackerApplication": "Перейти к приложению Трекер", + + "EditIssue": "Редактирование {title}" }, "status": {} } diff --git a/plugins/tracker-resources/package.json b/plugins/tracker-resources/package.json index 02281014ed..7d5e64a932 100644 --- a/plugins/tracker-resources/package.json +++ b/plugins/tracker-resources/package.json @@ -49,6 +49,7 @@ "@anticrm/view-resources": "~0.6.0", "@anticrm/text-editor": "~0.6.0", "@anticrm/panel": "~0.6.0", - "@anticrm/kanban": "~0.6.0" + "@anticrm/kanban": "~0.6.0", + "@anticrm/attachment-resources": "~0.6.0" } } diff --git a/plugins/tracker-resources/src/components/issues/EditIssue.svelte b/plugins/tracker-resources/src/components/issues/EditIssue.svelte deleted file mode 100644 index b7920de460..0000000000 --- a/plugins/tracker-resources/src/components/issues/EditIssue.svelte +++ /dev/null @@ -1,275 +0,0 @@ - - - -{#if issue !== undefined} - { - dispatch('close') - }} - > - Custom Title - -
- {#if currentTeam} - - {/if} -
-
-
-
- -
- {/if} - - -{/if} - - diff --git a/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte b/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte index 1d1f8da544..b441851924 100644 --- a/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte +++ b/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte @@ -27,13 +27,13 @@ $: issueName = `${currentTeam.identifier}-${value.number}` - const handleIssueEditorOpened = () => { - showPanel(tracker.component.EditIssue, value._id, value._class, 'content') + const handleIssuePreviewOpened = () => { + showPanel(tracker.component.PreviewIssue, value._id, value._class, 'content') } {#if value && shortLabel} -
+
diff --git a/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte b/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte index 19adf94ae3..6a1c3e979a 100644 --- a/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte +++ b/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte @@ -20,11 +20,13 @@ import type { ButtonKind, ButtonSize } from '@anticrm/ui' import tracker from '../../plugin' import PrioritySelector from '../PrioritySelector.svelte' + import { createEventDispatcher } from 'svelte' export let value: Issue export let currentSpace: Ref | undefined = undefined export let isEditable: boolean = true export let shouldShowLabel: boolean = false + export let shouldSaveOnChange = true export let kind: ButtonKind = 'link' export let size: ButtonSize = 'large' @@ -32,9 +34,14 @@ export let width: string | undefined = '100%' const client = getClient() + const dispatch = createEventDispatcher() const handlePriorityChanged = async (newPriority: IssuePriority | undefined) => { - if (!isEditable || newPriority === undefined) { + if (isEditable) { + dispatch('change', newPriority) + } + + if (!shouldSaveOnChange || !isEditable || newPriority === undefined) { return } diff --git a/plugins/tracker-resources/src/components/issues/StatusEditor.svelte b/plugins/tracker-resources/src/components/issues/StatusEditor.svelte index bff4410fc3..d0e4b2fce9 100644 --- a/plugins/tracker-resources/src/components/issues/StatusEditor.svelte +++ b/plugins/tracker-resources/src/components/issues/StatusEditor.svelte @@ -20,12 +20,14 @@ import type { ButtonKind, ButtonSize } from '@anticrm/ui' import tracker from '../../plugin' import StatusSelector from '../StatusSelector.svelte' + import { createEventDispatcher } from 'svelte' export let value: Issue export let statuses: WithLookup[] export let currentSpace: Ref | undefined = undefined export let isEditable: boolean = true export let shouldShowLabel: boolean = false + export let shouldSaveOnChange = true export let kind: ButtonKind = 'link' export let size: ButtonSize = 'large' @@ -33,9 +35,14 @@ export let width: string | undefined = '100%' const client = getClient() + const dispatch = createEventDispatcher() const handleStatusChanged = async (newStatus: Ref | undefined) => { - if (!isEditable || newStatus === undefined) { + if (isEditable) { + dispatch('change', newStatus) + } + + if (!isEditable || !shouldSaveOnChange || newStatus === undefined) { return } diff --git a/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte b/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte new file mode 100644 index 0000000000..569e78c96c --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte @@ -0,0 +1,153 @@ + + + +{#if direction === 'column'} +
+ + + detail && change('status', detail)} + /> + + + + detail !== undefined && change('priority', detail)} + /> + + + + change('assignee', detail)} + /> + + + +
+{/if} + + diff --git a/plugins/tracker-resources/src/components/issues/edit/CopyToClipboard.svelte b/plugins/tracker-resources/src/components/issues/edit/CopyToClipboard.svelte new file mode 100644 index 0000000000..924771de66 --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/edit/CopyToClipboard.svelte @@ -0,0 +1,61 @@ + + + +{#if issueUrl} +
+
+ + +