Prefix builder URLs with 'builder' in both routify and vite to lay groundwork for server proxying
This commit is contained in:
parent
db0e234858
commit
80f819255d
|
@ -11,7 +11,7 @@
|
|||
const id = $params.application
|
||||
await del(`/api/applications/${id}`)
|
||||
loading = false
|
||||
$goto("/")
|
||||
$goto("/builder/")
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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. -->
|
|
@ -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 />
|
|
@ -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
|
||||
}
|
|
@ -6,6 +6,7 @@ import path from "path"
|
|||
export default ({ mode }) => {
|
||||
const isProduction = mode === "production"
|
||||
return {
|
||||
base: "/builder/",
|
||||
build: {
|
||||
minify: isProduction,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue