add the app url input on the first setup page

This commit is contained in:
Alex Turchyn
2023-06-20 23:42:56 +03:00
parent 4977ee429c
commit 0ac30a5fc0
14 changed files with 93 additions and 11 deletions
+2
View File
@@ -11,6 +11,7 @@ import ClipboardCopy from './elements/clipboard_copy'
import TemplateBuilder from './template_builder/builder'
import DynamicList from './elements/dynamic_list'
import DownloadButton from './elements/download_button'
import SetOriginUrl from './elements/set_origin_url'
document.addEventListener('turbo:before-cache', () => {
window.flash?.remove()
@@ -30,6 +31,7 @@ window.customElements.define('menu-active', MenuActive)
window.customElements.define('clipboard-copy', ClipboardCopy)
window.customElements.define('dynamic-list', DynamicList)
window.customElements.define('download-button', DownloadButton)
window.customElements.define('set-origin-url', SetOriginUrl)
window.customElements.define('template-builder', class extends HTMLElement {
connectedCallback () {
@@ -0,0 +1,7 @@
export default class extends HTMLElement {
connectedCallback () {
if (this.dataset.inputId) {
document.getElementById(this.dataset.inputId).value = document.location.origin
}
}
}