tidy up
This commit is contained in:
parent
0a5eac2c7f
commit
a093297a4e
|
@ -1185,7 +1185,6 @@ export default {
|
||||||
settings: [{ label: "Logo URL", key: "logoUrl", control: Input }],
|
settings: [{ label: "Logo URL", key: "logoUrl", control: Input }],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// TODO: need to deal with this
|
|
||||||
{
|
{
|
||||||
name: "Login",
|
name: "Login",
|
||||||
_component: "@budibase/standard-components/login",
|
_component: "@budibase/standard-components/login",
|
||||||
|
|
|
@ -9,18 +9,15 @@
|
||||||
const validLayout = $store.layouts.some(layout => layout._id === currentLayoutId)
|
const validLayout = $store.layouts.some(layout => layout._id === currentLayoutId)
|
||||||
|
|
||||||
if (!validLayout) {
|
if (!validLayout) {
|
||||||
// Go to main layout if URL set to invalid screen
|
const firstLayoutId = $store.layouts[0]?._id
|
||||||
console.error("Invalid screen", $params.screen)
|
|
||||||
const firstScreenId = $store.layouts[0]?._id
|
|
||||||
store.actions.layouts.select($params.layout)
|
store.actions.layouts.select($params.layout)
|
||||||
$goto(`./${firstScreenId}`)
|
$goto(`./${firstLayoutId}`)
|
||||||
} else {
|
} else {
|
||||||
// Otherwise proceed to set layout
|
// Otherwise proceed to set layout
|
||||||
store.actions.layouts.select($params.layout)
|
store.actions.layouts.select($params.layout)
|
||||||
|
|
||||||
// There are leftover stuff, like IDs, so navigate the components and find the ID and select it.
|
// There are leftover stuff, like IDs, so navigate the components and find the ID and select it.
|
||||||
if ($leftover) {
|
if ($leftover) {
|
||||||
console.log("leftover", $params.layout)
|
|
||||||
// Get the correct layout children.
|
// Get the correct layout children.
|
||||||
const layoutChildren = $store.layouts.find(
|
const layoutChildren = $store.layouts.find(
|
||||||
layout =>
|
layout =>
|
||||||
|
|
Loading…
Reference in New Issue