This commit is contained in:
2025-05-12 16:50:25 -04:00
56 changed files with 3435 additions and 1463 deletions

View File

@ -90,14 +90,12 @@ export async function initEmojisRouter(
(err) => {
if (err) {
res.sendStatus(404);
return;
}
}
);
} catch (err) {
logger.error(err);
res.sendStatus(500);
return;
}
}
)

View File

@ -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 !== '')) {