Bump svelte and routify deps, fix builder _reset usage and some tidy ups

This commit is contained in:
Andrew Kingston 2021-05-07 11:14:43 +01:00
parent f57cfe70ce
commit 830069970a
15 changed files with 88 additions and 67 deletions

View File

@ -27,7 +27,7 @@
"rollup-plugin-postcss": "^4.0.0", "rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-svelte": "^7.1.0", "rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"svelte": "^3.37.0" "svelte": "^3.38.2"
}, },
"keywords": [ "keywords": [
"svelte" "svelte"

View File

@ -2407,10 +2407,10 @@ svelte-portal@^1.0.0:
resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3"
integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q==
svelte@^3.37.0: svelte@^3.38.2:
version "3.37.0" version "3.38.2"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.37.0.tgz#dc7cd24bcc275cdb3f8c684ada89e50489144ccd" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.38.2.tgz#55e5c681f793ae349b5cc2fe58e5782af4275ef5"
integrity sha512-TRF30F4W4+d+Jr2KzUUL1j8Mrpns/WM/WacxYlo5MMb2E5Qy2Pk1Guj6GylxsW9OnKQl1tnF8q3hG/hQ3h6VUA== integrity sha512-q5Dq0/QHh4BLJyEVWGe7Cej5NWs040LWjMbicBGZ+3qpFWJ1YObRmUDZKbbovddLC9WW7THTj3kYbTOFmU9fbg==
svgo@^1.0.0: svgo@^1.0.0:
version "1.3.2" version "1.3.2"

View File

@ -90,7 +90,7 @@
"@babel/preset-env": "^7.13.12", "@babel/preset-env": "^7.13.12",
"@babel/runtime": "^7.13.10", "@babel/runtime": "^7.13.10",
"@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-replace": "^2.4.2",
"@roxi/routify": "2.15.1", "@roxi/routify": "2.18.0",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.5", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.5",
"@testing-library/jest-dom": "^5.11.10", "@testing-library/jest-dom": "^5.11.10",
"@testing-library/svelte": "^3.0.0", "@testing-library/svelte": "^3.0.0",
@ -106,7 +106,7 @@
"rollup": "^2.44.0", "rollup": "^2.44.0",
"rollup-plugin-copy": "^3.4.0", "rollup-plugin-copy": "^3.4.0",
"start-server-and-test": "^1.12.1", "start-server-and-test": "^1.12.1",
"svelte": "^3.37.0", "svelte": "^3.38.2",
"svelte-jester": "^1.3.2", "svelte-jester": "^1.3.2",
"vite": "^2.1.5" "vite": "^2.1.5"
}, },

View File

