Simply navigation URLs

This commit is contained in:
Andrew Kingston 2023-08-23 15:28:23 +01:00
parent 38044cdaea
commit 80e622d2e0
4 changed files with 8 additions and 8 deletions

View File

@ -121,7 +121,7 @@
type: "Screen",
name: screen.routing.route,
icon: "WebPage",
action: () => $goto(`./design/${screen._id}/components`),
action: () => $goto(`./design/${screen._id}`),
})),
...($automationStore?.automations?.map(automation => ({
type: "Automation",

View File

@ -207,10 +207,10 @@
}
const toggleAddComponent = () => {
if ($isActive(`./${selectedComponentId}/new`)) {
$goto(`./${selectedComponentId}`)
if ($isActive(`./:componentId/new`)) {
$goto(`./:componentId`)
} else {
$goto(`./${selectedComponentId}/new`)
$goto(`./:componentId/new`)
}
}

View File

@ -36,7 +36,7 @@
confirmEjectDialog.show()
},
["Ctrl+Enter"]: () => {
$goto(`./${$store.selectedComponentId}/new`)
$goto(`./:componentId/new`)
},
["Delete"]: component => {
// Don't show confirmation for the screen itself

View File

@ -14,10 +14,10 @@
let scrolling = false
const toNewComponentRoute = () => {
if ($isActive(`./${$store.selectedComponentId}/new`)) {
$goto(`./${$store.selectedComponentId}`)
if ($isActive(`./:componentId/new`)) {
$goto(`./:componentId`)
} else {
$goto(`./${$store.selectedComponentId}/new`)
$goto(`./:componentId/new`)
}
}