Builtin Prosody, Share chat url: ability to show/hide the scrollbar in readonly mode.

This commit is contained in:
John Livingston
2022-01-04 17:42:03 +01:00
parent 7db4d355fb
commit 04b1945239
16 changed files with 70 additions and 8 deletions

View File

@ -82,7 +82,8 @@ interface InitConverseParams {
websocketServiceUrl: string
authenticationUrl: string
advancedControls: boolean
forceReadonly: boolean
forceReadonly: boolean | 'noscroll'
noScroll: boolean
theme: string
}
window.initConverse = async function initConverse ({
@ -108,6 +109,9 @@ window.initConverse = async function initConverse ({
}
if (forceReadonly) {
body?.classList.add('livechat-readonly')
if (forceReadonly === 'noscroll') {
body?.classList.add('livechat-noscroll')
}
}
const params: any = {

View File

@ -25,3 +25,7 @@ body.livechat-readonly #conversejs {
display: none !important;
}
}
body.livechat-readonly.livechat-noscroll converse-chat-content {
overflow-y: hidden !important;
}

View File

@ -23,7 +23,7 @@
authenticationUrl: '{{AUTHENTICATION_URL}}',
advancedControls: '{{ADVANCEDCONTROLS}}' === 'true',
theme: '{{CONVERSEJS_THEME}}',
forceReadonly: '{{FORCEREADONLY}}' === 'true'
forceReadonly: '{{FORCEREADONLY}}' === 'noscroll' ? '{{FORCEREADONLY}}' : '{{FORCEREADONLY}}' === 'true'
})
</script>
</body>