1
0
Fork 0
mirror of synced 2024-07-08 07:46:10 +12:00

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:
Andrew Kingston 2022-05-16 08:48:03 +01:00
parent b488293e92
commit 47631a47e7
2 changed files with 5 additions and 7 deletions

View file

@ -290,12 +290,8 @@ export const getFrontendStore = () => {
// Pull relevant settings from old layout, if required
const layout = get(store).layouts.find(x => x._id === screen.layoutId)
screen.layoutId = null
if (screen.showNavigation == null) {
screen.showNavigation = layout?.props.navigation !== "None"
}
if (screen.width == null) {
screen.width = layout?.props.width || "Large"
}
screen.showNavigation = layout?.props.navigation !== "None"
screen.width = layout?.props.width || "Large"
await store.actions.screens.save(screen)
},
},

View file

@ -90,7 +90,7 @@
}
}
const screenSettings = [
$: screenSettings = [
{
key: "routing.homeScreen",
control: Checkbox,
@ -134,6 +134,7 @@
control: Toggle,
props: {
text: "Show navigation",
disabled: !!$selectedScreen.layoutId,
},
},
{
@ -143,6 +144,7 @@
props: {
options: ["Extra small", "Small", "Medium", "Large", "Max"],
placeholder: "Default",
disabled: !!$selectedScreen.layoutId,
},
},
]