1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

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`)
}
}