Merge branch 'master' of https://github.com/Budibase/budibase into property-panel/colorpicker
This commit is contained in:
commit
c00b572e22
|
@ -39,8 +39,9 @@
|
||||||
|
|
||||||
let panelDefinition = {}
|
let panelDefinition = {}
|
||||||
|
|
||||||
$: panelDefinition = componentPropDefinition.properties &&
|
$: panelDefinition =
|
||||||
componentPropDefinition.properties[selectedCategory.value]
|
componentPropDefinition.properties &&
|
||||||
|
componentPropDefinition.properties[selectedCategory.value]
|
||||||
|
|
||||||
const onStyleChanged = store.setComponentStyle
|
const onStyleChanged = store.setComponentStyle
|
||||||
const onPropChanged = store.setComponentProp
|
const onPropChanged = store.setComponentProp
|
||||||
|
@ -88,7 +89,7 @@
|
||||||
{panelDefinition}
|
{panelDefinition}
|
||||||
onChange={onPropChanged}
|
onChange={onPropChanged}
|
||||||
onScreenPropChange={store.setPageOrScreenProp}
|
onScreenPropChange={store.setPageOrScreenProp}
|
||||||
screenOrPageInstance={$store.currentView !== "component" && $store.currentPreviewItem} />
|
screenOrPageInstance={$store.currentView !== 'component' && $store.currentPreviewItem} />
|
||||||
{:else if selectedCategory.value === 'events'}
|
{:else if selectedCategory.value === 'events'}
|
||||||
<EventsEditor component={componentInstance} />
|
<EventsEditor component={componentInstance} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
data.target ? onChange(key, data.target.value) : onChange(key, data)
|
data.target ? onChange(key, data.target.value) : onChange(key, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleScreenPropChange (name, value) {
|
function handleScreenPropChange(name, value) {
|
||||||
onScreenPropChange(name,value)
|
onScreenPropChange(name, value)
|
||||||
if(!isPage && name === "name") {
|
if (!isPage && name === "name") {
|
||||||
// screen name is changed... change URL
|
// screen name is changed... change URL
|
||||||
$goto(`./:page/${value}`)
|
$goto(`./:page/${value}`)
|
||||||
}
|
}
|
||||||
|
@ -40,20 +40,19 @@
|
||||||
|
|
||||||
$: isPage = screenOrPageInstance && screenOrPageInstance.favicon
|
$: isPage = screenOrPageInstance && screenOrPageInstance.favicon
|
||||||
$: screenOrPageDefinition = isPage ? pageDefinition : screenDefinition
|
$: screenOrPageDefinition = isPage ? pageDefinition : screenDefinition
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if screenOrPageInstance}
|
{#if screenOrPageInstance}
|
||||||
{#each screenOrPageDefinition as def}
|
{#each screenOrPageDefinition as def}
|
||||||
<PropertyControl
|
<PropertyControl
|
||||||
control={def.control}
|
control={def.control}
|
||||||
label={def.label}
|
label={def.label}
|
||||||
key={def.key}
|
key={def.key}
|
||||||
value={screenOrPageInstance[def.key]}
|
value={screenOrPageInstance[def.key]}
|
||||||
onChange={handleScreenPropChange}
|
onChange={handleScreenPropChange}
|
||||||
props={{ ...excludeProps(def, ['control', 'label']) }} />
|
props={{ ...excludeProps(def, ['control', 'label']) }} />
|
||||||
{/each}
|
{/each}
|
||||||
<hr/>
|
<hr />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if panelDefinition && panelDefinition.length > 0}
|
{#if panelDefinition && panelDefinition.length > 0}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
FROM node:12-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy files and install dependencies
|
||||||
|
COPY . ./
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
|
EXPOSE 4001
|
||||||
|
|
||||||
|
CMD ["yarn", "run:docker"]
|
|
@ -27,6 +27,7 @@
|
||||||
"test:integration": "jest workflow --runInBand",
|
"test:integration": "jest workflow --runInBand",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"initialise": "node ../cli/bin/budi init -b local -q",
|
"initialise": "node ../cli/bin/budi init -b local -q",
|
||||||
|
"run:docker": "node src/index",
|
||||||
"budi": "node ../cli/bin/budi",
|
"budi": "node ../cli/bin/budi",
|
||||||
"dev:builder": "nodemon ../cli/bin/budi run",
|
"dev:builder": "nodemon ../cli/bin/budi run",
|
||||||
"electron": "electron src/electron.js",
|
"electron": "electron src/electron.js",
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
const { resolve } = require("path")
|
||||||
|
|
||||||
|
async function runServer() {
|
||||||
|
const budibaseDir = "~/.budibase"
|
||||||
|
|
||||||
|
process.env.BUDIBASE_DIR = resolve(budibaseDir)
|
||||||
|
|
||||||
|
const server = await require("./app")()
|
||||||
|
server.on("close", () => console.log("Server Closed"))
|
||||||
|
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
runServer()
|
Loading…
Reference in New Issue