Hide dev tools when in screen peek modal

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

View File

@ -42,7 +42,10 @@
let permissionError = false
// 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
$: {

View File

@ -47,14 +47,6 @@
})
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) || []
$: typeClass = NavigationClasses[navigation] || NavigationClasses.None
$: navWidthClass = WidthClasses[navWidth || width] || WidthClasses.Large
@ -120,7 +112,7 @@
<div
class="nav-wrapper"
class:sticky
class:hidden={isPeeking}
class:hidden={$routeStore.queryParams?.peek}
class:clickable={$builderStore.inBuilder}
on:click={$builderStore.inBuilder ? builderStore.actions.clickNav : null}
style={navStyle}

View File

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