Disable new screens settings when viewing an old screen and correctly upgrade all screen settings when detaching from custom layouts
This commit is contained in:
parent
c8c9a05658
commit
7f4b3e4bf8
|
@ -290,12 +290,8 @@ export const getFrontendStore = () => {
|
||||||
// Pull relevant settings from old layout, if required
|
// Pull relevant settings from old layout, if required
|
||||||
const layout = get(store).layouts.find(x => x._id === screen.layoutId)
|
const layout = get(store).layouts.find(x => x._id === screen.layoutId)
|
||||||
screen.layoutId = null
|
screen.layoutId = null
|
||||||
if (screen.showNavigation == null) {
|
screen.showNavigation = layout?.props.navigation !== "None"
|
||||||
screen.showNavigation = layout?.props.navigation !== "None"
|
screen.width = layout?.props.width || "Large"
|
||||||
}
|
|
||||||
if (screen.width == null) {
|
|
||||||
screen.width = layout?.props.width || "Large"
|
|
||||||
}
|
|
||||||
await store.actions.screens.save(screen)
|
await store.actions.screens.save(screen)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const screenSettings = [
|
$: screenSettings = [
|
||||||
{
|
{
|
||||||
key: "routing.homeScreen",
|
key: "routing.homeScreen",
|
||||||
control: Checkbox,
|
control: Checkbox,
|
||||||
|
@ -134,6 +134,7 @@
|
||||||
control: Toggle,
|
control: Toggle,
|
||||||
props: {
|
props: {
|
||||||
text: "Show navigation",
|
text: "Show navigation",
|
||||||
|
disabled: !!$selectedScreen.layoutId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -143,6 +144,7 @@
|
||||||
props: {
|
props: {
|
||||||
options: ["Extra small", "Small", "Medium", "Large", "Max"],
|
options: ["Extra small", "Small", "Medium", "Large", "Max"],
|
||||||
placeholder: "Default",
|
placeholder: "Default",
|
||||||
|
disabled: !!$selectedScreen.layoutId,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue