hide back button when not needed

This commit is contained in:
Freeplay 2023-05-31 22:38:14 -04:00
parent b0390a3fc0
commit 2515319c08
2 changed files with 4 additions and 1 deletions

View file

@ -97,6 +97,7 @@ provideMetadataReceiver((info) => {
pageMetadata = info;
});
provide("shouldOmitHeaderTitle", true);
provide("shouldBackButton", false);
provide("shouldHeaderThin", true);
const contextmenu = $computed(() => [

View file

@ -10,7 +10,7 @@
<div class="left">
<div class="buttons">
<button
v-if="props.displayBackButton"
v-if="displayBackButton"
class="_buttonIcon button icon backButton"
@click.stop="goBack()"
@touchstart="preventDrag"
@ -164,6 +164,8 @@ const props = defineProps<{
to?: string;
}>();
const displayBackButton = props.displayBackButton && history.length > 2 && inject("shouldBackButton", true);
const emit = defineEmits<{
(ev: "update:tab", key: string);
}>();