From b5264fd93de4d0215762f8b121310f5f831a38f2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 6 May 2022 14:09:35 +0100 Subject: [PATCH] Hide dev tools when in screen peek modal --- packages/client/src/components/ClientApp.svelte | 5 ++++- packages/client/src/components/app/Layout.svelte | 10 +--------- packages/client/src/stores/builder.js | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index 601b6cb491..3232a01527 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -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 $: { diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index 0aa65474d3..93cbb84e6d 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -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 @@