Home button
This commit is contained in:
parent
b73dd890ef
commit
69595a400b
3 changed files with 38 additions and 23 deletions
|
@ -9,15 +9,16 @@
|
|||
>
|
||||
<div class="left">
|
||||
<div class="buttons">
|
||||
<MkA
|
||||
v-if="!$i"
|
||||
<!-- <MkA
|
||||
v-if="!$i && displayHomeButton"
|
||||
class="_buttonIcon button icon backButton"
|
||||
:to="'/'"
|
||||
v-tooltip="i18n.ts.home"
|
||||
>
|
||||
<i class="ph-list ph-bold ph-lg"></i>
|
||||
</MkA>
|
||||
<i class="ph-house ph-bold ph-lg"></i>
|
||||
</MkA> -->
|
||||
<button
|
||||
v-else-if="displayBackButton"
|
||||
v-if="displayBackButton"
|
||||
class="_buttonIcon button icon backButton"
|
||||
@click.stop="goBack()"
|
||||
@touchstart="preventDrag"
|
||||
|
@ -98,6 +99,15 @@
|
|||
</nav>
|
||||
</template>
|
||||
<div class="buttons right">
|
||||
<MkButton
|
||||
v-if="!$i && displayHomeButton"
|
||||
:to="'/'"
|
||||
link
|
||||
rounded
|
||||
>
|
||||
<i class="ph-house ph-bold ph-lg"></i>
|
||||
{{ i18n.ts.home }}
|
||||
</MkButton>
|
||||
<template v-if="metadata.avatar && $i">
|
||||
<MkFollowButton
|
||||
v-if="narrow"
|
||||
|
@ -140,6 +150,7 @@ import {
|
|||
reactive,
|
||||
} from "vue";
|
||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import { popupMenu } from "@/os";
|
||||
import { scrollToTop } from "@/scripts/scroll";
|
||||
import { globalEvents } from "@/events";
|
||||
|
@ -155,7 +166,8 @@ type Tab = {
|
|||
onClick?: (ev: MouseEvent) => void;
|
||||
};
|
||||
|
||||
const props = defineProps<{
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
tabs?: Tab[];
|
||||
tab?: string;
|
||||
noTabCollapse?: boolean;
|
||||
|
@ -167,8 +179,14 @@ const props = defineProps<{
|
|||
thin?: boolean;
|
||||
displayMyAvatar?: boolean;
|
||||
displayBackButton?: boolean;
|
||||
displayHomeButton?: boolean;
|
||||
to?: string;
|
||||
}>();
|
||||
}>(),
|
||||
{
|
||||
displayHomeButton: !$i
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
const displayBackButton =
|
||||
props.displayBackButton &&
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
:actions="headerActions"
|
||||
:tabs="headerTabs"
|
||||
:noTabCollapse="true"
|
||||
:displayHomeButton="false"
|
||||
/></template>
|
||||
<div id="visitor-view">
|
||||
<swiper
|
||||
|
|
|
@ -191,10 +191,6 @@ matchMedia("(max-width: 1000px)").onchange = (mql) => {
|
|||
|
||||
expanded = true;
|
||||
|
||||
defineProps<{
|
||||
poweredBy?: boolean,
|
||||
}>()
|
||||
|
||||
let meta = $ref<DetailedInstanceMetadata>();
|
||||
|
||||
let isLong = $ref(false);
|
||||
|
|
Loading…
Reference in a new issue