Merge branch 'master' of github.com:Budibase/budibase
This commit is contained in:
commit
733cc99bd7
|
@ -5,3 +5,4 @@ package-lock.json
|
|||
yarn.lock
|
||||
release/
|
||||
dist/
|
||||
routify
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"start": "routify -c rollup",
|
||||
"build": "routify --routify-dir routify -b && rollup -c",
|
||||
"start": "routify --routify-dir routify -c rollup",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watchAll",
|
||||
"dev:builder": "routify -c rollup",
|
||||
"dev:builder": "routify --routify-dir routify -c rollup",
|
||||
"rollup": "rollup -c -w"
|
||||
},
|
||||
"jest": {
|
||||
|
@ -60,7 +60,7 @@
|
|||
"@babel/runtime": "^7.5.5",
|
||||
"@rollup/plugin-alias": "^3.0.1",
|
||||
"@rollup/plugin-json": "^4.0.3",
|
||||
"@sveltech/routify": "1.5.0-beta.40",
|
||||
"@sveltech/routify": "1.7.11",
|
||||
"babel-jest": "^24.8.0",
|
||||
"browser-sync": "^2.26.7",
|
||||
"http-proxy-middleware": "^0.19.1",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Modal from "svelte-simple-modal"
|
||||
import { onMount } from "svelte"
|
||||
import { Router, basepath } from "@sveltech/routify"
|
||||
import { routes } from "@sveltech/routify/tmp/routes"
|
||||
import { routes } from "../routify/routes"
|
||||
import { store, initialise } from "builderStore"
|
||||
import AppNotification, {
|
||||
showAppNotification,
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
<link rel='stylesheet' href='/_builder/bundle.css'>
|
||||
<link rel='stylesheet' href='/_builder/fonts.css'>
|
||||
<link rel='stylesheet' href="/_builder/uikit.min.css">
|
||||
<link rel='stylesheet' href="/_builder/nano.min.css">
|
||||
</head>
|
||||
|
||||
<body id="app">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { store } from "builderStore"
|
||||
|
||||
import { fade } from "svelte/transition"
|
||||
import { isActive, goto, context } from "@sveltech/routify"
|
||||
import { isActive, goto, layout } from "@sveltech/routify"
|
||||
|
||||
import { SettingsIcon, PreviewIcon } from "components/common/Icons/"
|
||||
import IconButton from "components/common/IconButton.svelte"
|
||||
|
@ -23,8 +23,6 @@
|
|||
throw new Error(pkg)
|
||||
}
|
||||
}
|
||||
$: ({ component } = $context)
|
||||
$: list = component.parent.children.filter(child => child.isIndexable)
|
||||
</script>
|
||||
|
||||
<div class="root">
|
||||
|
@ -38,12 +36,12 @@
|
|||
</button>
|
||||
|
||||
<!-- This gets all indexable subroutes and sticks them in the top nav. -->
|
||||
{#each list as { path, prettyName, children, meta }}
|
||||
{#each $layout.children as { path, title }}
|
||||
<span
|
||||
class:active={$isActive(path)}
|
||||
class="topnavitem"
|
||||
on:click={() => $goto(path)}>
|
||||
{prettyName}
|
||||
{title}
|
||||
</span>
|
||||
{/each}
|
||||
<!-- <IconButton icon="home"
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
<script>
|
||||
import { store } from "builderStore"
|
||||
import AppList from "components/start/AppList.svelte"
|
||||
import { onMount } from "svelte"
|
||||
import IconButton from "components/common/IconButton.svelte"
|
||||
import Spinner from "components/common/Spinner.svelte"
|
||||
|
||||
let promise = getApps()
|
||||
|
||||
async function getApps() {
|
||||
const res = await fetch(`/api/applications`)
|
||||
const json = await res.json()
|
||||
|
||||
if (res.ok) {
|
||||
return json
|
||||
} else {
|
||||
throw new Error(json)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<main>
|
||||
{#await promise}
|
||||
<div class="spinner-container">
|
||||
<Spinner />
|
||||
</div>
|
||||
{:then result}
|
||||
<AppList apps={result} />
|
||||
{:catch err}
|
||||
<h1 style="color:red">{err}</h1>
|
||||
{/await}
|
||||
</main>
|
||||
|
||||
<style>
|
||||
main {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-family: "Roboto", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.spinner-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue