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

@ -1,5 +1,5 @@
import { ensureProsodyRunning, ensureProsodyNotRunning } from './prosody/ctl'
import type { ChatType } from '../../shared/lib/types'
import type { ChatType, ConverseJSTheme } from '../../shared/lib/types'
function initSettings (options: RegisterServerOptions): void {
const { peertubeHelpers, registerSetting, settingsManager } = options
@ -269,6 +269,28 @@ Example: height:400px;`,
private: false
})
// ********** ConverseJS advanced settings
registerSetting({
name: 'converse-advanced',
type: 'html',
private: true,
descriptionHTML: '<h3>ConverseJS advanced settings</h3>'
})
registerSetting({
name: 'converse-theme',
label: 'ConverseJS theme',
type: 'select',
default: 'peertube' as ConverseJSTheme,
private: true,
options: [
{ value: 'peertube', label: 'Peertube theme' },
{ value: 'default', label: 'Default ConverseJS theme' },
{ value: 'concord', label: 'ConverseJS concord theme' }
] as Array<{value: ConverseJSTheme, label: string}>,
descriptionHTML: 'Please choose the converseJS theme you want to use.'
})
// ********** Built-in Prosody advanced settings
registerSetting({
name: 'prosody-advanced',