Add open parent issue button for a sub-issue edit panel (#2304)

* add open parent issue button for a sub-issue edit panel

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

* simplify getting reactive var value

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

* make UpDownNavigator more universal

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
Ruslan Bayandinov
2022-10-18 12:33:11 +06:00
committed by GitHub
parent 30aa78fa52
commit 9fc7c33372
2 changed files with 30 additions and 3 deletions
@@ -108,6 +108,7 @@
$: issueId = currentTeam && issue && getIssueId(currentTeam, issue)
$: canSave = title.trim().length > 0
$: isDescriptionEmpty = !new DOMParser().parseFromString(description, 'text/html').documentElement.innerText?.trim()
$: parentIssue = issue?.$lookup?.attachedTo
function edit (ev: MouseEvent) {
ev.preventDefault()
@@ -180,9 +181,8 @@
bind:innerWidth
on:close={() => dispatch('close')}
>
{@const { attachedTo: parentIssue } = issue?.$lookup ?? {}}
<svelte:fragment slot="navigator">
<UpDownNavigator element={issue} />
<UpDownNavigator element={issue} showBackButton={!!parentIssue} />
</svelte:fragment>
<svelte:fragment slot="header">
<span class="fs-title">