Autocolors

WIP on a new feature: trying to guess current Peertube theme's colors,
and apply them to ConverseJS.
This commit is contained in:
John Livingston
2021-11-19 16:45:10 +01:00
parent fbb2e8345c
commit 8999133dcc
7 changed files with 208 additions and 3 deletions

View File

@ -282,7 +282,7 @@ Example: height:400px;`,
label: 'ConverseJS theme',
type: 'select',
default: 'peertube' as ConverseJSTheme,
private: true,
private: false,
options: [
{ value: 'peertube', label: 'Peertube theme' },
{ value: 'default', label: 'Default ConverseJS theme' },
@ -291,6 +291,22 @@ Example: height:400px;`,
descriptionHTML: 'Please choose the converseJS theme you want to use.'
})
registerSetting({
name: 'converse-autocolors',
label: 'Automatic color detection',
type: 'input-checkbox',
default: true,
private: false,
descriptionHTML:
`Try to auto detect colors from user's current theme.<br>
When this settings is enabled, the plugin tries to auto-detect colors to apply to the chat theme.<br>
If this is not correctly working for some of your Peertube theme, you can disable this option.
You can report the bug on the official
<a href="https://github.com/JohnXLivingston/peertube-plugin-livechat/issues" target="_blank">
issue tracker
</a>. Don't forget to specify which theme is not working.`
})
// ********** Built-in Prosody advanced settings
registerSetting({
name: 'prosody-advanced',