@ -1,9 +1,6 @@
<script> <script>
import { onMount } from "svelte"
import AppCard from "./AppCard.svelte" import AppCard from "./AppCard.svelte"
import { apps } from "stores/portal" import { apps } from "stores/portal"
onMount(apps.load)
</script> </script>
{#if $apps.length} {#if $apps.length}

View File

@ -0,0 +1,23 @@
<script>
import AppCard from "./AppCard.svelte"
import { apps } from "stores/portal"
import { Table } from "@budibase/bbui"
</script>
{#if $apps.length}
<div class="appList">
{#each $apps as app}
<AppCard {...app} />
{/each}
</div>
{:else}
<div>No apps found.</div>
{/if}
<style>
.appList {
display: grid;
grid-gap: 50px;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
</style>

View File

@ -7,7 +7,6 @@
import Spinner from "components/common/Spinner.svelte" import Spinner from "components/common/Spinner.svelte"
import { Info, User } from "./Steps" import { Info, User } from "./Steps"
import Indicator from "./Indicator.svelte" import Indicator from "./Indicator.svelte"
import { goto } from "@roxi/routify"
import { fade } from "svelte/transition" import { fade } from "svelte/transition"
import { post } from "builderStore/api" import { post } from "builderStore/api"
import analytics from "analytics" import analytics from "analytics"

View File

@ -17,9 +17,6 @@
import { auth } from "stores/backend" import { auth } from "stores/backend"
import BuilderSettingsModal from "components/start/BuilderSettingsModal.svelte" import BuilderSettingsModal from "components/start/BuilderSettingsModal.svelte"
organisation.init()
apps.load()
let orgName let orgName
let orgLogo let orgLogo
let user let user
@ -32,7 +29,11 @@
user = { name: "John Doe" } user = { name: "John Doe" }
} }
onMount(getInfo) onMount(() => {
organisation.init()
apps.load()
getInfo()
})
let menu = [ let menu = [
{ title: "Apps", href: "/builder/portal/apps" }, { title: "Apps", href: "/builder/portal/apps" },

View File

@ -1,7 +0,0 @@
<script>
import { Page } from "@budibase/bbui"
</script>
<Page wide>
<slot />
</Page>

View File

@ -8,12 +8,15 @@
ButtonGroup, ButtonGroup,
Select, Select,
Modal, Modal,
Page,
} from "@budibase/bbui" } from "@budibase/bbui"
import AppList from "components/start/AppList.svelte" import AppGridView from "components/start/AppGridView.svelte"
import AppTableView from "components/start/AppTableView.svelte"
import CreateAppModal from "components/start/CreateAppModal.svelte" import CreateAppModal from "components/start/CreateAppModal.svelte"
import api from "builderStore/api" import api from "builderStore/api"
import analytics from "analytics" import analytics from "analytics"
import { onMount } from "svelte" import { onMount } from "svelte"
import { apps } from "stores/portal"
let layout = "grid" let layout = "grid"
let modal let modal
@ -32,42 +35,47 @@
modal.show() modal.show()
} }
onMount(checkKeys) onMount(() => {
checkKeys()
apps.load()
})
</script> </script>
<Layout noPadding> <Page wide>
<div class="title"> <Layout noPadding>
<Heading>Apps</Heading> <div class="title">
<ButtonGroup> <Heading>Apps</Heading>
<Button secondary on:click={initiateAppImport}>Import app</Button> <ButtonGroup>
<Button cta on:click={modal.show}>Create new app</Button> <Button secondary on:click={initiateAppImport}>Import app</Button>
</ButtonGroup> <Button cta on:click={modal.show}>Create new app</Button>
</div> </ButtonGroup>
<div class="filter">
<div class="select">
<Select quiet placeholder="Filter by groups" />
</div> </div>
<ActionGroup> <div class="filter">
<ActionButton <div class="select">
on:click={() => (layout = "grid")} <Select quiet placeholder="Filter by groups" />
selected={layout === "grid"} </div>
quiet <ActionGroup>
icon="ClassicGridView" <ActionButton
/> on:click={() => (layout = "grid")}
<ActionButton selected={layout === "grid"}
on:click={() => (layout = "table")} quiet
selected={layout === "table"} icon="ClassicGridView"
quiet />
icon="ViewRow" <ActionButton
/> on:click={() => (layout = "table")}
</ActionGroup> selected={layout === "table"}
</div> quiet
{#if layout === "grid"} icon="ViewRow"
<AppList /> />
{:else} </ActionGroup>
Table view. </div>
{/if} {#if layout === "grid"}
</Layout> <AppGridView />
{:else}
<AppTableView />
{/if}
</Layout>
</Page>
<Modal <Modal
bind:this={modal} bind:this={modal}
padding={false} padding={false}

View File

@ -1194,10 +1194,10 @@
estree-walker "^2.0.1" estree-walker "^2.0.1"
picomatch "^2.2.2" picomatch "^2.2.2"
"@roxi/routify@2.15.1": "@roxi/routify@2.18.0":
version "2.15.1" version "2.18.0"
resolved "https://registry.yarnpkg.com/@roxi/routify/-/routify-2.15.1.tgz#cbd5eafedfee7f04b154173dccd7474c177acb4f" resolved "https://registry.yarnpkg.com/@roxi/routify/-/routify-2.18.0.tgz#8f88bedd936312d0dbe44cbc11ab179b1f938ec2"
integrity sha512-IRdoaPSfP09EwWtB+tpbHgH6ejYtowale24rgfpxRQhFNyTUK4jYXclvx3XkUD1NSupSgl1kDAsWSiRSG0WvkQ== integrity sha512-MVB50HN+VQWLzfjLplcBjsSBvwOiExKOmht2DuWR3WQ60JxQi9pSejkB06tFVkFKNXz2X5iYtKDqKBTdae/gRg==
dependencies: dependencies:
"@roxi/ssr" "^0.2.1" "@roxi/ssr" "^0.2.1"
"@types/node" ">=4.2.0 < 13" "@types/node" ">=4.2.0 < 13"

View File

@ -38,7 +38,7 @@
"rollup-plugin-svelte": "^7.1.0", "rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-svg": "^2.0.0", "rollup-plugin-svg": "^2.0.0",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"svelte": "^3.37.0" "svelte": "^3.38.2"
}, },
"gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321" "gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321"
} }

View File

@ -127,7 +127,7 @@
"pouchdb-replication-stream": "1.2.9", "pouchdb-replication-stream": "1.2.9",
"sanitize-s3-objectkey": "0.0.1", "sanitize-s3-objectkey": "0.0.1",
"server-destroy": "1.0.1", "server-destroy": "1.0.1",
"svelte": "3.30.0", "svelte": "^3.38.2",
"tar-fs": "2.1.0", "tar-fs": "2.1.0",
"to-json-schema": "0.2.5", "to-json-schema": "0.2.5",
"uuid": "3.3.2", "uuid": "3.3.2",

View File

@ -8767,10 +8767,10 @@ supports-color@^7.1.0:
dependencies: dependencies:
has-flag "^4.0.0" has-flag "^4.0.0"
svelte@3.30.0: svelte@^3.38.2:
version "3.30.0" version "3.38.2"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.30.0.tgz#cbde341e96bf34f4ac73c8f14f8a014e03bfb7d6" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.38.2.tgz#55e5c681f793ae349b5cc2fe58e5782af4275ef5"
integrity sha512-z+hdIACb9TROGvJBQWcItMtlr4s0DBUgJss6qWrtFkOoIInkG+iAMo/FJZQFyDBQZc+dul2+TzYSi/tpTT5/Ag== integrity sha512-q5Dq0/QHh4BLJyEVWGe7Cej5NWs040LWjMbicBGZ+3qpFWJ1YObRmUDZKbbovddLC9WW7THTj3kYbTOFmU9fbg==
symbol-tree@^3.2.2: symbol-tree@^3.2.2:
version "3.2.4" version "3.2.4"

View File

@ -23,7 +23,7 @@
], ],
"devDependencies": { "devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.5", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.5",
"svelte": "^3.37.0", "svelte": "^3.38.2",
"vite": "^2.1.5" "vite": "^2.1.5"
}, },
"keywords": [ "keywords": [