mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 11:34:58 +02:00
Always show back button (#2455)
Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
import tracker from '../../../tracker-resources/src/plugin'
|
||||
|
||||
export let element: Doc
|
||||
export let showBackButton: boolean = false
|
||||
|
||||
async function next (evt: Event, pn: boolean): Promise<void> {
|
||||
select(evt, pn ? 1 : -1, element, 'vertical')
|
||||
@@ -32,10 +31,8 @@
|
||||
}
|
||||
|
||||
function goBack () {
|
||||
if (showBackButton) {
|
||||
closeTooltip()
|
||||
history.back()
|
||||
}
|
||||
closeTooltip()
|
||||
history.back()
|
||||
}
|
||||
|
||||
$: select(undefined, 0, element, 'vertical')
|
||||
@@ -43,13 +40,10 @@
|
||||
|
||||
<Button icon={IconDownOutline} kind={'secondary'} size={'medium'} on:click={(evt) => next(evt, true)} />
|
||||
<Button icon={IconUpOutline} kind={'secondary'} size={'medium'} on:click={(evt) => next(evt, false)} />
|
||||
|
||||
{#if showBackButton}
|
||||
<Button
|
||||
showTooltip={{ label: tracker.string.Back, direction: 'bottom' }}
|
||||
icon={IconNavPrev}
|
||||
kind={'secondary'}
|
||||
size={'medium'}
|
||||
on:click={goBack}
|
||||
/>
|
||||
{/if}
|
||||
<Button
|
||||
showTooltip={{ label: tracker.string.Back, direction: 'bottom' }}
|
||||
icon={IconNavPrev}
|
||||
kind={'secondary'}
|
||||
size={'medium'}
|
||||
on:click={goBack}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user