|
|
|
|
@ -28,6 +28,7 @@ export class Header extends HTMLElement {
|
|
|
|
|
htmlCss: 'HTML/CSS',
|
|
|
|
|
singleFile: 'Single File',
|
|
|
|
|
newPage: 'New Page',
|
|
|
|
|
go: 'Go',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
textEs = {
|
|
|
|
|
@ -40,6 +41,7 @@ export class Header extends HTMLElement {
|
|
|
|
|
htmlCss: 'HTML/CSS',
|
|
|
|
|
singleFile: 'Archivo único',
|
|
|
|
|
newPage: 'Nueva Página',
|
|
|
|
|
go: 'Ir',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
|
@ -186,6 +188,13 @@ export class Header extends HTMLElement {
|
|
|
|
|
this.menu.addEventListener('close-menu', () => {
|
|
|
|
|
this.close()
|
|
|
|
|
})
|
|
|
|
|
this.menu.addEventListener(
|
|
|
|
|
'click-location',
|
|
|
|
|
() => {
|
|
|
|
|
this.close()
|
|
|
|
|
this.navPage()
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addPageMenu() {
|
|
|
|
|
@ -196,6 +205,7 @@ export class Header extends HTMLElement {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openNav() {
|
|
|
|
|
this.menu.location = this.path
|
|
|
|
|
this.menu.pages = this.getPages()
|
|
|
|
|
this.menu.storageUse = this.getStorageUse()
|
|
|
|
|
this.menuPanel.classList.add('open')
|
|
|
|
|
@ -319,6 +329,30 @@ export class Header extends HTMLElement {
|
|
|
|
|
dialog.open()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
navPage() {
|
|
|
|
|
const dialog = document.createElement('m-dialog')
|
|
|
|
|
this.dialogWrap.replaceChildren(dialog)
|
|
|
|
|
const input = document.createElement('input')
|
|
|
|
|
input.value = this.path
|
|
|
|
|
input.style.minWidth = '300px'
|
|
|
|
|
dialog.bodyEl.appendChild(input)
|
|
|
|
|
const bGroup = document.createElement(
|
|
|
|
|
'm-forms-button-group'
|
|
|
|
|
)
|
|
|
|
|
bGroup.addPrimary(this.text.go, () => {
|
|
|
|
|
dialog.close()
|
|
|
|
|
location.hash = (
|
|
|
|
|
input.value.startsWith('/') ?
|
|
|
|
|
input.value : '/'
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
bGroup.addCancel(this.text.cancel, () => {
|
|
|
|
|
dialog.close()
|
|
|
|
|
})
|
|
|
|
|
dialog.footerEl.appendChild(bGroup)
|
|
|
|
|
dialog.open()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get language() {
|
|
|
|
|
return this._language
|
|
|
|
|
}
|
|
|
|
|
|