forked from Mirrors/elk
fix: hydration problem on default layout (#831)
This commit is contained in:
parent
c48ee6c35b
commit
731d68d53d
3 changed files with 3 additions and 12 deletions
|
@ -47,7 +47,7 @@ const showUserPicker = logicAnd(
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
<div w-full min-h-screen :class="wideLayout ? 'xl:w-full sm:w-600px' : 'sm:w-600px md:shrink-0'" border-base>
|
<div w-full min-h-screen :class="isHydrated && wideLayout ? 'xl:w-full sm:w-600px' : 'sm:w-600px md:shrink-0'" border-base>
|
||||||
<div min-h="[calc(100vh-3.5rem)]" sm:min-h-screen>
|
<div min-h="[calc(100vh-3.5rem)]" sm:min-h-screen>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,7 +56,7 @@ const showUserPicker = logicAnd(
|
||||||
<NavBottom v-if="isHydrated" />
|
<NavBottom v-if="isHydrated" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<aside v-if="!wideLayout" class="hidden sm:none lg:block w-1/4 zen-hide">
|
<aside v-if="isHydrated && !wideLayout" class="hidden sm:none lg:block w-1/4 zen-hide">
|
||||||
<div sticky top-0 h-screen flex="~ col" gap-2 py3 ms-2>
|
<div sticky top-0 h-screen flex="~ col" gap-2 py3 ms-2>
|
||||||
<slot name="right">
|
<slot name="right">
|
||||||
<div flex-auto />
|
<div flex-auto />
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
<script setup>
|
|
||||||
definePageMeta({
|
|
||||||
wideLayout: true,
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div min-h-screen flex justify-center items-center>
|
<div min-h-screen flex justify-center items-center>
|
||||||
<div text-center flex="~ col gap-2" items-center>
|
<div text-center flex="~ col gap-2" items-center>
|
||||||
|
|
|
@ -5,14 +5,11 @@ import { NavigationRoute, registerRoute } from 'workbox-routing'
|
||||||
import { CacheableResponsePlugin } from 'workbox-cacheable-response'
|
import { CacheableResponsePlugin } from 'workbox-cacheable-response'
|
||||||
import { StaleWhileRevalidate } from 'workbox-strategies'
|
import { StaleWhileRevalidate } from 'workbox-strategies'
|
||||||
import { ExpirationPlugin } from 'workbox-expiration'
|
import { ExpirationPlugin } from 'workbox-expiration'
|
||||||
// import * as navigationPreload from 'workbox-navigation-preload'
|
|
||||||
import { onNotificationClick, onPush } from './web-push-notifications'
|
import { onNotificationClick, onPush } from './web-push-notifications'
|
||||||
|
|
||||||
declare const self: ServiceWorkerGlobalScope
|
declare const self: ServiceWorkerGlobalScope
|
||||||
|
|
||||||
// if (import.meta.env.PROD)
|
|
||||||
// navigationPreload.enable()
|
|
||||||
|
|
||||||
self.addEventListener('message', (event) => {
|
self.addEventListener('message', (event) => {
|
||||||
if (event.data && event.data.type === 'SKIP_WAITING')
|
if (event.data && event.data.type === 'SKIP_WAITING')
|
||||||
self.skipWaiting()
|
self.skipWaiting()
|
||||||
|
|
Loading…
Reference in a new issue