Merge branch 'master' of github.com:Budibase/budibase
This commit is contained in:
commit
733cc99bd7
|
@ -5,3 +5,4 @@ package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
release/
|
release/
|
||||||
dist/
|
dist/
|
||||||
|
routify
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "routify --routify-dir routify -b && rollup -c",
|
||||||
"start": "routify -c rollup",
|
"start": "routify --routify-dir routify -c rollup",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watchAll",
|
"test:watch": "jest --watchAll",
|
||||||
"dev:builder": "routify -c rollup",
|
"dev:builder": "routify --routify-dir routify -c rollup",
|
||||||
"rollup": "rollup -c -w"
|
"rollup": "rollup -c -w"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
"@rollup/plugin-alias": "^3.0.1",
|
"@rollup/plugin-alias": "^3.0.1",
|
||||||
"@rollup/plugin-json": "^4.0.3",
|
"@rollup/plugin-json": "^4.0.3",
|
||||||
"@sveltech/routify": "1.5.0-beta.40",
|
"@sveltech/routify": "1.7.11",
|
||||||
"babel-jest": "^24.8.0",
|
"babel-jest": "^24.8.0",
|
||||||
"browser-sync": "^2.26.7",
|
"browser-sync": "^2.26.7",
|
||||||
"http-proxy-middleware": "^0.19.1",
|
"http-proxy-middleware": "^0.19.1",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import Modal from "svelte-simple-modal"
|
import Modal from "svelte-simple-modal"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import { Router, basepath } from "@sveltech/routify"
|
import { Router, basepath } from "@sveltech/routify"
|
||||||
import { routes } from "@sveltech/routify/tmp/routes"
|
import { routes } from "../routify/routes"
|
||||||
import { store, initialise } from "builderStore"
|
import { store, initialise } from "builderStore"
|
||||||
import AppNotification, {
|
import AppNotification, {
|
||||||
showAppNotification,
|
showAppNotification,
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
<link rel='stylesheet' href='/_builder/bundle.css'>
|
<link rel='stylesheet' href='/_builder/bundle.css'>
|
||||||
<link rel='stylesheet' href='/_builder/fonts.css'>
|
<link rel='stylesheet' href='/_builder/fonts.css'>
|
||||||
<link rel='stylesheet' href="/_builder/uikit.min.css">
|
<link rel='stylesheet' href="/_builder/uikit.min.css">
|
||||||
<link rel='stylesheet' href="/_builder/nano.min.css">
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="app">
|
<body id="app">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
|
|
||||||
import { fade } from "svelte/transition"
|
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 { SettingsIcon, PreviewIcon } from "components/common/Icons/"
|
||||||
import IconButton from "components/common/IconButton.svelte"
|
import IconButton from "components/common/IconButton.svelte"
|
||||||
|
@ -23,8 +23,6 @@
|
||||||
throw new Error(pkg)
|
throw new Error(pkg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$: ({ component } = $context)
|
|
||||||
$: list = component.parent.children.filter(child => child.isIndexable)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root">
|
||||||
|
@ -38,12 +36,12 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- This gets all indexable subroutes and sticks them in the top nav. -->
|
<!-- 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
|
<span
|
||||||
class:active={$isActive(path)}
|
class:active={$isActive(path)}
|
||||||
class="topnavitem"
|
class="topnavitem"
|
||||||
on:click={() => $goto(path)}>
|
on:click={() => $goto(path)}>
|
||||||
{prettyName}
|
{title}
|
||||||
</span>
|
</span>
|
||||||
{/each}
|
{/each}
|
||||||
<!-- <IconButton icon="home"
|
<!-- <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