ConverseJS: theme settings.

This commit is contained in:
John Livingston
2021-11-18 11:08:12 +01:00
parent 8a2b063489
commit 9b20042aad
7 changed files with 60 additions and 6 deletions

View File

@ -79,6 +79,7 @@ interface InitConverseParams {
websocketServiceUrl: string
authenticationUrl: string
advancedControls: 'true' | 'false'
theme: string
}
window.initConverse = async function initConverse ({
jid,
@ -87,7 +88,8 @@ window.initConverse = async function initConverse ({
boshServiceUrl,
websocketServiceUrl,
authenticationUrl,
advancedControls
advancedControls,
theme
}: InitConverseParams) {
const isInIframe = inIframe()
@ -135,7 +137,7 @@ window.initConverse = async function initConverse ({
emoji: true,
toggle_occupants: true
},
theme: 'peertube',
theme: theme || 'peertube',
persistent_store: 'sessionStorage'
}

View File

@ -20,7 +20,8 @@
boshServiceUrl: '{{BOSH_SERVICE_URL}}',
websocketServiceUrl: '{{WS_SERVICE_URL}}',
authenticationUrl: '{{AUTHENTICATION_URL}}',
advancedControls: '{{ADVANCEDCONTROLS}}'
advancedControls: '{{ADVANCEDCONTROLS}}',
theme: '{{CONVERSEJS_THEME}}'
})
</script>
</body>