This commit is contained in:
Martin McKeaveney 2020-12-07 15:49:13 +00:00
parent 81fe27f8f3
commit b4fad77aae
8 changed files with 11 additions and 23 deletions

View File

@ -25,9 +25,7 @@
screen = screenPlaceholder screen = screenPlaceholder
} else { } else {
screen = $currentAsset screen = $currentAsset
layout = $store.layouts.find( layout = $store.layouts.find(layout => layout._id === screen?.layoutId)
layout => layout._id === screen?.layoutId
)
} }
} }
$: selectedComponentId = $store.selectedComponentId ?? "" $: selectedComponentId = $store.selectedComponentId ?? ""

View File

@ -39,13 +39,9 @@
class="category" class="category"
on:click={() => onCategoryChosen(category, idx)} on:click={() => onCategoryChosen(category, idx)}
class:active={idx === selectedIndex}> class:active={idx === selectedIndex}>
{#if category.icon} {#if category.icon}<i class={category.icon} />{/if}
<i class={category.icon} />
{/if}
<span>{category.name}</span> <span>{category.name}</span>
{#if category.isCategory} {#if category.isCategory}<i class="ri-arrow-down-s-line arrow" />{/if}
<i class="ri-arrow-down-s-line arrow" />
{/if}
</div> </div>
{/each} {/each}
</div> </div>

View File

@ -32,9 +32,7 @@
{ key: "layoutId", label: "Layout", control: LayoutSelect }, { key: "layoutId", label: "Layout", control: LayoutSelect },
] ]
const layoutDefinition = [ const layoutDefinition = [{ key: "title", label: "Title", control: Input }]
{ key: "title", label: "Title", control: Input }
]
const canRenderControl = (key, dependsOn) => { const canRenderControl = (key, dependsOn) => {
let test = !isEmpty(componentInstance[dependsOn]) let test = !isEmpty(componentInstance[dependsOn])

View File

@ -6,12 +6,12 @@
// Go to first layout // Go to first layout
if ($params.assetType === FrontendTypes.LAYOUT) { if ($params.assetType === FrontendTypes.LAYOUT) {
$goto(`../${$store.layouts[0]?._id}`) $goto(`../${$store.layouts[0]?._id}`)
} }
// Go to first screen // Go to first screen
if ($params.assetType === FrontendTypes.SCREEN) { if ($params.assetType === FrontendTypes.SCREEN) {
$goto(`../${$allScreens[0]?._id}`) $goto(`../${$allScreens[0]?._id}`)
} }
</script> </script>
<!-- routify:options index=false --> <!-- routify:options index=false -->

View File

@ -243,5 +243,5 @@ const BASE_LAYOUTS = [
module.exports = { module.exports = {
BASE_LAYOUTS, BASE_LAYOUTS,
BASE_LAYOUT_PROP_IDS, BASE_LAYOUT_PROP_IDS,
EMPTY_LAYOUT EMPTY_LAYOUT,
} }

View File

@ -1,12 +1,11 @@
const { BUILTIN_ROLE_IDS } = require("../utilities/security/roles") const { BUILTIN_ROLE_IDS } = require("../utilities/security/roles")
const { BASE_LAYOUT_PROP_IDS } = require("./layouts") const { BASE_LAYOUT_PROP_IDS } = require("./layouts")
exports.createHomeScreen = app => ({ exports.createHomeScreen = () => ({
description: "", description: "",
url: "", url: "",
layoutId: BASE_LAYOUT_PROP_IDS.PRIVATE, layoutId: BASE_LAYOUT_PROP_IDS.PRIVATE,
props: { props: {
_instanceName: "HomeScreenContainer",
_id: "d834fea2-1b3e-4320-ab34-f9009f5ecc59", _id: "d834fea2-1b3e-4320-ab34-f9009f5ecc59",
_component: "@budibase/standard-components/container", _component: "@budibase/standard-components/container",
_styles: { _styles: {

View File

@ -1,3 +0,0 @@
class Integration {
constructor() {}
}

View File

@ -26,9 +26,9 @@ export default {
}), }),
resolve({ resolve({
browser: true, browser: true,
skip: externals skip: externals,
}), }),
commonjs(), commonjs(),
json() json(),
], ],
} }