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

View File

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

View File

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

View File

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