Merge branch 'dependabot/npm_and_yarn/minor-and-patch-74f704f9c9'
This commit is contained in:
commit
38cfc05962
@ -39,9 +39,7 @@ export class PtContext {
|
||||
* Keep them in cache after first request.
|
||||
*/
|
||||
public async getSettings (): Promise<LiveChatSettings> {
|
||||
if (!this._settings) {
|
||||
this._settings = await this.ptOptions.peertubeHelpers.getSettings() as LiveChatSettings
|
||||
}
|
||||
this._settings ??= await this.ptOptions.peertubeHelpers.getSettings() as LiveChatSettings
|
||||
return this._settings
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ function overrideMUCMessageForm (_converse: any, current: Current): void {
|
||||
class MUCMessageFormloaded extends MUCMessageForm {
|
||||
async onFormSubmitted (ev?: Event): Promise<void> {
|
||||
const announcementSelect = this.querySelector('[name=livechat-announcements]')
|
||||
current.announcementType = announcementSelect?.selectedOptions?.[0]?.value || undefined
|
||||
current.announcementType = announcementSelect?.selectedOptions?.[0]?.value ?? undefined
|
||||
try {
|
||||
await super.onFormSubmitted(ev)
|
||||
if (announcementSelect) { announcementSelect.selectedIndex = 0 } // set back to default
|
||||
@ -173,7 +173,7 @@ function onGetOutgoingMessageAttributes (
|
||||
chatbox: any,
|
||||
attrs: any
|
||||
): Parameters<typeof onGetOutgoingMessageAttributes>[3] {
|
||||
if (!current.announcementType) { return attrs }
|
||||
if (!current.announcementType) { return attrs } // undefined or ""
|
||||
|
||||
const { __ } = _converse
|
||||
attrs.livechat_announcement_type = current.announcementType
|
||||
|
@ -78,7 +78,7 @@ export default tseslint.config(
|
||||
'@typescript-eslint/no-unsafe-call': 'off', // FIXME: comes with eslint-config-love 84 update, and should be used.
|
||||
|
||||
'@typescript-eslint/no-unnecessary-condition': 'off', // FIXME: comes with eslint-config-love 84 update, but seems buggy (false positive).
|
||||
|
||||
'@typescript-eslint/prefer-nullish-coalescing': 'off', // disabling, because many false positive (where i want "" to act as false)
|
||||
'max-len': [
|
||||
'error',
|
||||
{
|
||||
|
1910
package-lock.json
generated
1910
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@ -26,7 +26,7 @@
|
||||
"dist/assets/styles/style.css"
|
||||
],
|
||||
"dependencies": {
|
||||
"@xmpp/jid": "^0.13.1",
|
||||
"@xmpp/jid": "^0.13.2",
|
||||
"async": "^3.2.6",
|
||||
"decache": "^4.6.2",
|
||||
"escape-html": "^1.0.3",
|
||||
@ -38,42 +38,42 @@
|
||||
"xmppjs-chat-bot": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.16.0",
|
||||
"@lit-labs/motion": "^1.0.7",
|
||||
"@lit/context": "^1.1.3",
|
||||
"@lit/task": "^1.0.1",
|
||||
"@peertube/feed": "^5.1.3",
|
||||
"@eslint/js": "^9.26.0",
|
||||
"@lit-labs/motion": "^1.0.8",
|
||||
"@lit/context": "^1.1.5",
|
||||
"@lit/task": "^1.0.2",
|
||||
"@peertube/feed": "^5.4.1",
|
||||
"@peertube/peertube-types": "^5.2.0",
|
||||
"@stylistic/eslint-plugin": "^2.11.0",
|
||||
"@tsconfig/node16": "^16.1.3",
|
||||
"@types/async": "^3.2.24",
|
||||
"@types/escape-html": "^1.0.4",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/express": "^5.0.1",
|
||||
"@types/got": "^9.6.12",
|
||||
"@types/http-proxy": "^1.17.15",
|
||||
"@types/node": "^16.18.121",
|
||||
"@types/http-proxy": "^1.17.16",
|
||||
"@types/node": "^16.18.126",
|
||||
"@types/winston": "^2.4.4",
|
||||
"@types/xmpp__jid": "^1.3.5",
|
||||
"@typescript-eslint/parser": "^8.4.0",
|
||||
"commander": "^13.1.0",
|
||||
"esbuild": "^0.25.0",
|
||||
"esbuild": "^0.25.4",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-love": "^84.1.1",
|
||||
"eslint-plugin-lit": "^1.15.0",
|
||||
"globals": "^15.13.0",
|
||||
"lit": "^3.2.1",
|
||||
"lit": "^3.3.0",
|
||||
"lit-analyzer": "^2.0.3",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"sass": "^1.81.1",
|
||||
"sharp": "^0.33.5",
|
||||
"stylelint": "^16.11.0",
|
||||
"sass": "^1.88.0",
|
||||
"sharp": "^0.34.1",
|
||||
"stylelint": "^16.19.1",
|
||||
"stylelint-config-recommended-scss": "^14.1.0",
|
||||
"stylelint-config-standard-scss": "^14.0.0",
|
||||
"svgo": "^3.3.2",
|
||||
"typescript": "^5.5.4",
|
||||
"typescript-eslint": "^8.17.0",
|
||||
"yaml": "^2.6.1"
|
||||
"typescript-eslint": "^8.32.0",
|
||||
"yaml": "^2.7.1"
|
||||
},
|
||||
"engine": {
|
||||
"peertube": ">=5.2.0"
|
||||
|
@ -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 !== '')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user