Builtin Prosody, Share chat url: ability to show/hide the scrollbar in readonly mode.
This commit is contained in:
@ -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 = {
|
||||
|
@ -25,3 +25,7 @@ body.livechat-readonly #conversejs {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
body.livechat-readonly.livechat-noscroll converse-chat-content {
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
authenticationUrl: '{{AUTHENTICATION_URL}}',
|
||||
advancedControls: '{{ADVANCEDCONTROLS}}' === 'true',
|
||||
theme: '{{CONVERSEJS_THEME}}',
|
||||
forceReadonly: '{{FORCEREADONLY}}' === 'true'
|
||||
forceReadonly: '{{FORCEREADONLY}}' === 'noscroll' ? '{{FORCEREADONLY}}' : '{{FORCEREADONLY}}' === 'true'
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user