mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
fix: fixes mobile menu having the wrong margin in pwa (#3826)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<section :class="{ 'h-screen min-h-0': scrollable }" class="flex flex-col">
|
<section :class="{ 'h-screen min-h-0': scrollable }" class="flex flex-col">
|
||||||
<header
|
<header
|
||||||
v-if="$slots.header"
|
v-if="$slots.header"
|
||||||
class="border-base-content/10 bg-base-200 sticky top-[55px] z-2 border-b py-2 shadow-[1px_1px_2px_0_rgb(0,0,0,0.05)] md:top-0"
|
class="border-base-content/10 bg-base-200 sticky top-[calc(55px+env(safe-area-inset-top))] z-2 border-b py-2 shadow-[1px_1px_2px_0_rgb(0,0,0,0.05)] md:top-0"
|
||||||
>
|
>
|
||||||
<slot name="header"></slot>
|
<slot name="header"></slot>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -1,27 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<nav class="border-base-content/20 bg-base-200 fixed top-0 z-10 w-full border-b p-2" data-testid="navigation">
|
<nav class="border-base-content/20 bg-base-200 fixed top-0 z-10 w-full border-b" data-testid="navigation">
|
||||||
<div class="flex items-center">
|
<div class="p-2">
|
||||||
<router-link :to="{ name: '/' }">
|
<div class="flex items-center">
|
||||||
<Logo class="logo [&_.secondary-fill]:fill-secondary h-8" />
|
<router-link :to="{ name: '/' }">
|
||||||
</router-link>
|
<Logo class="logo [&_.secondary-fill]:fill-secondary h-8" />
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<div class="ml-auto flex items-center gap-2">
|
<div class="ml-auto flex items-center gap-2">
|
||||||
<a class="btn btn-circle flex" @click="$emit('search')" :title="$t('tooltip.search')">
|
<a class="btn btn-circle flex" @click="$emit('search')" :title="$t('tooltip.search')">
|
||||||
<mdi:magnify class="size-5" />
|
<mdi:magnify class="size-5" />
|
||||||
</a>
|
</a>
|
||||||
<label class="btn btn-circle swap swap-rotate" data-testid="hamburger">
|
<label class="btn btn-circle swap swap-rotate" data-testid="hamburger">
|
||||||
<input type="checkbox" v-model="show" />
|
<input type="checkbox" v-model="show" />
|
||||||
<mdi:close class="swap-on" />
|
<mdi:close class="swap-on" />
|
||||||
<mdi:hamburger-menu class="swap-off" />
|
<mdi:hamburger-menu class="swap-off" />
|
||||||
</label>
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<transition name="fade">
|
||||||
|
<div v-show="show" class="flex h-[calc(100svh-55px)]">
|
||||||
|
<SideMenu class="flex-1" />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<transition name="fade">
|
|
||||||
<div v-show="show" class="flex h-[calc(100svh-55px)]">
|
|
||||||
<SideMenu class="flex-1" />
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -55,4 +57,8 @@ watch(route, () => {
|
|||||||
.fade-leave-to > div {
|
.fade-leave-to > div {
|
||||||
@apply -translate-y-10;
|
@apply -translate-y-10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
padding-top: env(safe-area-inset-top);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<mobile-menu v-if="isMobile && !forceMenuHidden" @search="showFuzzySearch"></mobile-menu>
|
<MobileMenu v-if="isMobile && !forceMenuHidden" @search="showFuzzySearch"></MobileMenu>
|
||||||
<Splitpanes @resized="onResized($event)">
|
<Splitpanes @resized="onResized($event)">
|
||||||
<Pane min-size="10" :size="menuWidth" v-if="!isMobile && !collapseNav && !forceMenuHidden">
|
<Pane min-size="10" :size="menuWidth" v-if="!isMobile && !collapseNav && !forceMenuHidden">
|
||||||
<SidePanel @search="showFuzzySearch" />
|
<SidePanel @search="showFuzzySearch" />
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user