Adding a warning in settings if theme is not set to Peertube or if autocolors are disabled.

This commit is contained in:
John Livingston 2025-05-12 15:40:27 +02:00
parent d841e88e00
commit 88376b82ee
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
4 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,7 @@
* Fix shebangs (for NixOS compatibility).
* Translations updates.
* Updating various dependencies.
* Adding a warning in settings if theme is not set to Peertube or if autocolors are disabled.
## 12.0.3

View File

@ -269,6 +269,9 @@ function register (clientOptions: RegisterClientOptions): void {
return options.formValues['prosody-components'] !== true
case 'converse-autocolors':
return options.formValues['converse-theme'] !== 'peertube'
case 'converse-theme-warning':
return options.formValues['converse-theme'] === 'peertube' &&
options.formValues['converse-autocolors'] === true
case 'chat-per-live-video-warning':
return !(options.formValues['chat-all-lives'] === true && options.formValues['chat-per-live-video'] === true)
case 'auto-ban-anonymous-ip':

View File

@ -676,3 +676,9 @@ announcements_message_type_standard: Standard
announcements_message_type_announcement: Announcement
announcements_message_type_highlight: Highlight
announcements_message_type_warning: Warning
converse_theme_warning_description: |
<span class="peertube-plugin-livechat-warning">
It is strongly recommanded to keep the "Peertube theme", in combinaison with the "Automatic color detection" feature.
Otherwise some user may experience issues depending on the Peertube theme they use.
</span>

View File

@ -532,7 +532,6 @@ function initThemingSettings ({ registerSetting }: RegisterServerOptions): void
] as Array<{ value: ConverseJSTheme, label: string }>,
descriptionHTML: loc('converse_theme_description')
})
registerSetting({
name: 'converse-autocolors',
label: loc('autocolors_label'),
@ -541,6 +540,12 @@ function initThemingSettings ({ registerSetting }: RegisterServerOptions): void
private: false,
descriptionHTML: loc('autocolors_description')
})
registerSetting({
name: 'converse-theme-warning',
type: 'html',
private: true,
descriptionHTML: loc('converse_theme_warning_description')
})
registerSetting({
name: 'chat-style',