Toggle editing

file-group-page
bat 3 years ago
parent 5ae07be15d
commit d597db2258

@ -3,6 +3,12 @@ export class Layout extends HTMLElement {
super()
this.attachShadow({mode: 'open'})
this.header = document.createElement('m-header')
this.editing = false
this.header.editing = this.editing
this.header.addEventListener('click-edit', () => {
this.editing = !this.editing
this.header.editing = this.editing
})
this.shadowRoot.appendChild(this.header)
this.load()
addEventListener('hashchange', () => {
@ -39,9 +45,6 @@ export class Layout extends HTMLElement {
}
get path() {
return new URL(
window.location.hash.slice(1) || '/',
window.location
).pathname
return '/hello'
}
}
Loading…
Cancel
Save