1
0
Fork 0
mirror of synced 2024-06-29 03:20:34 +12:00

Prefix builder URLs with 'builder' in both routify and vite to lay groundwork for server proxying

This commit is contained in:
Andrew Kingston 2021-03-31 19:27:52 +01:00
parent db0e234858
commit 80f819255d
38 changed files with 10 additions and 116 deletions

View file

@ -11,7 +11,7 @@
const id = $params.application
await del(`/api/applications/${id}`)
loading = false
$goto("/")
$goto("/builder/")
}
</script>

View file

@ -31,7 +31,11 @@
<Heading small black>{name}</Heading>
<Spacer medium />
<div class="card-footer" data-cy={`app-${name}`}>
<TextButton text medium blue href="/{_id}">Open {name}</TextButton>
<TextButton text medium blue href="/builder/{_id}">
Open
{name}
</TextButton>
{#if appExportLoading}
<Spinner size="10" />
{:else}<i class="ri-folder-download-line" on:click={exportApp} />{/if}

View file

@ -167,7 +167,7 @@
}
const userResp = await api.post(`/api/users`, user)
const json = await userResp.json()
$goto(`/${appJson._id}`)
$goto(`./${appJson._id}`)
} catch (error) {
console.error(error)
notifier.danger(error)

View file

@ -51,7 +51,7 @@
<img
src="/assets/bb-logo.svg"
alt="budibase icon"
on:click={() => $goto(`/`)} />
on:click={() => $goto(`/builder/`)} />
</button>
<!-- This gets all indexable subroutes and sticks them in the top nav. -->

View file

@ -56,7 +56,7 @@
<div class="container">
<div class="header">
<Heading medium black>Welcome to the Budibase Beta 123</Heading>
<Heading medium black>Welcome to the Budibase Beta</Heading>
<div class="button-group">
<Button secondary on:click={initiateAppImport}>Import Web App</Button>
<Spacer medium />

View file

@ -1,111 +0,0 @@
export const componentsAndScreens = () => ({
components: [
{
_instanceName: "TextBox",
tags: ["Text", "input"],
children: false,
props: {
size: { type: "options", options: ["small", "medium", "large"] },
isPassword: "bool",
placeholder: "string",
label: "string",
},
},
{
_instanceName: "Button",
tags: ["input"],
children: true,
props: {
size: { type: "options", options: ["small", "medium", "large"] },
css: "string",
contentText: "string",
},
},
{
_instanceName: "div",
tags: ["input"],
props: {
width: "number",
},
},
{
_instanceName: "Row View",
tags: ["row"],
props: {
data: "state",
},
},
],
screens: [
{
props: {
_component: "budibase-components/TextBox",
_instanceName: "SmallTextbox",
size: "small",
},
},
{
name: "common/PasswordBox",
tags: ["mask"],
props: {
_component: "budibase-components/TextBox",
_instanceName: "PasswordBox",
isPassword: true,
size: "small",
},
},
{
props: {
_component: "budibase-components/Button",
_instanceName: "PrimaryButton",
css: "btn-primary",
},
},
{
route: "",
props: {
_component: "budibase-components/div",
width: 100,
_instanceName: "Screen 1",
_children: [
{
_component: "budibase-components/Button",
contentText: "Button 1",
_instanceName: "Button 1",
},
{
_component: "budibase-components/Button",
contentText: "Button 2",
_instanceName: "Button 2",
},
{
_component: "budibase-components/TextBox",
_instanceName: "TextBox",
isPassword: true,
size: "small",
},
],
},
},
{
props: {
_component: "budibase-components/div",
_instanceName: "Field",
_children: [
{
_component: "common/SmallTextbox",
},
],
},
},
],
})
export const stripStandardProps = props => {
delete props._id
delete props._styles
}

View file

@ -6,6 +6,7 @@ import path from "path"
export default ({ mode }) => {
const isProduction = mode === "production"
return {
base: "/builder/",
build: {
minify: isProduction,
},