Add icons and titles to studio accordeons

This commit is contained in:
Pieter Vander Vennet 2024-06-26 11:57:18 +02:00
parent c66e836cac
commit 5628e66dce
30 changed files with 197 additions and 128 deletions

View file

@ -183,18 +183,18 @@
state = "editing_layer"
}
async function selectStateBasedOnHash() {
async function selectStateBasedOnHash(uid: number) {
const hash = Hash.hash.data
if (!hash) {
return
}
console.log("Selecting state based on ", hash)
console.log("Selecting state based on ", hash, uid)
const [mode, id, tab] = hash.split("/")
// Not really an event, we just set the 'detail'
const event = {
detail: {
id,
owner: uid.data,
owner: uid,
},
}
const statePromise: Promise<EditJsonState<any>> =
@ -203,7 +203,9 @@
state.selectedTab.setData(Number(tab))
}
selectStateBasedOnHash()
uid.AsPromise().then(
uid => selectStateBasedOnHash(uid)
)
function backToStudio() {
console.log("Back to studio")