Code refactoring WIP:
Cleaning the way ConverseJS parameters are given to the full page.
This commit is contained in:
@ -14,24 +14,9 @@
|
||||
<noscript>You need to enable JavaScript to run the Converse.js chat app.</noscript>
|
||||
<div id="conversejs-bg" class="theme-peertube"></div>
|
||||
<script type="text/javascript">
|
||||
initConverse({
|
||||
isRemoteChat: '{{IS_REMOTE_CHAT}}' === 'true',
|
||||
localAnonymousJID: '{{LOCAL_ANONYMOUS_JID}}',
|
||||
remoteAnonymousJID: '{{REMOTE_ANONYMOUS_JID}}' === '' ? null : '{{REMOTE_ANONYMOUS_JID}}',
|
||||
remoteAnonymousXMPPServer: '{{REMOTE_ANONYMOUS_XMPP_SERVER}}' === 'true',
|
||||
remoteAuthenticatedXMPPServer: '{{REMOTE_AUTHENTICATED_XMPP_SERVER}}' === 'true',
|
||||
assetsPath : '{{BASE_STATIC_URL}}conversejs/',
|
||||
room: '{{ROOM}}',
|
||||
localBoshServiceUrl: '{{LOCAL_BOSH_SERVICE_URL}}' === '' ? null : '{{LOCAL_BOSH_SERVICE_URL}}',
|
||||
localWebsocketServiceUrl: '{{LOCAL_WS_SERVICE_URL}}' === '' ? null : '{{LOCAL_WS_SERVICE_URL}}',
|
||||
remoteBoshServiceUrl: '{{REMOTE_BOSH_SERVICE_URL}}' === '' ? null : '{{REMOTE_BOSH_SERVICE_URL}}',
|
||||
remoteWebsocketServiceUrl: '{{REMOTE_WS_SERVICE_URL}}' === '' ? null : '{{REMOTE_WS_SERVICE_URL}}',
|
||||
authenticationUrl: '{{AUTHENTICATION_URL}}',
|
||||
autoViewerMode: '{{AUTOVIEWERMODE}}' === 'true',
|
||||
theme: '{{CONVERSEJS_THEME}}',
|
||||
forceReadonly: '{{FORCEREADONLY}}' === 'noscroll' ? '{{FORCEREADONLY}}' : '{{FORCEREADONLY}}' === 'true',
|
||||
transparent: '{{TRANSPARENT}}' === 'true'
|
||||
})
|
||||
initConverse(
|
||||
{INIT_CONVERSE_PARAMS}
|
||||
)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user