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

@ -227,6 +227,14 @@ function register ({ registerHook, registerSettingsScript, peertubeHelpers }: Re
options.formValues['chat-type'] === ('builtin-converse' as ChatType) ||
options.formValues['chat-type'] === ('builtin-prosody' as ChatType)
)
case 'converse-autocolors':
return !(
(
options.formValues['chat-type'] === ('builtin-converse' as ChatType) ||
options.formValues['chat-type'] === ('builtin-prosody' as ChatType)
) &&
options.formValues['converse-theme'] === 'peertube'
)
case 'chat-uri':
case 'chat-type-help-external-uri':
return options.formValues['chat-type'] !== ('external-uri' as ChatType)