From 65309a5b98c005e5806ed9d47f7d8f7208f9e878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 16 Apr 2021 11:18:39 +0200 Subject: [PATCH] adds tab to left sidebar on design section --- .../FrontendNavigatePane.svelte | 85 ++++++++++--------- .../builder/[application]/data/_layout.svelte | 2 +- .../design/[assetType]/_layout.svelte | 2 +- 3 files changed, 48 insertions(+), 41 deletions(-) diff --git a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte index 70e2306dcf..6f4872dec4 100644 --- a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte +++ b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte @@ -13,7 +13,7 @@ import Layout from "components/design/NavigationPanel/Layout.svelte" import NewScreenModal from "components/design/NavigationPanel/NewScreenModal.svelte" import NewLayoutModal from "components/design/NavigationPanel/NewLayoutModal.svelte" - import { Modal, Switcher, Select, Input } from "@budibase/bbui" + import { Modal, Switcher, Select, Input, Tabs, Tab } from "@budibase/bbui" const tabs = [ { @@ -28,13 +28,11 @@ let modal let routes = {} - $: tab = $params.assetType + $: selected = tabs.find(t => t.key === $params.assetType).title - const navigate = ({ detail }) => { - if (!detail) { - return - } - $goto(`../${detail.heading.key}`) + const navigate = ({detail}) => { + const { key } = tabs.find(t => t.title === detail) + $goto(`../${key}`) } const updateAccessRole = event => { @@ -68,33 +66,30 @@
- - {#if tab === FrontendTypes.SCREEN} - -
- -
- + +
+
+ +
+ + ($screenSearchString = null)} /> +