hide back button when not needed
This commit is contained in:
parent
b0390a3fc0
commit
2515319c08
|
@ -97,6 +97,7 @@ provideMetadataReceiver((info) => {
|
||||||
pageMetadata = info;
|
pageMetadata = info;
|
||||||
});
|
});
|
||||||
provide("shouldOmitHeaderTitle", true);
|
provide("shouldOmitHeaderTitle", true);
|
||||||
|
provide("shouldBackButton", false);
|
||||||
provide("shouldHeaderThin", true);
|
provide("shouldHeaderThin", true);
|
||||||
|
|
||||||
const contextmenu = $computed(() => [
|
const contextmenu = $computed(() => [
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button
|
<button
|
||||||
v-if="props.displayBackButton"
|
v-if="displayBackButton"
|
||||||
class="_buttonIcon button icon backButton"
|
class="_buttonIcon button icon backButton"
|
||||||
@click.stop="goBack()"
|
@click.stop="goBack()"
|
||||||
@touchstart="preventDrag"
|
@touchstart="preventDrag"
|
||||||
|
@ -164,6 +164,8 @@ const props = defineProps<{
|
||||||
to?: string;
|
to?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const displayBackButton = props.displayBackButton && history.length > 2 && inject("shouldBackButton", true);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "update:tab", key: string);
|
(ev: "update:tab", key: string);
|
||||||
}>();
|
}>();
|
||||||
|
|
Loading…
Reference in New Issue