Merge branch 'main' of https://github.com/JohnXLivingston/peertube-plugin-livechat
This commit is contained in:
		| @ -90,14 +90,12 @@ export async function initEmojisRouter( | ||||
|             (err) => { | ||||
|               if (err) { | ||||
|                 res.sendStatus(404); | ||||
|                 return; | ||||
|               } | ||||
|             } | ||||
|           ); | ||||
|         } catch (err) { | ||||
|           logger.error(err); | ||||
|           res.sendStatus(500); | ||||
|           return; | ||||
|         } | ||||
|       } | ||||
|     ) | ||||
|  | ||||
| @ -89,17 +89,29 @@ async function initWebchatRouter (options: RegisterServerOptionsV5): Promise<Rou | ||||
|         ) { | ||||
|           peertubeHelpers.logger.debug('Trying to load AutoColors...') | ||||
|           const autocolors: AutoColors = { | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             mainForeground: req.query._ac_mainForeground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             mainBackground: req.query._ac_mainBackground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             greyForeground: req.query._ac_greyForeground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             greyBackground: req.query._ac_greyBackground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             menuForeground: req.query._ac_menuForeground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             menuBackground: req.query._ac_menuBackground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             inputForeground: req.query._ac_inputForeground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             inputBackground: req.query._ac_inputBackground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             buttonForeground: req.query._ac_buttonForeground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             buttonBackground: req.query._ac_buttonBackground?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             link: req.query._ac_link?.toString() ?? '', | ||||
|             // eslint-disable-next-line @typescript-eslint/no-base-to-string | ||||
|             linkHover: req.query._ac_linkHover?.toString() ?? '' | ||||
|           } | ||||
|           if (!Object.values(autocolors).find(c => c !== '')) { | ||||
|  | ||||
| @ -533,7 +533,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'), | ||||
| @ -542,6 +541,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', | ||||
|  | ||||
		Reference in New Issue
	
	Block a user