From 2dff378ce78913252cd35392d9e750a6d24a804d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 23 Apr 2021 13:52:34 +0200 Subject: [PATCH] replace remix icons in NavItem component --- .../AutomationPanel/AutomationList.svelte | 5 +++-- .../DatasourceNavigator.svelte | 13 ++++++++----- .../TableNavigator/TableNavigator.svelte | 11 +++++++---- .../src/components/common/NavItem.svelte | 2 +- .../ComponentNavigationTree/PathTree.svelte | 19 +++++++++++-------- .../FrontendNavigatePane.svelte | 5 ----- .../design/NavigationPanel/Layout.svelte | 17 ++++++----------- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte index bb2057955f..f70366773a 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte @@ -20,10 +20,11 @@ {#each $automationStore.automations as automation, idx} 0} - icon="ri-stackshare-line" + icon="ShareAndroid" text={automation.name} selected={automation._id === selectedAutomationId} - on:click={() => selectAutomation(automation)}> + on:click={() => selectAutomation(automation)} + > {/each} diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index e4984af4f6..cccc0f7259 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -33,22 +33,25 @@ border={idx > 0} text={datasource.name} selected={$datasources.selected === datasource._id} - on:click={() => selectDatasource(datasource)}> + on:click={() => selectDatasource(datasource)} + >
+ width="18" + />
- {#each $queries.list.filter(query => query.datasourceId === datasource._id) as query} + {#each $queries.list.filter((query) => query.datasourceId === datasource._id) as query} onClickQuery(query)}> + on:click={() => onClickQuery(query)} + > {/each} diff --git a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte index 894a02ad73..94852d1202 100644 --- a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte +++ b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte @@ -34,10 +34,11 @@ {#each $tables.list as table, idx} 0} - icon={`ri-${table._id === TableNames.USERS ? 'user' : 'table'}-line`} + icon={table._id === TableNames.USERS ? "UserGroup" : "Table"} text={table.name} selected={selectedView === `all_${table._id}`} - on:click={() => selectTable(table)}> + on:click={() => selectTable(table)} + > {#if table._id !== TableNames.USERS} {/if} @@ -48,9 +49,11 @@ icon="ri-eye-line" text={viewName} selected={selectedView === viewName} - on:click={() => onClickView(table, viewName)}> + on:click={() => onClickView(table, viewName)} + > + view={{ name: viewName, ...table.views[viewName] }} + /> {/each} {/each} diff --git a/packages/builder/src/components/common/NavItem.svelte b/packages/builder/src/components/common/NavItem.svelte index 9ad500f113..e60ab52e5c 100644 --- a/packages/builder/src/components/common/NavItem.svelte +++ b/packages/builder/src/components/common/NavItem.svelte @@ -35,7 +35,7 @@ {#if icon} -
+
{/if}
{text}
{#if withActions} diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte index 5f98a2b9ed..18a1367a7a 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte @@ -35,11 +35,11 @@ route.subpaths[selectedScreen?.routing?.route] !== undefined $: routeOpened = routeManuallyOpened || routeSelected || hasSearchMatch - const changeScreen = screenId => { + const changeScreen = (screenId) => { store.actions.screens.select(screenId) } - const getAllScreens = route => { + const getAllScreens = (route) => { let screens = [] Object.entries(route.subpaths).forEach(([route, subpath]) => { Object.entries(subpath.screens).forEach(([role, id]) => { @@ -51,7 +51,7 @@ const getFilteredScreens = (screens, searchString) => { return screens.filter( - screen => !searchString || screen.route.includes(searchString) + (screen) => !searchString || screen.route.includes(searchString) ) } @@ -65,23 +65,25 @@ {#if !noSearchMatch} + withArrow={route.subpaths} + /> {#if routeOpened} {#each filteredScreens as screen (screen.id)} changeScreen(screen.id)}> + on:click={() => changeScreen(screen.id)} + > {#if selectedScreen?._id === screen.id} @@ -89,7 +91,8 @@ level={1} components={selectedScreen.props._children} currentComponent={$selectedComponent} - {dragDropStore} /> + {dragDropStore} + /> {/if} {/each} {/if} diff --git a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte index 2e705cc868..4f73791820 100644 --- a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte +++ b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte @@ -93,11 +93,6 @@
- {#each $store.layouts as layout, idx (layout._id)} 0} /> {/each} diff --git a/packages/builder/src/components/design/NavigationPanel/Layout.svelte b/packages/builder/src/components/design/NavigationPanel/Layout.svelte index b63b14ce39..d3c89fc9e5 100644 --- a/packages/builder/src/components/design/NavigationPanel/Layout.svelte +++ b/packages/builder/src/components/design/NavigationPanel/Layout.svelte @@ -1,20 +1,13 @@