Transparent background + fix
* Builtin Prosody, Share chat url: option to have a transparent background (for streaming integration). * Builtin Prosody, Share chat url: fixed new day hidding when no scrollbar in readonly mode.
This commit is contained in:
parent
8c2938f1f9
commit
80ac08bd18
@ -2,9 +2,14 @@
|
|||||||
|
|
||||||
## ???
|
## ???
|
||||||
|
|
||||||
### Changes
|
### Features
|
||||||
|
|
||||||
|
* Builtin Prosody, Share chat url: option to have a transparent background (for streaming integration).
|
||||||
|
|
||||||
|
### Changes and fixes
|
||||||
|
|
||||||
* This plugin is now using types declarations from the official @peertube/peertube-types package.
|
* This plugin is now using types declarations from the official @peertube/peertube-types package.
|
||||||
|
* Builtin Prosody, Share chat url: fixed new day hidding when no scrollbar in readonly mode.
|
||||||
|
|
||||||
## 5.4.0
|
## 5.4.0
|
||||||
|
|
||||||
|
@ -135,13 +135,17 @@ table.peertube-plugin-livechat-prosody-list-rooms td {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.livechat-shareurl-custom-readonly {
|
.livechat-shareurl-custom-readonly-options {
|
||||||
display: flex;
|
margin-left: 40px;
|
||||||
flex-flow: wrap;
|
|
||||||
flex-direction: row;
|
|
||||||
|
|
||||||
label:not(:first-child) {
|
& > * {
|
||||||
margin-left: 40px;
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.livechat-shareurl-custom-readonly-disabled {
|
||||||
|
label {
|
||||||
|
color: var(--gray-dark);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,8 @@ import { isAutoColorsAvailable } from 'shared/lib/autocolors'
|
|||||||
interface ShareForm {
|
interface ShareForm {
|
||||||
readonly: HTMLInputElement
|
readonly: HTMLInputElement
|
||||||
withscroll: HTMLInputElement
|
withscroll: HTMLInputElement
|
||||||
withscrollLabelEl: HTMLElement
|
transparent: HTMLInputElement
|
||||||
|
readonlyOptions: HTMLElement
|
||||||
url: HTMLInputElement
|
url: HTMLInputElement
|
||||||
autoColors?: HTMLInputElement
|
autoColors?: HTMLInputElement
|
||||||
}
|
}
|
||||||
@ -19,6 +20,7 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
labelShare,
|
labelShare,
|
||||||
labelReadonly,
|
labelReadonly,
|
||||||
labelWithscroll,
|
labelWithscroll,
|
||||||
|
labelTransparent,
|
||||||
tipsOBS,
|
tipsOBS,
|
||||||
labelCopy,
|
labelCopy,
|
||||||
labelCopied,
|
labelCopied,
|
||||||
@ -29,6 +31,7 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
peertubeHelpers.translate('Share chat link'),
|
peertubeHelpers.translate('Share chat link'),
|
||||||
peertubeHelpers.translate('Read-only'),
|
peertubeHelpers.translate('Read-only'),
|
||||||
peertubeHelpers.translate('Show the scrollbar'),
|
peertubeHelpers.translate('Show the scrollbar'),
|
||||||
|
peertubeHelpers.translate('Transparent background (for stream integration, with OBS for example)'),
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
peertubeHelpers.translate('Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.'),
|
peertubeHelpers.translate('Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.'),
|
||||||
peertubeHelpers.translate('Copy'),
|
peertubeHelpers.translate('Copy'),
|
||||||
@ -77,23 +80,30 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
divCustom.classList.add('livechat-shareurl-custom')
|
divCustom.classList.add('livechat-shareurl-custom')
|
||||||
container.append(divCustom)
|
container.append(divCustom)
|
||||||
|
|
||||||
const divReadonly = document.createElement('div')
|
|
||||||
divReadonly.classList.add('livechat-shareurl-custom-readonly')
|
|
||||||
|
|
||||||
divCustom.append(divReadonly)
|
|
||||||
const readonly = document.createElement('input')
|
const readonly = document.createElement('input')
|
||||||
readonly.setAttribute('type', 'checkbox')
|
readonly.setAttribute('type', 'checkbox')
|
||||||
const readonlyLabelEl = document.createElement('label')
|
const readonlyLabelEl = document.createElement('label')
|
||||||
readonlyLabelEl.textContent = labelReadonly
|
readonlyLabelEl.textContent = labelReadonly
|
||||||
readonlyLabelEl.prepend(readonly)
|
readonlyLabelEl.prepend(readonly)
|
||||||
divReadonly.append(readonlyLabelEl)
|
divCustom.append(readonlyLabelEl)
|
||||||
|
|
||||||
|
const readonlyOptions = document.createElement('div')
|
||||||
|
readonlyOptions.classList.add('livechat-shareurl-custom-readonly-options')
|
||||||
|
divCustom.append(readonlyOptions)
|
||||||
|
|
||||||
const withscroll = document.createElement('input')
|
const withscroll = document.createElement('input')
|
||||||
withscroll.setAttribute('type', 'checkbox')
|
withscroll.setAttribute('type', 'checkbox')
|
||||||
const withscrollLabelEl = document.createElement('label')
|
const withscrollLabelEl = document.createElement('label')
|
||||||
withscrollLabelEl.textContent = labelWithscroll
|
withscrollLabelEl.textContent = labelWithscroll
|
||||||
withscrollLabelEl.prepend(withscroll)
|
withscrollLabelEl.prepend(withscroll)
|
||||||
divReadonly.append(withscrollLabelEl)
|
readonlyOptions.append(withscrollLabelEl)
|
||||||
|
|
||||||
|
const transparent = document.createElement('input')
|
||||||
|
transparent.setAttribute('type', 'checkbox')
|
||||||
|
const transparentLabelEl = document.createElement('label')
|
||||||
|
transparentLabelEl.textContent = labelTransparent
|
||||||
|
transparentLabelEl.prepend(transparent)
|
||||||
|
readonlyOptions.append(transparentLabelEl)
|
||||||
|
|
||||||
let autoColors
|
let autoColors
|
||||||
if (isAutoColorsAvailable(settings['chat-type'], settings['converse-theme'])) {
|
if (isAutoColorsAvailable(settings['chat-type'], settings['converse-theme'])) {
|
||||||
@ -111,6 +121,9 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
withscroll.onclick = () => {
|
withscroll.onclick = () => {
|
||||||
renderContent(container)
|
renderContent(container)
|
||||||
}
|
}
|
||||||
|
transparent.onclick = () => {
|
||||||
|
renderContent(container)
|
||||||
|
}
|
||||||
|
|
||||||
if (autoColors) {
|
if (autoColors) {
|
||||||
autoColors.onclick = () => {
|
autoColors.onclick = () => {
|
||||||
@ -140,7 +153,8 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
form = {
|
form = {
|
||||||
readonly,
|
readonly,
|
||||||
withscroll,
|
withscroll,
|
||||||
withscrollLabelEl,
|
transparent,
|
||||||
|
readonlyOptions,
|
||||||
url,
|
url,
|
||||||
autoColors
|
autoColors
|
||||||
}
|
}
|
||||||
@ -160,10 +174,16 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
} else {
|
} else {
|
||||||
uriOptions.readonly = 'noscroll'
|
uriOptions.readonly = 'noscroll'
|
||||||
}
|
}
|
||||||
form.withscrollLabelEl.style.display = 'initial'
|
if (form.transparent.checked) {
|
||||||
|
uriOptions.transparent = true
|
||||||
|
}
|
||||||
|
form.withscroll.disabled = false
|
||||||
|
form.transparent.disabled = false
|
||||||
|
form.readonlyOptions.classList.remove('livechat-shareurl-custom-readonly-disabled')
|
||||||
} else {
|
} else {
|
||||||
// Hide the withscroll checkbox
|
form.withscroll.disabled = true
|
||||||
form.withscrollLabelEl.style.display = 'none'
|
form.transparent.disabled = true
|
||||||
|
form.readonlyOptions.classList.add('livechat-shareurl-custom-readonly-disabled')
|
||||||
}
|
}
|
||||||
const iframeUri = getIframeUri(registerOptions, settings, video, uriOptions)
|
const iframeUri = getIframeUri(registerOptions, settings, video, uriOptions)
|
||||||
form.url.setAttribute('value', iframeUri ?? '')
|
form.url.setAttribute('value', iframeUri ?? '')
|
||||||
@ -177,6 +197,7 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
version: 1, // in case we add incompatible values in a near feature
|
version: 1, // in case we add incompatible values in a near feature
|
||||||
readonly: !!form.readonly.checked,
|
readonly: !!form.readonly.checked,
|
||||||
withscroll: !!form.withscroll.checked,
|
withscroll: !!form.withscroll.checked,
|
||||||
|
transparent: !!form.transparent.checked,
|
||||||
autocolors: !!form.autoColors?.checked
|
autocolors: !!form.autoColors?.checked
|
||||||
}
|
}
|
||||||
window.localStorage.setItem('peertube-plugin-livechat-shareurl', JSON.stringify(v))
|
window.localStorage.setItem('peertube-plugin-livechat-shareurl', JSON.stringify(v))
|
||||||
@ -198,6 +219,7 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
}
|
}
|
||||||
form.readonly.checked = !!v.readonly
|
form.readonly.checked = !!v.readonly
|
||||||
form.withscroll.checked = !!v.withscroll
|
form.withscroll.checked = !!v.withscroll
|
||||||
|
form.transparent.checked = !!v.transparent
|
||||||
if (form.autoColors) {
|
if (form.autoColors) {
|
||||||
form.autoColors.checked = !!v.autocolors
|
form.autoColors.checked = !!v.autocolors
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import { computeAutoColors } from './colors'
|
|||||||
|
|
||||||
interface UriOptions {
|
interface UriOptions {
|
||||||
readonly?: boolean | 'noscroll'
|
readonly?: boolean | 'noscroll'
|
||||||
|
transparent?: boolean
|
||||||
ignoreAutoColors?: boolean
|
ignoreAutoColors?: boolean
|
||||||
permanent?: boolean
|
permanent?: boolean
|
||||||
}
|
}
|
||||||
@ -84,6 +85,10 @@ function getIframeUri (
|
|||||||
iFrameUri.searchParams.set('_readonly', (typeof uriOptions.readonly === 'string') ? uriOptions.readonly : 'true')
|
iFrameUri.searchParams.set('_readonly', (typeof uriOptions.readonly === 'string') ? uriOptions.readonly : 'true')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uriOptions.transparent) {
|
||||||
|
iFrameUri.searchParams.set('_transparent', 'true')
|
||||||
|
}
|
||||||
|
|
||||||
iframeUriStr = iFrameUri.href
|
iframeUriStr = iFrameUri.href
|
||||||
return iframeUriStr
|
return iframeUriStr
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,7 @@ interface InitConverseParams {
|
|||||||
forceReadonly: boolean | 'noscroll'
|
forceReadonly: boolean | 'noscroll'
|
||||||
noScroll: boolean
|
noScroll: boolean
|
||||||
theme: string
|
theme: string
|
||||||
|
transparent: boolean
|
||||||
}
|
}
|
||||||
window.initConverse = async function initConverse ({
|
window.initConverse = async function initConverse ({
|
||||||
jid,
|
jid,
|
||||||
@ -103,7 +104,8 @@ window.initConverse = async function initConverse ({
|
|||||||
advancedControls,
|
advancedControls,
|
||||||
autoViewerMode,
|
autoViewerMode,
|
||||||
forceReadonly,
|
forceReadonly,
|
||||||
theme
|
theme,
|
||||||
|
transparent
|
||||||
}: InitConverseParams) {
|
}: InitConverseParams) {
|
||||||
const isInIframe = inIframe()
|
const isInIframe = inIframe()
|
||||||
|
|
||||||
@ -121,6 +123,9 @@ window.initConverse = async function initConverse ({
|
|||||||
body?.classList.add('livechat-noscroll')
|
body?.classList.add('livechat-noscroll')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (transparent) {
|
||||||
|
body?.classList.add('livechat-transparent')
|
||||||
|
}
|
||||||
|
|
||||||
const params: any = {
|
const params: any = {
|
||||||
assets_path: assetsPath,
|
assets_path: assetsPath,
|
||||||
|
@ -31,7 +31,8 @@ body.livechat-readonly.livechat-noscroll {
|
|||||||
overflow-y: hidden !important;
|
overflow-y: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message.separator {
|
.message.separator,
|
||||||
|
.message.date-separator {
|
||||||
// also hide separators (new day, new message)
|
// also hide separators (new day, new message)
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -61,3 +62,25 @@ body[livechat-viewer-mode="on"] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Transparent mode
|
||||||
|
body.livechat-transparent {
|
||||||
|
// --peertube-main-background: rgba(0 0 0 / 0%) !important;
|
||||||
|
// --peertube-menu-background: rgba(0 0 0 / 0%) !important;
|
||||||
|
|
||||||
|
&.converse-fullscreen {
|
||||||
|
background-color: rgba(0 0 0 / 0%) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-body,
|
||||||
|
.conversejs .chatroom .box-flyout,
|
||||||
|
.conversejs .chatbox .chat-content,
|
||||||
|
.conversejs .chatbox .chat-content .chat-content__notifications {
|
||||||
|
background-color: rgba(0 0 0 / 0%) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hide the background_logo
|
||||||
|
#conversejs-bg {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
advancedControls: '{{ADVANCEDCONTROLS}}' === 'true',
|
advancedControls: '{{ADVANCEDCONTROLS}}' === 'true',
|
||||||
autoViewerMode: '{{AUTOVIEWERMODE}}' === 'true',
|
autoViewerMode: '{{AUTOVIEWERMODE}}' === 'true',
|
||||||
theme: '{{CONVERSEJS_THEME}}',
|
theme: '{{CONVERSEJS_THEME}}',
|
||||||
forceReadonly: '{{FORCEREADONLY}}' === 'noscroll' ? '{{FORCEREADONLY}}' : '{{FORCEREADONLY}}' === 'true'
|
forceReadonly: '{{FORCEREADONLY}}' === 'noscroll' ? '{{FORCEREADONLY}}' : '{{FORCEREADONLY}}' === 'true',
|
||||||
|
transparent: '{{TRANSPARENT}}' === 'true'
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": false,
|
"Share chat link": false,
|
||||||
"Read-only": false,
|
"Read-only": false,
|
||||||
"Show the scrollbar": false,
|
"Show the scrollbar": false,
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
||||||
"Copy": false,
|
"Copy": false,
|
||||||
"Link copied": false,
|
"Link copied": false,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": false,
|
"Share chat link": false,
|
||||||
"Read-only": false,
|
"Read-only": false,
|
||||||
"Show the scrollbar": false,
|
"Show the scrollbar": false,
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
||||||
"Copy": false,
|
"Copy": false,
|
||||||
"Link copied": false,
|
"Link copied": false,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": "Compartir el enlace de esta sala de chat",
|
"Share chat link": "Compartir el enlace de esta sala de chat",
|
||||||
"Read-only": "Sólo lectura",
|
"Read-only": "Sólo lectura",
|
||||||
"Show the scrollbar": false,
|
"Show the scrollbar": false,
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": "Sugerencias para los streamers: para agregar el chat a su OBS, genere un enlace de «solo lectura» y utilícelo como «fuente o canal web».",
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": "Sugerencias para los streamers: para agregar el chat a su OBS, genere un enlace de «solo lectura» y utilícelo como «fuente o canal web».",
|
||||||
"Copy": "Copiar",
|
"Copy": "Copiar",
|
||||||
"Link copied": "Enlace copiado",
|
"Link copied": "Enlace copiado",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": false,
|
"Share chat link": false,
|
||||||
"Read-only": false,
|
"Read-only": false,
|
||||||
"Show the scrollbar": false,
|
"Show the scrollbar": false,
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
||||||
"Copy": false,
|
"Copy": false,
|
||||||
"Link copied": false,
|
"Link copied": false,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": "Partager le lien du salon de discussion",
|
"Share chat link": "Partager le lien du salon de discussion",
|
||||||
"Read-only": "Lecture seule",
|
"Read-only": "Lecture seule",
|
||||||
"Show the scrollbar": "Afficher la barre de défilement",
|
"Show the scrollbar": "Afficher la barre de défilement",
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": "Arrière plan transparent (pour l'intégration dans le stream, avec OBS par exemple)",
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": "Astuce pour les streamers et streameuses : pour ajouter le tchat à votre OBS, générez un lien «lecture seule» et utilisez le comme «source navigateur web».",
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": "Astuce pour les streamers et streameuses : pour ajouter le tchat à votre OBS, générez un lien «lecture seule» et utilisez le comme «source navigateur web».",
|
||||||
"Copy": "Copier",
|
"Copy": "Copier",
|
||||||
"Link copied": "Lien copié",
|
"Link copied": "Lien copié",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": false,
|
"Share chat link": false,
|
||||||
"Read-only": false,
|
"Read-only": false,
|
||||||
"Show the scrollbar": false,
|
"Show the scrollbar": false,
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
||||||
"Copy": false,
|
"Copy": false,
|
||||||
"Link copied": false,
|
"Link copied": false,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": "Partejar lo ligam de la discussion",
|
"Share chat link": "Partejar lo ligam de la discussion",
|
||||||
"Read-only": "Lectura sola",
|
"Read-only": "Lectura sola",
|
||||||
"Show the scrollbar": "Afichar la barra de desfilament",
|
"Show the scrollbar": "Afichar la barra de desfilament",
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": "Astúcia pels difusors : per apondre la messatjariá a vòstre OBS, generatz un ligam « lectura sola» e utilizatz-lo coma « font navegador web ».",
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": "Astúcia pels difusors : per apondre la messatjariá a vòstre OBS, generatz un ligam « lectura sola» e utilizatz-lo coma « font navegador web ».",
|
||||||
"Copy": "Copiar",
|
"Copy": "Copiar",
|
||||||
"Link copied": "Ligam copiat",
|
"Link copied": "Ligam copiat",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"Share chat link": false,
|
"Share chat link": false,
|
||||||
"Read-only": false,
|
"Read-only": false,
|
||||||
"Show the scrollbar": false,
|
"Show the scrollbar": false,
|
||||||
|
"Transparent background (for stream integration, with OBS for example)": false,
|
||||||
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
"Tips for streamers: To add the chat to your OBS, generate a read-only link and use it as a browser source.": false,
|
||||||
"Copy": false,
|
"Copy": false,
|
||||||
"Link copied": false,
|
"Link copied": false,
|
||||||
|
@ -57,6 +57,7 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise<Route
|
|||||||
let autoViewerMode: boolean = false
|
let autoViewerMode: boolean = false
|
||||||
let forceReadonly: 'true' | 'false' | 'noscroll' = 'false'
|
let forceReadonly: 'true' | 'false' | 'noscroll' = 'false'
|
||||||
let converseJSTheme: string = settings['converse-theme'] as string
|
let converseJSTheme: string = settings['converse-theme'] as string
|
||||||
|
let transparent: boolean = false
|
||||||
if (!/^\w+$/.test(converseJSTheme)) {
|
if (!/^\w+$/.test(converseJSTheme)) {
|
||||||
converseJSTheme = 'peertube'
|
converseJSTheme = 'peertube'
|
||||||
}
|
}
|
||||||
@ -95,6 +96,9 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise<Route
|
|||||||
} else {
|
} else {
|
||||||
autoViewerMode = true // auto join the chat in viewer mode, if not logged in
|
autoViewerMode = true // auto join the chat in viewer mode, if not logged in
|
||||||
}
|
}
|
||||||
|
if (req.query._transparent === 'true') {
|
||||||
|
transparent = true
|
||||||
|
}
|
||||||
} else if (chatType === 'builtin-converse') {
|
} else if (chatType === 'builtin-converse') {
|
||||||
if (!settings['chat-server']) {
|
if (!settings['chat-server']) {
|
||||||
throw new Error('Missing chat-server settings.')
|
throw new Error('Missing chat-server settings.')
|
||||||
@ -218,6 +222,7 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise<Route
|
|||||||
page = page.replace(/{{CONVERSEJS_THEME}}/g, converseJSTheme)
|
page = page.replace(/{{CONVERSEJS_THEME}}/g, converseJSTheme)
|
||||||
page = page.replace(/{{CONVERSEJS_AUTOCOLORS}}/g, autocolorsStyles)
|
page = page.replace(/{{CONVERSEJS_AUTOCOLORS}}/g, autocolorsStyles)
|
||||||
page = page.replace(/{{FORCEREADONLY}}/g, forceReadonly)
|
page = page.replace(/{{FORCEREADONLY}}/g, forceReadonly)
|
||||||
|
page = page.replace(/{{TRANSPARENT}}/g, transparent ? 'true' : 'false')
|
||||||
|
|
||||||
res.status(200)
|
res.status(200)
|
||||||
res.type('html')
|
res.type('html')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user