Hide dev tools when in screen peek modal

This commit is contained in:
Andrew Kingston 2022-05-06 14:09:35 +01:00
parent c96b268c2f
commit b5264fd93d
3 changed files with 5 additions and 11 deletions

View File

@ -42,7 +42,10 @@
let permissionError = false let permissionError = false
// Determine if we should show devtools or not // Determine if we should show devtools or not
$: isDevPreview = $appStore.isDevApp && !$builderStore.inBuilder $: isDevPreview =
$appStore.isDevApp &&
!$builderStore.inBuilder &&
!$routeStore.queryParams?.peek
// Handle no matching route // Handle no matching route
$: { $: {

View File

@ -47,14 +47,6 @@
}) })
setContext("layout", store) setContext("layout", store)
// Permanently go into peek mode if we ever get the peek flag
let isPeeking = false
$: {
if ($routeStore.queryParams?.peek) {
isPeeking = true
}
}
$: validLinks = links?.filter(link => link.text && link.url) || [] $: validLinks = links?.filter(link => link.text && link.url) || []
$: typeClass = NavigationClasses[navigation] || NavigationClasses.None $: typeClass = NavigationClasses[navigation] || NavigationClasses.None
$: navWidthClass = WidthClasses[navWidth || width] || WidthClasses.Large $: navWidthClass = WidthClasses[navWidth || width] || WidthClasses.Large
@ -120,7 +112,7 @@
<div <div
class="nav-wrapper" class="nav-wrapper"
class:sticky class:sticky
class:hidden={isPeeking} class:hidden={$routeStore.queryParams?.peek}
class:clickable={$builderStore.inBuilder} class:clickable={$builderStore.inBuilder}
on:click={$builderStore.inBuilder ? builderStore.actions.clickNav : null} on:click={$builderStore.inBuilder ? builderStore.actions.clickNav : null}
style={navStyle} style={navStyle}

View File

@ -77,7 +77,6 @@ const createBuilderStore = () => {
store.update(state => ({ ...state, editMode: enabled })) store.update(state => ({ ...state, editMode: enabled }))
}, },
clickNav: () => { clickNav: () => {
console.log("click nav")
dispatchEvent("click-nav") dispatchEvent("click-nav")
}, },
} }