From dc960c3b0302d38f1b04f86dcdc25fc66bd2f415 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Tue, 25 Mar 2025 21:01:58 +0100 Subject: [PATCH 01/45] (bug) fix links queue broken by segfault not recognising some favicons as SVG files (because they're either data URLs or contain query string) results in it being passed to canvas.loadImage, which blows up for some reason that's what's been spamming us with "links queue getting too long" emails --- server/imageCopy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/imageCopy.ts b/server/imageCopy.ts index 6c44c1ce1..4f002efb3 100644 --- a/server/imageCopy.ts +++ b/server/imageCopy.ts @@ -21,7 +21,7 @@ export default async (prefix: string, url: string, ttlDays: number | null = null return null; } - const isSvg = url.toLowerCase().endsWith('.svg'); + const isSvg = url.toLowerCase().replace(/\?.*$/, '').endsWith('.svg') || url.startsWith('data:image/svg+xml'); const key = `${prefix}/${md5(url)}.${isSvg ? 'svg' : 'png'}`; From 5019fd38b8fdc6d88d127884980122780057c4d0 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Fri, 28 Mar 2025 00:18:40 +0100 Subject: [PATCH 02/45] (lint) disable @stylistic/newline-per-chained-call because it sometimes gives weird formatting --- eslint.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 8bc3fc7f2..34ebb7fe5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -160,7 +160,6 @@ export default withNuxt( '@stylistic/implicit-arrow-linebreak': 'warn', '@stylistic/linebreak-style': 'warn', '@stylistic/max-len': ['warn', { code: 120 }], - '@stylistic/newline-per-chained-call': 'warn', '@stylistic/no-extra-semi': 'warn', '@stylistic/no-mixed-operators': ['warn', { groups: [['&&', '||']], From c118b4da8a2916148855a91a9d2eb554f98bfcfa Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Fri, 28 Mar 2025 00:59:51 +0100 Subject: [PATCH 03/45] (style) use headings font of the locale on home and admin see #378 --- app.vue | 5 +++-- components/LocaleList.vue | 3 +++ nuxt.config.ts | 20 +++++++++++++++++--- pages/admin/index.vue | 3 ++- src/fonts.ts | 3 +++ 5 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 src/fonts.ts diff --git a/app.vue b/app.vue index 2c14e8d61..c4659aa86 100644 --- a/app.vue +++ b/app.vue @@ -5,6 +5,7 @@ import { useHead, useSeoMeta } from '#imports'; import useConfig from '~/composables/useConfig.ts'; import { getDefaultSeo } from '~/composables/useSimpleHead.ts'; import { getUrlForLocale } from '~/src/domain.ts'; +import { formatFonts } from '~/src/fonts.ts'; const { $translator: translator } = useNuxtApp(); const config = useConfig(); @@ -20,8 +21,8 @@ useHead({ style: [{ innerHTML: `:root { - --font-headings: ${config.style.fontHeadings.map((font) => `'${font}'`).join(',')}; - --font-text: ${config.style.fontText.map((font) => `'${font}'`).join(',')}; + --font-headings: ${formatFonts(config.style.fontHeadings)}; + --font-text: ${formatFonts(config.style.fontText)}; }`, }], link: [ diff --git a/components/LocaleList.vue b/components/LocaleList.vue index b0f93c51c..e3e0c5115 100644 --- a/components/LocaleList.vue +++ b/components/LocaleList.vue @@ -1,6 +1,8 @@