Skip to content

Commit

Permalink
Tracker: split "edit issue" dialog to preview / edit (#1272)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
  • Loading branch information
Sergei Ogorelkov committed May 12, 2022
1 parent ceeacce commit dc33520
Show file tree
Hide file tree
Showing 15 changed files with 608 additions and 312 deletions.
7 changes: 5 additions & 2 deletions packages/panel/src/components/Panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
</script>

<Panel bind:isAside isHeader={$$slots.header || isHeader} bind:panelWidth bind:innerWidth on:close>
<Panel bind:isAside {isTitle} isHeader={$$slots.header || isHeader} bind:panelWidth bind:innerWidth on:close>
<svelte:fragment slot="title">
<div class="popupPanel-title__content-container antiTitle">
{#if $$slots.navigator}
Expand Down Expand Up @@ -97,7 +98,9 @@
</svelte:fragment>

{#if withoutActivity}
<slot />
<div class="popupPanel-body__main-content py-10 clear-mins">
<slot />
</div>
{:else}
<Scroller>
<div class="popupPanel-body__main-content py-10 clear-mins">
Expand Down
53 changes: 28 additions & 25 deletions packages/ui/src/components/Panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,32 +34,34 @@
</script>

<div class="popupPanel" bind:clientWidth={panelWidth}>
<div class="popupPanel-title">
<Button
icon={IconClose}
kind={'transparent'}
size={'medium'}
on:click={() => {
dispatch('close')
}}
/>
<div class="popupPanel-title__content"><slot name="title" /></div>
<div class="buttons-group xsmall-gap">
<slot name="utils" />
{#if asideFloat && $$slots.aside && isAside}
{#if $$slots.utils}<div class="buttons-divider" />{/if}
<Button
icon={IconDetails}
kind={'transparent'}
size={'medium'}
selected={asideShown}
on:click={() => {
asideShown = !asideShown
}}
/>
{/if}
{#if isTitle}
<div class="popupPanel-title">
<Button
icon={IconClose}
kind={'transparent'}
size={'medium'}
on:click={() => {
dispatch('close')
}}
/>
<div class="popupPanel-title__content"><slot name="title" /></div>
<div class="buttons-group xsmall-gap">
<slot name="utils" />
{#if asideFloat && $$slots.aside && isAside}
{#if $$slots.utils}<div class="buttons-divider" />{/if}
<Button
icon={IconDetails}
kind={'transparent'}
size={'medium'}
selected={asideShown}
on:click={() => {
asideShown = !asideShown
}}
/>
{/if}
</div>
</div>
</div>
{/if}
<div class="popupPanel-body" class:asideShown>
<div class="popupPanel-body__main" bind:clientWidth={innerWidth}>
{#if $$slots.header && isHeader}
Expand Down
5 changes: 4 additions & 1 deletion plugins/tracker-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {}
}
4 changes: 3 additions & 1 deletion plugins/tracker-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"GotoBacklog": "Перейти к пулу задач",
"GotoBoard": "Перейти к канбану",
"GotoProjects": "Перейти к проекту",
"GotoTrackerApplication": "Перейти к приложению Трекер"
"GotoTrackerApplication": "Перейти к приложению Трекер",

"EditIssue": "Редактирование {title}"
},
"status": {}
}
3 changes: 2 additions & 1 deletion plugins/tracker-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Loading

0 comments on commit dc33520

Please sign in to comment.