WIP.
This commit is contained in:
parent
9f9643ac89
commit
e9ad38afe6
@ -27,6 +27,17 @@ async function shareChatUrl (registerOptions: RegisterOptions, settings: any, vi
|
|||||||
function renderContent (container: HTMLElement): void {
|
function renderContent (container: HTMLElement): void {
|
||||||
if (!form) {
|
if (!form) {
|
||||||
container.childNodes.forEach(child => container.removeChild(child))
|
container.childNodes.forEach(child => container.removeChild(child))
|
||||||
|
|
||||||
|
const pUrl = document.createElement('p')
|
||||||
|
const url = document.createElement('input')
|
||||||
|
url.setAttribute('type', 'text')
|
||||||
|
url.setAttribute('readonly', '')
|
||||||
|
url.setAttribute('autocomplete', 'off')
|
||||||
|
url.setAttribute('placeholder', '')
|
||||||
|
url.classList.add('form-control', 'readonly')
|
||||||
|
pUrl.append(url)
|
||||||
|
container.append(pUrl)
|
||||||
|
|
||||||
const pTips = document.createElement('p')
|
const pTips = document.createElement('p')
|
||||||
pTips.textContent = tipsOBS
|
pTips.textContent = tipsOBS
|
||||||
container.append(pTips)
|
container.append(pTips)
|
||||||
@ -40,16 +51,6 @@ async function shareChatUrl (registerOptions: RegisterOptions, settings: any, vi
|
|||||||
readonlyLabelEl.prepend(readonly)
|
readonlyLabelEl.prepend(readonly)
|
||||||
pReadonly.append(readonlyLabelEl)
|
pReadonly.append(readonlyLabelEl)
|
||||||
|
|
||||||
const pUrl = document.createElement('p')
|
|
||||||
container.append(pUrl)
|
|
||||||
const url = document.createElement('input')
|
|
||||||
url.setAttribute('type', 'text')
|
|
||||||
url.setAttribute('readonly', '')
|
|
||||||
url.setAttribute('autocomplete', 'off')
|
|
||||||
url.setAttribute('placeholder', '')
|
|
||||||
url.classList.add('form-control', 'readonly')
|
|
||||||
pUrl.append(url)
|
|
||||||
|
|
||||||
readonly.onclick = () => {
|
readonly.onclick = () => {
|
||||||
renderContent(container)
|
renderContent(container)
|
||||||
}
|
}
|
||||||
@ -61,6 +62,8 @@ async function shareChatUrl (registerOptions: RegisterOptions, settings: any, vi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: save last form state, to restore each time the modal is opened.
|
// TODO: save last form state, to restore each time the modal is opened.
|
||||||
|
// TODO: check when the feature should be available
|
||||||
|
// TODO: check the theme? some of the options should only be available in some cases.
|
||||||
|
|
||||||
const uriOptions: UriOptions = {
|
const uriOptions: UriOptions = {
|
||||||
ignoreAutoColors: true,
|
ignoreAutoColors: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user