pass displayBackButton from PageWithHeader to MkPageHeader

This commit is contained in:
Hazelnoot 2025-04-13 19:29:50 -04:00
parent d647daae0e
commit 7b4089b8e4
2 changed files with 3 additions and 2 deletions

View file

@ -59,7 +59,7 @@ import { prefer } from '@/preferences.js';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
tabs?: Tab[]; tabs?: Tab[];
tab?: string; tab?: string;
rootEl?: HTMLElement; rootEl?: HTMLElement | null;
}>(), { }>(), {
tabs: () => ([] as Tab[]), tabs: () => ([] as Tab[]),
}); });

View file

@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div ref="rootEl" :class="[$style.root, reversed ? '_pageScrollableReversed' : '_pageScrollable']"> <div ref="rootEl" :class="[$style.root, reversed ? '_pageScrollableReversed' : '_pageScrollable']">
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader v-model:tab="tab" :actions="actions" :tabs="tabs"/></template> <template #header><MkPageHeader v-model:tab="tab" :actions="actions" :tabs="tabs" :displayBackButton="displayBackButton"/></template>
<div :class="$style.body"> <div :class="$style.body">
<slot></slot> <slot></slot>
</div> </div>
@ -28,6 +28,7 @@ const props = withDefaults(defineProps<{
hideTitle?: boolean; hideTitle?: boolean;
displayMyAvatar?: boolean; displayMyAvatar?: boolean;
reversed?: boolean; reversed?: boolean;
displayBackButton?: boolean;
}>(), { }>(), {
tabs: () => ([] as Tab[]), tabs: () => ([] as Tab[]),
}); });