Release 2025-05-20-0D8p
This commit is contained in:
@@ -143,7 +143,12 @@
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle="Edit service"
|
pageTitle="Edit service"
|
||||||
description="Suggest an edit to service"
|
description="Suggest an edit to service"
|
||||||
ogImage={{ template: 'generic', title: 'Edit service' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Edit service',
|
||||||
|
description: 'Suggest an edit to service',
|
||||||
|
icon: 'ri:edit-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
>
|
>
|
||||||
<h1 class="font-title mt-12 mb-6 text-center text-3xl font-bold">Edit service</h1>
|
<h1 class="font-title mt-12 mb-6 text-center text-3xl font-bold">Edit service</h1>
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ export default defineConfig({
|
|||||||
open: false,
|
open: false,
|
||||||
allowedHosts: [new URL(SITE_URL).hostname],
|
allowedHosts: [new URL(SITE_URL).hostname],
|
||||||
},
|
},
|
||||||
|
image: {
|
||||||
|
domains: [new URL(SITE_URL).hostname],
|
||||||
|
remotePatterns: [{ protocol: 'https' }],
|
||||||
|
},
|
||||||
redirects: {
|
redirects: {
|
||||||
// #region Redirects from old website
|
// #region Redirects from old website
|
||||||
'/pending': '/?verification=verified&verification=approved&verification=community',
|
'/pending': '/?verification=verified&verification=approved&verification=community',
|
||||||
|
|||||||
614
web/package-lock.json
generated
614
web/package-lock.json
generated
@@ -15,6 +15,7 @@
|
|||||||
"@astrojs/sitemap": "3.4.0",
|
"@astrojs/sitemap": "3.4.0",
|
||||||
"@fontsource-variable/space-grotesk": "5.2.7",
|
"@fontsource-variable/space-grotesk": "5.2.7",
|
||||||
"@fontsource/inter": "5.2.5",
|
"@fontsource/inter": "5.2.5",
|
||||||
|
"@fontsource/space-grotesk": "5.2.7",
|
||||||
"@prisma/client": "6.8.2",
|
"@prisma/client": "6.8.2",
|
||||||
"@tailwindcss/vite": "4.1.7",
|
"@tailwindcss/vite": "4.1.7",
|
||||||
"@types/mime-types": "2.1.4",
|
"@types/mime-types": "2.1.4",
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
"redis": "5.0.1",
|
"redis": "5.0.1",
|
||||||
"schema-dts": "1.1.5",
|
"schema-dts": "1.1.5",
|
||||||
"seedrandom": "3.0.5",
|
"seedrandom": "3.0.5",
|
||||||
|
"sharp": "0.34.1",
|
||||||
"slugify": "1.6.6",
|
"slugify": "1.6.6",
|
||||||
"tailwind-merge": "3.3.0",
|
"tailwind-merge": "3.3.0",
|
||||||
"tailwind-variants": "1.0.0",
|
"tailwind-variants": "1.0.0",
|
||||||
@@ -1135,6 +1137,15 @@
|
|||||||
"url": "https://github.com/sponsors/ayuhito"
|
"url": "https://github.com/sponsors/ayuhito"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@fontsource/space-grotesk": {
|
||||||
|
"version": "5.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@fontsource/space-grotesk/-/space-grotesk-5.2.7.tgz",
|
||||||
|
"integrity": "sha512-erQDZxKdwm5g+47wqJRxh6FB4SJeIgjaK5Iyuht9lGlZ4Wl4Qqv+8xan6oBRfsJHUjALJVQ/fNTIdv9/kIEf+Q==",
|
||||||
|
"license": "OFL-1.1",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ayuhito"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@humanfs/core": {
|
"node_modules/@humanfs/core": {
|
||||||
"version": "0.19.1",
|
"version": "0.19.1",
|
||||||
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
|
||||||
@@ -1306,9 +1317,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-darwin-arm64": {
|
"node_modules/@img/sharp-darwin-arm64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.1.tgz",
|
||||||
"integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==",
|
"integrity": "sha512-pn44xgBtgpEbZsu+lWf2KNb6OAf70X68k+yk69Ic2Xz11zHR/w24/U49XT7AeRwJ0Px+mhALhU5LPci1Aymk7A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1324,13 +1335,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-darwin-arm64": "1.0.4"
|
"@img/sharp-libvips-darwin-arm64": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-darwin-x64": {
|
"node_modules/@img/sharp-darwin-x64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.1.tgz",
|
||||||
"integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==",
|
"integrity": "sha512-VfuYgG2r8BpYiOUN+BfYeFo69nP/MIwAtSJ7/Zpxc5QF3KS22z8Pvg3FkrSFJBPNQ7mmcUcYQFBmEQp7eu1F8Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1346,13 +1357,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-darwin-x64": "1.0.4"
|
"@img/sharp-libvips-darwin-x64": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-darwin-arm64": {
|
"node_modules/@img/sharp-libvips-darwin-arm64": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.1.0.tgz",
|
||||||
"integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==",
|
"integrity": "sha512-HZ/JUmPwrJSoM4DIQPv/BfNh9yrOA8tlBbqbLz4JZ5uew2+o22Ik+tHQJcih7QJuSa0zo5coHTfD5J8inqj9DA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1366,9 +1377,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-darwin-x64": {
|
"node_modules/@img/sharp-libvips-darwin-x64": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.1.0.tgz",
|
||||||
"integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==",
|
"integrity": "sha512-Xzc2ToEmHN+hfvsl9wja0RlnXEgpKNmftriQp6XzY/RaSfwD9th+MSh0WQKzUreLKKINb3afirxW7A0fz2YWuQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1382,9 +1393,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-linux-arm": {
|
"node_modules/@img/sharp-libvips-linux-arm": {
|
||||||
"version": "1.0.5",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.1.0.tgz",
|
||||||
"integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==",
|
"integrity": "sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -1398,9 +1409,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-linux-arm64": {
|
"node_modules/@img/sharp-libvips-linux-arm64": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.1.0.tgz",
|
||||||
"integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==",
|
"integrity": "sha512-IVfGJa7gjChDET1dK9SekxFFdflarnUB8PwW8aGwEoF3oAsSDuNUTYS+SKDOyOJxQyDC1aPFMuRYLoDInyV9Ew==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1413,10 +1424,26 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linux-ppc64": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-tiXxFZFbhnkWE2LA8oQj7KYR+bWBkiV2nilRldT7bqoEZ4HiDOcePr9wVDAZPi/Id5fT1oY9iGnDq20cwUz8lQ==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@img/sharp-libvips-linux-s390x": {
|
"node_modules/@img/sharp-libvips-linux-s390x": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.1.0.tgz",
|
||||||
"integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==",
|
"integrity": "sha512-xukSwvhguw7COyzvmjydRb3x/09+21HykyapcZchiCUkTThEQEOMtBj9UhkaBRLuBrgLFzQ2wbxdeCCJW/jgJA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -1430,9 +1457,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-linux-x64": {
|
"node_modules/@img/sharp-libvips-linux-x64": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.1.0.tgz",
|
||||||
"integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==",
|
"integrity": "sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1446,9 +1473,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-linuxmusl-arm64": {
|
"node_modules/@img/sharp-libvips-linuxmusl-arm64": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.1.0.tgz",
|
||||||
"integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==",
|
"integrity": "sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1462,9 +1489,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
||||||
"version": "1.0.4",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.1.0.tgz",
|
||||||
"integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==",
|
"integrity": "sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1478,9 +1505,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-linux-arm": {
|
"node_modules/@img/sharp-linux-arm": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.1.tgz",
|
||||||
"integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==",
|
"integrity": "sha512-anKiszvACti2sGy9CirTlNyk7BjjZPiML1jt2ZkTdcvpLU1YH6CXwRAZCA2UmRXnhiIftXQ7+Oh62Ji25W72jA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -1496,13 +1523,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-linux-arm": "1.0.5"
|
"@img/sharp-libvips-linux-arm": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-linux-arm64": {
|
"node_modules/@img/sharp-linux-arm64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.1.tgz",
|
||||||
"integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==",
|
"integrity": "sha512-kX2c+vbvaXC6vly1RDf/IWNXxrlxLNpBVWkdpRq5Ka7OOKj6nr66etKy2IENf6FtOgklkg9ZdGpEu9kwdlcwOQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1518,13 +1545,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-linux-arm64": "1.0.4"
|
"@img/sharp-libvips-linux-arm64": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-linux-s390x": {
|
"node_modules/@img/sharp-linux-s390x": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.1.tgz",
|
||||||
"integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==",
|
"integrity": "sha512-7s0KX2tI9mZI2buRipKIw2X1ufdTeaRgwmRabt5bi9chYfhur+/C1OXg3TKg/eag1W+6CCWLVmSauV1owmRPxA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -1540,13 +1567,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-linux-s390x": "1.0.4"
|
"@img/sharp-libvips-linux-s390x": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-linux-x64": {
|
"node_modules/@img/sharp-linux-x64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.1.tgz",
|
||||||
"integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==",
|
"integrity": "sha512-wExv7SH9nmoBW3Wr2gvQopX1k8q2g5V5Iag8Zk6AVENsjwd+3adjwxtp3Dcu2QhOXr8W9NusBU6XcQUohBZ5MA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1562,13 +1589,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-linux-x64": "1.0.4"
|
"@img/sharp-libvips-linux-x64": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-linuxmusl-arm64": {
|
"node_modules/@img/sharp-linuxmusl-arm64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.1.tgz",
|
||||||
"integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==",
|
"integrity": "sha512-DfvyxzHxw4WGdPiTF0SOHnm11Xv4aQexvqhRDAoD00MzHekAj9a/jADXeXYCDFH/DzYruwHbXU7uz+H+nWmSOQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -1584,13 +1611,13 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4"
|
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-linuxmusl-x64": {
|
"node_modules/@img/sharp-linuxmusl-x64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.1.tgz",
|
||||||
"integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==",
|
"integrity": "sha512-pax/kTR407vNb9qaSIiWVnQplPcGU8LRIJpDT5o8PdAx5aAA7AS3X9PS8Isw1/WfqgQorPotjrZL3Pqh6C5EBg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1606,20 +1633,20 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-libvips-linuxmusl-x64": "1.0.4"
|
"@img/sharp-libvips-linuxmusl-x64": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-wasm32": {
|
"node_modules/@img/sharp-wasm32": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.1.tgz",
|
||||||
"integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==",
|
"integrity": "sha512-YDybQnYrLQfEpzGOQe7OKcyLUCML4YOXl428gOOzBgN6Gw0rv8dpsJ7PqTHxBnXnwXr8S1mYFSLSa727tpz0xg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"wasm32"
|
"wasm32"
|
||||||
],
|
],
|
||||||
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
|
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emnapi/runtime": "^1.2.0"
|
"@emnapi/runtime": "^1.4.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
@@ -1629,9 +1656,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-win32-ia32": {
|
"node_modules/@img/sharp-win32-ia32": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.1.tgz",
|
||||||
"integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==",
|
"integrity": "sha512-WKf/NAZITnonBf3U1LfdjoMgNO5JYRSlhovhRhMxXVdvWYveM4kM3L8m35onYIdh75cOMCo1BexgVQcCDzyoWw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -1648,9 +1675,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@img/sharp-win32-x64": {
|
"node_modules/@img/sharp-win32-x64": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.1.tgz",
|
||||||
"integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==",
|
"integrity": "sha512-hw1iIAHpNE8q3uMIRCgGOeDoz9KtFNarFLQclLxr/LK1VBkj8nby18RjFvr6aP7USRYAjTZW6yisnBWMX571Tw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4210,12 +4237,413 @@
|
|||||||
"schema-dts": "^1.1.0"
|
"schema-dts": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-darwin-arm64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-darwin-arm64": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-darwin-x64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-darwin-x64": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-darwin-arm64": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-darwin-x64": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-linux-arm": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz",
|
||||||
|
"integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-linux-arm64": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-linux-s390x": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-linux-x64": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-linuxmusl-arm64": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-linux-arm": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-arm": "1.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-linux-arm64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-arm64": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-linux-s390x": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-s390x": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-linux-x64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-x64": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-linuxmusl-arm64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-linuxmusl-x64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linuxmusl-x64": "1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-wasm32": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==",
|
||||||
|
"cpu": [
|
||||||
|
"wasm32"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
|
||||||
|
"optional": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@emnapi/runtime": "^1.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-win32-ia32": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/astro/node_modules/@img/sharp-win32-x64": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/astro/node_modules/package-manager-detector": {
|
"node_modules/astro/node_modules/package-manager-detector": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.1.0.tgz",
|
||||||
"integrity": "sha512-Y8f9qUlBzW8qauJjd/eu6jlpJZsuPJm2ZAV0cDVd420o4EdpH5RPdoCv+60/TdJflGatr4sDfpAL6ArWZbM5tA==",
|
"integrity": "sha512-Y8f9qUlBzW8qauJjd/eu6jlpJZsuPJm2ZAV0cDVd420o4EdpH5RPdoCv+60/TdJflGatr4sDfpAL6ArWZbM5tA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/astro/node_modules/sharp": {
|
||||||
|
"version": "0.33.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
|
||||||
|
"integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"dependencies": {
|
||||||
|
"color": "^4.2.3",
|
||||||
|
"detect-libc": "^2.0.3",
|
||||||
|
"semver": "^7.6.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-darwin-arm64": "0.33.5",
|
||||||
|
"@img/sharp-darwin-x64": "0.33.5",
|
||||||
|
"@img/sharp-libvips-darwin-arm64": "1.0.4",
|
||||||
|
"@img/sharp-libvips-darwin-x64": "1.0.4",
|
||||||
|
"@img/sharp-libvips-linux-arm": "1.0.5",
|
||||||
|
"@img/sharp-libvips-linux-arm64": "1.0.4",
|
||||||
|
"@img/sharp-libvips-linux-s390x": "1.0.4",
|
||||||
|
"@img/sharp-libvips-linux-x64": "1.0.4",
|
||||||
|
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4",
|
||||||
|
"@img/sharp-libvips-linuxmusl-x64": "1.0.4",
|
||||||
|
"@img/sharp-linux-arm": "0.33.5",
|
||||||
|
"@img/sharp-linux-arm64": "0.33.5",
|
||||||
|
"@img/sharp-linux-s390x": "0.33.5",
|
||||||
|
"@img/sharp-linux-x64": "0.33.5",
|
||||||
|
"@img/sharp-linuxmusl-arm64": "0.33.5",
|
||||||
|
"@img/sharp-linuxmusl-x64": "0.33.5",
|
||||||
|
"@img/sharp-wasm32": "0.33.5",
|
||||||
|
"@img/sharp-win32-ia32": "0.33.5",
|
||||||
|
"@img/sharp-win32-x64": "0.33.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/astrojs-compiler-sync": {
|
"node_modules/astrojs-compiler-sync": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/astrojs-compiler-sync/-/astrojs-compiler-sync-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/astrojs-compiler-sync/-/astrojs-compiler-sync-1.0.1.tgz",
|
||||||
@@ -4873,7 +5301,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||||
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"color-convert": "^2.0.1",
|
"color-convert": "^2.0.1",
|
||||||
"color-string": "^1.9.0"
|
"color-string": "^1.9.0"
|
||||||
@@ -4905,7 +5332,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"color-name": "^1.0.0",
|
"color-name": "^1.0.0",
|
||||||
"simple-swizzle": "^0.2.2"
|
"simple-swizzle": "^0.2.2"
|
||||||
@@ -7918,8 +8344,7 @@
|
|||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||||
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
|
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
|
||||||
"license": "MIT",
|
"license": "MIT"
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"node_modules/is-async-function": {
|
"node_modules/is-async-function": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
@@ -12170,16 +12595,15 @@
|
|||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/sharp": {
|
"node_modules/sharp": {
|
||||||
"version": "0.33.5",
|
"version": "0.34.1",
|
||||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
|
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.1.tgz",
|
||||||
"integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==",
|
"integrity": "sha512-1j0w61+eVxu7DawFJtnfYcvSv6qPFvfTaqzTQ2BLknVhHTwGS8sc63ZBF4rzkWMBVKybo4S5OBtDdZahh2A1xg==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"color": "^4.2.3",
|
"color": "^4.2.3",
|
||||||
"detect-libc": "^2.0.3",
|
"detect-libc": "^2.0.3",
|
||||||
"semver": "^7.6.3"
|
"semver": "^7.7.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
@@ -12188,25 +12612,26 @@
|
|||||||
"url": "https://opencollective.com/libvips"
|
"url": "https://opencollective.com/libvips"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@img/sharp-darwin-arm64": "0.33.5",
|
"@img/sharp-darwin-arm64": "0.34.1",
|
||||||
"@img/sharp-darwin-x64": "0.33.5",
|
"@img/sharp-darwin-x64": "0.34.1",
|
||||||
"@img/sharp-libvips-darwin-arm64": "1.0.4",
|
"@img/sharp-libvips-darwin-arm64": "1.1.0",
|
||||||
"@img/sharp-libvips-darwin-x64": "1.0.4",
|
"@img/sharp-libvips-darwin-x64": "1.1.0",
|
||||||
"@img/sharp-libvips-linux-arm": "1.0.5",
|
"@img/sharp-libvips-linux-arm": "1.1.0",
|
||||||
"@img/sharp-libvips-linux-arm64": "1.0.4",
|
"@img/sharp-libvips-linux-arm64": "1.1.0",
|
||||||
"@img/sharp-libvips-linux-s390x": "1.0.4",
|
"@img/sharp-libvips-linux-ppc64": "1.1.0",
|
||||||
"@img/sharp-libvips-linux-x64": "1.0.4",
|
"@img/sharp-libvips-linux-s390x": "1.1.0",
|
||||||
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4",
|
"@img/sharp-libvips-linux-x64": "1.1.0",
|
||||||
"@img/sharp-libvips-linuxmusl-x64": "1.0.4",
|
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0",
|
||||||
"@img/sharp-linux-arm": "0.33.5",
|
"@img/sharp-libvips-linuxmusl-x64": "1.1.0",
|
||||||
"@img/sharp-linux-arm64": "0.33.5",
|
"@img/sharp-linux-arm": "0.34.1",
|
||||||
"@img/sharp-linux-s390x": "0.33.5",
|
"@img/sharp-linux-arm64": "0.34.1",
|
||||||
"@img/sharp-linux-x64": "0.33.5",
|
"@img/sharp-linux-s390x": "0.34.1",
|
||||||
"@img/sharp-linuxmusl-arm64": "0.33.5",
|
"@img/sharp-linux-x64": "0.34.1",
|
||||||
"@img/sharp-linuxmusl-x64": "0.33.5",
|
"@img/sharp-linuxmusl-arm64": "0.34.1",
|
||||||
"@img/sharp-wasm32": "0.33.5",
|
"@img/sharp-linuxmusl-x64": "0.34.1",
|
||||||
"@img/sharp-win32-ia32": "0.33.5",
|
"@img/sharp-wasm32": "0.34.1",
|
||||||
"@img/sharp-win32-x64": "0.33.5"
|
"@img/sharp-win32-ia32": "0.34.1",
|
||||||
|
"@img/sharp-win32-x64": "0.34.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/shebang-command": {
|
"node_modules/shebang-command": {
|
||||||
@@ -12374,7 +12799,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||||
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-arrayish": "^0.3.1"
|
"is-arrayish": "^0.3.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"@astrojs/node": "9.2.1",
|
"@astrojs/node": "9.2.1",
|
||||||
"@astrojs/sitemap": "3.4.0",
|
"@astrojs/sitemap": "3.4.0",
|
||||||
"@fontsource-variable/space-grotesk": "5.2.7",
|
"@fontsource-variable/space-grotesk": "5.2.7",
|
||||||
|
"@fontsource/space-grotesk": "5.2.7",
|
||||||
"@fontsource/inter": "5.2.5",
|
"@fontsource/inter": "5.2.5",
|
||||||
"@prisma/client": "6.8.2",
|
"@prisma/client": "6.8.2",
|
||||||
"@tailwindcss/vite": "4.1.7",
|
"@tailwindcss/vite": "4.1.7",
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
"redis": "5.0.1",
|
"redis": "5.0.1",
|
||||||
"schema-dts": "1.1.5",
|
"schema-dts": "1.1.5",
|
||||||
"seedrandom": "3.0.5",
|
"seedrandom": "3.0.5",
|
||||||
|
"sharp": "0.34.1",
|
||||||
"slugify": "1.6.6",
|
"slugify": "1.6.6",
|
||||||
"tailwind-merge": "3.3.0",
|
"tailwind-merge": "3.3.0",
|
||||||
"tailwind-variants": "1.0.0",
|
"tailwind-variants": "1.0.0",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { isInputError, type ActionAccept, type ActionClient } from 'astro:actions'
|
import { isInputError, type ActionAccept, type ActionClient } from 'astro:actions'
|
||||||
import { Image } from 'astro:assets'
|
|
||||||
|
|
||||||
import { CAPTCHA_LENGTH, generateCaptcha } from '../lib/captcha'
|
import { CAPTCHA_LENGTH, generateCaptcha } from '../lib/captcha'
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
import { Picture } from 'astro:assets'
|
|
||||||
|
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
import { formatDateShort } from '../lib/timeAgo'
|
import { formatDateShort } from '../lib/timeAgo'
|
||||||
|
|
||||||
|
import MyPicture from './MyPicture.astro'
|
||||||
|
|
||||||
import type { Prisma } from '@prisma/client'
|
import type { Prisma } from '@prisma/client'
|
||||||
import type { HTMLAttributes } from 'astro/types'
|
import type { HTMLAttributes } from 'astro/types'
|
||||||
|
|
||||||
@@ -73,13 +73,12 @@ const { messages, userId, class: className, ...htmlProps } = Astro.props
|
|||||||
{!isCurrentUser && !isNextFromSameUser && (
|
{!isCurrentUser && !isNextFromSameUser && (
|
||||||
<p class="text-day-500 mb-0.5 text-xs">
|
<p class="text-day-500 mb-0.5 text-xs">
|
||||||
{!!message.user.picture && (
|
{!!message.user.picture && (
|
||||||
<Picture
|
<MyPicture
|
||||||
src={message.user.picture}
|
src={message.user.picture}
|
||||||
height={16}
|
height={16}
|
||||||
width={16}
|
width={16}
|
||||||
class="inline-block rounded-full align-[-0.33em]"
|
class="inline-block rounded-full align-[-0.33em]"
|
||||||
alt=""
|
alt=""
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{message.user.name}
|
{message.user.name}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
import Image from 'astro/components/Image.astro'
|
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { Markdown } from 'astro-remote'
|
import { Markdown } from 'astro-remote'
|
||||||
import { Schema } from 'astro-seo-schema'
|
import { Schema } from 'astro-seo-schema'
|
||||||
@@ -19,6 +18,7 @@ import { formatDateShort } from '../lib/timeAgo'
|
|||||||
import BadgeSmall from './BadgeSmall.astro'
|
import BadgeSmall from './BadgeSmall.astro'
|
||||||
import CommentModeration from './CommentModeration.astro'
|
import CommentModeration from './CommentModeration.astro'
|
||||||
import CommentReply from './CommentReply.astro'
|
import CommentReply from './CommentReply.astro'
|
||||||
|
import MyPicture from './MyPicture.astro'
|
||||||
import TimeFormatted from './TimeFormatted.astro'
|
import TimeFormatted from './TimeFormatted.astro'
|
||||||
import Tooltip from './Tooltip.astro'
|
import Tooltip from './Tooltip.astro'
|
||||||
|
|
||||||
@@ -158,11 +158,10 @@ const commentUrl = makeCommentUrl({ serviceSlug, commentId: comment.id, origin:
|
|||||||
<span class="flex items-center gap-1">
|
<span class="flex items-center gap-1">
|
||||||
{
|
{
|
||||||
comment.author.picture && (
|
comment.author.picture && (
|
||||||
<Image
|
<MyPicture
|
||||||
src={comment.author.picture}
|
src={comment.author.picture}
|
||||||
alt={`Profile for ${comment.author.displayName ?? comment.author.name}`}
|
alt={`Profile for ${comment.author.displayName ?? comment.author.name}`}
|
||||||
class="size-6 rounded-full bg-zinc-700 object-cover"
|
class="size-6 rounded-full bg-zinc-700 object-cover"
|
||||||
loading="lazy"
|
|
||||||
height={24}
|
height={24}
|
||||||
width={24}
|
width={24}
|
||||||
/>
|
/>
|
||||||
|
|||||||
42
web/src/components/MyPicture.astro
Normal file
42
web/src/components/MyPicture.astro
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
import type { ComponentProps } from 'react'
|
||||||
|
|
||||||
|
import { Picture } from 'astro:assets'
|
||||||
|
|
||||||
|
import defaultServiceImage from '../assets/fallback-service-image.jpg'
|
||||||
|
|
||||||
|
const fallbackImages = {
|
||||||
|
service: defaultServiceImage,
|
||||||
|
} as const satisfies Record<string, typeof defaultServiceImage>
|
||||||
|
|
||||||
|
type Props = Omit<ComponentProps<typeof Picture>, 'src'> & {
|
||||||
|
src: ComponentProps<typeof Picture>['src'] | null | undefined
|
||||||
|
fallback?: keyof typeof fallbackImages
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
src,
|
||||||
|
formats = ['avif', 'webp'],
|
||||||
|
fallback = undefined as keyof typeof fallbackImages | undefined,
|
||||||
|
height,
|
||||||
|
width,
|
||||||
|
...props
|
||||||
|
} = Astro.props
|
||||||
|
|
||||||
|
const fallbackImage = fallback ? fallbackImages[fallback] : undefined
|
||||||
|
---
|
||||||
|
|
||||||
|
{/* eslint-disable @typescript-eslint/no-explicit-any */}
|
||||||
|
{
|
||||||
|
!!(src ?? fallbackImage) && (
|
||||||
|
<Picture
|
||||||
|
src={
|
||||||
|
typeof src === 'string' ? new URL(src, Astro.url).href : ((src ?? fallbackImage) as unknown as string)
|
||||||
|
}
|
||||||
|
formats={formats}
|
||||||
|
height={height ? Number(height) * 2 : undefined}
|
||||||
|
width={width ? Number(width) * 2 : undefined}
|
||||||
|
{...(props as any)}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -2,16 +2,16 @@ import fs from 'node:fs'
|
|||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
|
|
||||||
import { ImageResponse } from '@vercel/og'
|
import { ImageResponse } from '@vercel/og'
|
||||||
|
import sharp from 'sharp'
|
||||||
|
|
||||||
import defaultOGImageBg from '../assets/ogimage-bg.png'
|
import defaultOGImageBg from '../assets/ogimage-bg.png'
|
||||||
import defaultOGImage from '../assets/ogimage.png'
|
import defaultOGImage from '../assets/ogimage.png'
|
||||||
|
import { makeOverallScoreInfo } from '../lib/overallScore'
|
||||||
import { urlWithParams } from '../lib/urls'
|
import { urlWithParams } from '../lib/urls'
|
||||||
|
|
||||||
import type { APIContext } from 'astro'
|
import type { APIContext } from 'astro'
|
||||||
import type { Prettify } from 'ts-essentials'
|
import type { Prettify } from 'ts-essentials'
|
||||||
|
|
||||||
export type GenericOgImageProps = Partial<Record<string, string>>
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
// NOTE //
|
// NOTE //
|
||||||
// Use this website to create and preview templates //
|
// Use this website to create and preview templates //
|
||||||
@@ -52,15 +52,41 @@ const defaultOptions = {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Space Grotesk',
|
||||||
|
weight: 400,
|
||||||
|
style: 'normal',
|
||||||
|
data: fs.readFileSync(
|
||||||
|
path.resolve(
|
||||||
|
process.cwd(),
|
||||||
|
'node_modules',
|
||||||
|
'@fontsource',
|
||||||
|
'space-grotesk',
|
||||||
|
'files',
|
||||||
|
'space-grotesk-latin-400-normal.woff'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Space Grotesk',
|
||||||
|
weight: 700,
|
||||||
|
style: 'normal',
|
||||||
|
data: fs.readFileSync(
|
||||||
|
path.resolve(
|
||||||
|
process.cwd(),
|
||||||
|
'node_modules',
|
||||||
|
'@fontsource',
|
||||||
|
'space-grotesk',
|
||||||
|
'files',
|
||||||
|
'space-grotesk-latin-700-normal.woff'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
} as const satisfies ConstructorParameters<typeof ImageResponse>[1]
|
} as const satisfies ConstructorParameters<typeof ImageResponse>[1]
|
||||||
|
|
||||||
function absoluteUrl(url: string, context: Pick<APIContext, 'url'>) {
|
|
||||||
return new URL(url, context.url.origin).href
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ogImageTemplates = {
|
export const ogImageTemplates = {
|
||||||
default: (_props: Record<never, never> = {}, context: APIContext) => {
|
default: (_props: Record<never, never> = {}, context) => {
|
||||||
return new ImageResponse(
|
return new ImageResponse(
|
||||||
(
|
(
|
||||||
<img
|
<img
|
||||||
@@ -74,37 +100,278 @@ export const ogImageTemplates = {
|
|||||||
defaultOptions
|
defaultOptions
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
generic: ({ title }: { title?: string }, context) => {
|
service: async (
|
||||||
|
{
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
categories,
|
||||||
|
score,
|
||||||
|
imageUrl,
|
||||||
|
}: {
|
||||||
|
title: string
|
||||||
|
description: string
|
||||||
|
categories: {
|
||||||
|
name: string
|
||||||
|
icon: string
|
||||||
|
}[]
|
||||||
|
score: number
|
||||||
|
imageUrl: string | null
|
||||||
|
},
|
||||||
|
context
|
||||||
|
) => {
|
||||||
|
const scoreInfo = makeOverallScoreInfo(score, 10)
|
||||||
|
const scoreColors = {
|
||||||
|
'bg-score-1': '#e26136',
|
||||||
|
'bg-score-2': '#eba370',
|
||||||
|
'bg-score-3': '#eddb82',
|
||||||
|
'bg-score-4': '#8de2d7',
|
||||||
|
'bg-score-5': '#3cdd71',
|
||||||
|
} as const satisfies Record<string, string>
|
||||||
|
const scoreColor =
|
||||||
|
Object.entries(scoreColors).find(([className]) => scoreInfo.classNameBg?.includes(className))?.[1] ??
|
||||||
|
'white'
|
||||||
|
|
||||||
|
const PADING = 80
|
||||||
|
|
||||||
return new ImageResponse(
|
return new ImageResponse(
|
||||||
(
|
(
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: 100,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
color: 'white',
|
color: 'white',
|
||||||
backgroundImage: `url(${absoluteUrl(defaultOGImageBg.src, context)})`,
|
backgroundImage: `url(${absoluteUrl(defaultOGImageBg.src, context)})`,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
padding: '50px 200px',
|
padding: PADING,
|
||||||
textAlign: 'center',
|
|
||||||
justifyContent: 'space-around',
|
|
||||||
alignItems: 'center',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
|
position: 'relative',
|
||||||
|
gap: 20,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span>{title}</span>
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
gap: 10,
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{!!imageUrl && (
|
||||||
|
<img
|
||||||
|
src={absoluteUrl(imageUrl, context)}
|
||||||
|
style={{
|
||||||
|
width: 140,
|
||||||
|
height: 140,
|
||||||
|
borderRadius: 20,
|
||||||
|
objectFit: 'contain',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div style={{ display: 'flex', paddingTop: 20 }}>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
fontSize: 100,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: '#3bdb78',
|
||||||
|
fontFamily: 'Space Grotesk',
|
||||||
|
lineHeight: 1.2,
|
||||||
|
height: 120,
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
marginTop: -20,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
alignItems: 'flex-end',
|
||||||
|
display: 'flex',
|
||||||
|
gap: 50,
|
||||||
|
position: 'relative',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: 10,
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignSelf: 'stretch',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
fontSize: 30,
|
||||||
|
color: 'white',
|
||||||
|
flex: 1,
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
maxHeight: 115,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{description}
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
gap: 40,
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: 50,
|
||||||
|
marginTop: 10,
|
||||||
|
color: 'white',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{await Promise.all(
|
||||||
|
categories.map(async (category) => (
|
||||||
|
<span style={{ display: 'flex', alignItems: 'center', gap: 10, whiteSpace: 'nowrap' }}>
|
||||||
|
<img
|
||||||
|
src={await iconUrl(category.icon, 50)}
|
||||||
|
width={50}
|
||||||
|
height={50}
|
||||||
|
style={{ width: 50, height: 50 }}
|
||||||
|
/>
|
||||||
|
{category.name}
|
||||||
|
</span>
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex' }}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: 150,
|
||||||
|
color: 'black',
|
||||||
|
height: 200,
|
||||||
|
width: 200,
|
||||||
|
borderRadius: 30,
|
||||||
|
backgroundColor: scoreColor,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{score}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="white"
|
||||||
|
width={400}
|
||||||
|
viewBox="0 0 204 28"
|
||||||
|
style={{ position: 'absolute', top: PADING, right: PADING }}
|
||||||
|
>
|
||||||
|
<path d="M1 0a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1h74a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1Zm4 4h2a1 1 0 0 1 1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3h-3a1 1 0 0 1-1-1v-3H9a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm12 0h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm12.82 0h2.37a1 1 0 0 1 .85.46L38 12.27l4.97-7.8A1 1 0 0 1 43.8 4h2.37a1 1 0 0 1 .85 1.54l-6.87 10.8a1 1 0 0 0-.16.53V23a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6.13a1 1 0 0 0-.15-.53l-6.87-10.8A1 1 0 0 1 29.82 4ZM57 4h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H56v12h15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H57a1 1 0 0 1-1-1v-3h-3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h3V5a1 1 0 0 1 1-1zm24 0a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V7.6l9.18 15.9c.18.3.5.5.86.5H99a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v15.4L86.83 4.5a1 1 0 0 0-.87-.5Zm29 0a1 1 0 0 0-1 1v3h12V5a1 1 0 0 0-1-1zm11 4v12h3a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zm0 12h-12v3a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1zm-12 0V8h-3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1zm21-16a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V8h4v15a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V8h4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1zm27 0a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V11.4l5.53 12.02a1 1 0 0 0 .91.58h3.12a1 1 0 0 0 .91-.58L176 11.4V23a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-3.36a1 1 0 0 0-.9.58L168 19.21l-6.73-14.63a1 1 0 0 0-.9-.58Zm32 0a1 1 0 0 0-1 1v3h15a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1zm-1 4h-3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-14a1 1 0 0 1-1-1v-3h7a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-7zm-38 12a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1z" />
|
||||||
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
defaultOptions
|
defaultOptions
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
} as const satisfies Record<string, (props: GenericOgImageProps, context: APIContext) => ImageResponse | null>
|
generic: async (
|
||||||
|
{
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
icon,
|
||||||
|
}: {
|
||||||
|
title: string
|
||||||
|
description?: string | null
|
||||||
|
icon?: string | null
|
||||||
|
},
|
||||||
|
context
|
||||||
|
) => {
|
||||||
|
const PADING = 80
|
||||||
|
|
||||||
|
return new ImageResponse(
|
||||||
|
(
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
color: 'white',
|
||||||
|
backgroundImage: `url(${absoluteUrl(defaultOGImageBg.src, context)})`,
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
padding: PADING,
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
position: 'relative',
|
||||||
|
gap: 20,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="white"
|
||||||
|
width={400}
|
||||||
|
viewBox="0 0 204 28"
|
||||||
|
style={{ marginBottom: 'auto' }}
|
||||||
|
>
|
||||||
|
<path d="M1 0a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1h74a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1Zm4 4h2a1 1 0 0 1 1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3h-3a1 1 0 0 1-1-1v-3H9a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm12 0h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm12.82 0h2.37a1 1 0 0 1 .85.46L38 12.27l4.97-7.8A1 1 0 0 1 43.8 4h2.37a1 1 0 0 1 .85 1.54l-6.87 10.8a1 1 0 0 0-.16.53V23a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6.13a1 1 0 0 0-.15-.53l-6.87-10.8A1 1 0 0 1 29.82 4ZM57 4h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H56v12h15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H57a1 1 0 0 1-1-1v-3h-3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h3V5a1 1 0 0 1 1-1zm24 0a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V7.6l9.18 15.9c.18.3.5.5.86.5H99a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v15.4L86.83 4.5a1 1 0 0 0-.87-.5Zm29 0a1 1 0 0 0-1 1v3h12V5a1 1 0 0 0-1-1zm11 4v12h3a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zm0 12h-12v3a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1zm-12 0V8h-3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1zm21-16a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V8h4v15a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V8h4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1zm27 0a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V11.4l5.53 12.02a1 1 0 0 0 .91.58h3.12a1 1 0 0 0 .91-.58L176 11.4V23a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-3.36a1 1 0 0 0-.9.58L168 19.21l-6.73-14.63a1 1 0 0 0-.9-.58Zm32 0a1 1 0 0 0-1 1v3h15a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1zm-1 4h-3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-14a1 1 0 0 1-1-1v-3h7a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-7zm-38 12a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1z" />
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', paddingTop: 20 }}>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
fontSize: 100,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: '#3bdb78',
|
||||||
|
fontFamily: 'Space Grotesk',
|
||||||
|
lineHeight: 1.2,
|
||||||
|
height: 120,
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
marginTop: -20,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
fontSize: 40,
|
||||||
|
color: 'white',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
maxHeight: 200,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{description}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{!!icon && (
|
||||||
|
<img
|
||||||
|
src={await iconUrl(icon, 200)}
|
||||||
|
width={200}
|
||||||
|
height={200}
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: PADING,
|
||||||
|
right: PADING,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
defaultOptions
|
||||||
|
)
|
||||||
|
},
|
||||||
|
} as const satisfies Record<
|
||||||
|
string,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
(props: any, context: APIContext) => ImageResponse | Promise<ImageResponse | null> | null
|
||||||
|
>
|
||||||
|
|
||||||
type OgImageTemplate = keyof typeof ogImageTemplates
|
type OgImageTemplate = keyof typeof ogImageTemplates
|
||||||
type OgImageProps<T extends OgImageTemplate> = Parameters<(typeof ogImageTemplates)[T]>[0]
|
type OgImageProps<T extends OgImageTemplate> = Parameters<(typeof ogImageTemplates)[T]>[0]
|
||||||
// eslint-disable-next-line @typescript-eslint/sort-type-constituents
|
|
||||||
export type OgImageAllTemplatesWithGenericProps = { template: OgImageTemplate } & GenericOgImageProps
|
|
||||||
|
|
||||||
export type OgImageAllTemplatesWithProps = Prettify<
|
export type OgImageAllTemplatesWithProps = Prettify<
|
||||||
{
|
{
|
||||||
@@ -119,5 +386,44 @@ export function makeOgImageUrl(
|
|||||||
) {
|
) {
|
||||||
return typeof ogImage === 'string'
|
return typeof ogImage === 'string'
|
||||||
? new URL(ogImage, baseUrl).href
|
? new URL(ogImage, baseUrl).href
|
||||||
: urlWithParams(new URL('/ogimage.png', baseUrl), ogImage ?? {})
|
: urlWithParams(new URL('/ogimage.png', baseUrl), { data: JSON.stringify(ogImage ?? {}) })
|
||||||
|
}
|
||||||
|
|
||||||
|
// Utilities ------------------------------------------------------------
|
||||||
|
|
||||||
|
function absoluteUrl(url: string, context: Pick<APIContext, 'url'>) {
|
||||||
|
return new URL(url, context.url.origin).href
|
||||||
|
}
|
||||||
|
|
||||||
|
async function svgUrlToBase64Png(svgUrl: string, width?: number, height?: number): Promise<string> {
|
||||||
|
// 1. Fetch the SVG file
|
||||||
|
const response = await fetch(svgUrl)
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Failed to fetch SVG: ${response.statusText}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const svgBuffer = await response.arrayBuffer()
|
||||||
|
|
||||||
|
// 2. Convert SVG to PNG using sharp
|
||||||
|
let image = sharp(svgBuffer).png().negate({ alpha: false })
|
||||||
|
if (width || height) {
|
||||||
|
image = image.resize(width, height, {
|
||||||
|
fit: 'contain',
|
||||||
|
background: { r: 0, g: 0, b: 0, alpha: 0 },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const pngBuffer = await image.toBuffer()
|
||||||
|
|
||||||
|
// 3. Convert to base64 string
|
||||||
|
const base64 = pngBuffer.toString('base64')
|
||||||
|
return `data:image/png;base64,${base64}`
|
||||||
|
}
|
||||||
|
|
||||||
|
async function iconUrl(icon: string, size = 30) {
|
||||||
|
const [, prefix, name] = /^([^:]+):(.*)$/.exec(icon) ?? []
|
||||||
|
if (!prefix || !name) return undefined
|
||||||
|
const url = `https://api.iconify.design/${prefix}/${name}.svg`
|
||||||
|
const result = await svgUrlToBase64Png(url, size, size)
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { Schema } from 'astro-seo-schema'
|
import { Schema } from 'astro-seo-schema'
|
||||||
|
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
|
import { makeOverallScoreInfo } from '../lib/overallScore'
|
||||||
import { KYCNOTME_SCHEMA_MINI } from '../lib/schema'
|
import { KYCNOTME_SCHEMA_MINI } from '../lib/schema'
|
||||||
import { transformCase } from '../lib/strings'
|
import { transformCase } from '../lib/strings'
|
||||||
|
|
||||||
@@ -16,33 +17,6 @@ export type Props = HTMLAttributes<'div'> & {
|
|||||||
|
|
||||||
const { score, label, total = 10, class: className, itemReviewedId, ...htmlProps } = Astro.props
|
const { score, label, total = 10, class: className, itemReviewedId, ...htmlProps } = Astro.props
|
||||||
|
|
||||||
export function makeOverallScoreInfo(score: number, total = 10) {
|
|
||||||
const classNamesByColor = {
|
|
||||||
red: 'bg-score-1 text-black',
|
|
||||||
orange: 'bg-score-2 text-black',
|
|
||||||
yellow: 'bg-score-3 text-black',
|
|
||||||
blue: 'bg-score-4 text-black',
|
|
||||||
green: 'bg-score-5 text-black',
|
|
||||||
} as const satisfies Record<string, string>
|
|
||||||
|
|
||||||
const formattedScore = Math.round(score).toLocaleString()
|
|
||||||
const n = score / total
|
|
||||||
|
|
||||||
if (n > 1) return { text: '', classNameBg: classNamesByColor.green, formattedScore }
|
|
||||||
if (n >= 0.9 && n <= 1) return { text: 'Excellent', classNameBg: classNamesByColor.green, formattedScore }
|
|
||||||
if (n >= 0.8 && n < 0.9) return { text: 'Very Good', classNameBg: classNamesByColor.blue, formattedScore }
|
|
||||||
if (n >= 0.7 && n < 0.8) return { text: 'Good', classNameBg: classNamesByColor.blue, formattedScore }
|
|
||||||
if (n >= 0.6 && n < 0.7) return { text: 'Okay', classNameBg: classNamesByColor.yellow, formattedScore }
|
|
||||||
if (n >= 0.5 && n < 0.6) {
|
|
||||||
return { text: 'Acceptable', classNameBg: classNamesByColor.yellow, formattedScore }
|
|
||||||
}
|
|
||||||
if (n >= 0.4 && n < 0.5) return { text: 'Bad', classNameBg: classNamesByColor.orange, formattedScore }
|
|
||||||
if (n >= 0.3 && n < 0.4) return { text: 'Very Bad', classNameBg: classNamesByColor.orange, formattedScore }
|
|
||||||
if (n >= 0.2 && n < 0.3) return { text: 'Really Bad', classNameBg: classNamesByColor.red, formattedScore }
|
|
||||||
if (n >= 0 && n < 0.2) return { text: 'Terrible', classNameBg: classNamesByColor.red, formattedScore }
|
|
||||||
return { text: '', classNameBg: undefined, formattedScore }
|
|
||||||
}
|
|
||||||
|
|
||||||
const { text, classNameBg, formattedScore } = makeOverallScoreInfo(score, total)
|
const { text, classNameBg, formattedScore } = makeOverallScoreInfo(score, total)
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { Image } from 'astro:assets'
|
|
||||||
|
|
||||||
import defaultImage from '../assets/fallback-service-image.jpg'
|
|
||||||
import { currencies } from '../constants/currencies'
|
import { currencies } from '../constants/currencies'
|
||||||
import { verificationStatusesByValue } from '../constants/verificationStatus'
|
import { verificationStatusesByValue } from '../constants/verificationStatus'
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
|
import { makeOverallScoreInfo } from '../lib/overallScore'
|
||||||
import { transformCase } from '../lib/strings'
|
import { transformCase } from '../lib/strings'
|
||||||
|
|
||||||
import { makeOverallScoreInfo } from './ScoreSquare.astro'
|
import MyPicture from './MyPicture.astro'
|
||||||
import Tooltip from './Tooltip.astro'
|
import Tooltip from './Tooltip.astro'
|
||||||
|
|
||||||
import type { Prisma } from '@prisma/client'
|
import type { Prisma } from '@prisma/client'
|
||||||
@@ -76,9 +75,9 @@ const overallScoreInfo = makeOverallScoreInfo(overallScore)
|
|||||||
>
|
>
|
||||||
<!-- Header with Icon and Title -->
|
<!-- Header with Icon and Title -->
|
||||||
<div class="flex items-center gap-(--gap)">
|
<div class="flex items-center gap-(--gap)">
|
||||||
<Image
|
<MyPicture
|
||||||
src={// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
src={imageUrl}
|
||||||
imageUrl || (defaultImage as unknown as string)}
|
fallback="service"
|
||||||
alt={name || 'Service logo'}
|
alt={name || 'Service logo'}
|
||||||
class="size-12 shrink-0 rounded-sm object-contain text-white"
|
class="size-12 shrink-0 rounded-sm object-contain text-white"
|
||||||
width={48}
|
width={48}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import { Icon } from 'astro-icon/components'
|
|||||||
|
|
||||||
import { kycLevels } from '../constants/kycLevels'
|
import { kycLevels } from '../constants/kycLevels'
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
|
import { makeOverallScoreInfo } from '../lib/overallScore'
|
||||||
import { type ServicesFiltersObject, type ServicesFiltersOptions } from '../pages/index.astro'
|
import { type ServicesFiltersObject, type ServicesFiltersOptions } from '../pages/index.astro'
|
||||||
|
|
||||||
import Button from './Button.astro'
|
import Button from './Button.astro'
|
||||||
import PillsRadioGroup from './PillsRadioGroup.astro'
|
import PillsRadioGroup from './PillsRadioGroup.astro'
|
||||||
import { makeOverallScoreInfo } from './ScoreSquare.astro'
|
|
||||||
import Tooltip from './Tooltip.astro'
|
import Tooltip from './Tooltip.astro'
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'astro/types'
|
import type { HTMLAttributes } from 'astro/types'
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ type Props = ComponentProps<typeof BaseLayout> &
|
|||||||
author: string
|
author: string
|
||||||
pubDate: string
|
pubDate: string
|
||||||
description: string
|
description: string
|
||||||
|
icon?: string
|
||||||
}>
|
}>
|
||||||
|
|
||||||
const { frontmatter, schemas, ...baseLayoutProps } = Astro.props
|
const { frontmatter, schemas, ...baseLayoutProps } = Astro.props
|
||||||
@@ -23,6 +24,8 @@ const publishDate = frontmatter.pubDate ? new Date(frontmatter.pubDate) : null
|
|||||||
const ogImageTemplateData = {
|
const ogImageTemplateData = {
|
||||||
template: 'generic',
|
template: 'generic',
|
||||||
title: frontmatter.title,
|
title: frontmatter.title,
|
||||||
|
description: frontmatter.description,
|
||||||
|
icon: frontmatter.icon,
|
||||||
} satisfies OgImageAllTemplatesWithProps
|
} satisfies OgImageAllTemplatesWithProps
|
||||||
const weAreAuthor = frontmatter.author.toLowerCase().trim() === 'kycnot.me'
|
const weAreAuthor = frontmatter.author.toLowerCase().trim() === 'kycnot.me'
|
||||||
---
|
---
|
||||||
|
|||||||
26
web/src/lib/overallScore.ts
Normal file
26
web/src/lib/overallScore.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
export function makeOverallScoreInfo(score: number, total = 10) {
|
||||||
|
const classNamesByColor = {
|
||||||
|
red: 'bg-score-1 text-black',
|
||||||
|
orange: 'bg-score-2 text-black',
|
||||||
|
yellow: 'bg-score-3 text-black',
|
||||||
|
blue: 'bg-score-4 text-black',
|
||||||
|
green: 'bg-score-5 text-black',
|
||||||
|
} as const satisfies Record<string, string>
|
||||||
|
|
||||||
|
const formattedScore = Math.round(score).toLocaleString()
|
||||||
|
const n = score / total
|
||||||
|
|
||||||
|
if (n > 1) return { text: '', classNameBg: classNamesByColor.green, formattedScore }
|
||||||
|
if (n >= 0.9 && n <= 1) return { text: 'Excellent', classNameBg: classNamesByColor.green, formattedScore }
|
||||||
|
if (n >= 0.8 && n < 0.9) return { text: 'Very Good', classNameBg: classNamesByColor.blue, formattedScore }
|
||||||
|
if (n >= 0.7 && n < 0.8) return { text: 'Good', classNameBg: classNamesByColor.blue, formattedScore }
|
||||||
|
if (n >= 0.6 && n < 0.7) return { text: 'Okay', classNameBg: classNamesByColor.yellow, formattedScore }
|
||||||
|
if (n >= 0.5 && n < 0.6) {
|
||||||
|
return { text: 'Acceptable', classNameBg: classNamesByColor.yellow, formattedScore }
|
||||||
|
}
|
||||||
|
if (n >= 0.4 && n < 0.5) return { text: 'Bad', classNameBg: classNamesByColor.orange, formattedScore }
|
||||||
|
if (n >= 0.3 && n < 0.4) return { text: 'Very Bad', classNameBg: classNamesByColor.orange, formattedScore }
|
||||||
|
if (n >= 0.2 && n < 0.3) return { text: 'Really Bad', classNameBg: classNamesByColor.red, formattedScore }
|
||||||
|
if (n >= 0 && n < 0.2) return { text: 'Terrible', classNameBg: classNamesByColor.red, formattedScore }
|
||||||
|
return { text: '', classNameBg: undefined, formattedScore }
|
||||||
|
}
|
||||||
@@ -50,7 +50,6 @@ export const ACCEPTED_IMAGE_TYPES = [
|
|||||||
'image/svg+xml',
|
'image/svg+xml',
|
||||||
'image/png',
|
'image/png',
|
||||||
'image/jpeg',
|
'image/jpeg',
|
||||||
'image/jxl',
|
|
||||||
'image/avif',
|
'image/avif',
|
||||||
'image/webp',
|
'image/webp',
|
||||||
] as const satisfies string[]
|
] as const satisfies string[]
|
||||||
@@ -66,7 +65,7 @@ export const imageFileSchema = z
|
|||||||
)
|
)
|
||||||
.refine(
|
.refine(
|
||||||
(file) => !file || ACCEPTED_IMAGE_TYPES.some((type) => file.type === type),
|
(file) => !file || ACCEPTED_IMAGE_TYPES.some((type) => file.type === type),
|
||||||
'Only SVG, PNG, JPG, JPEG XL, AVIF, WebP formats are supported.'
|
'Only SVG, PNG, JPG, AVIF, WebP formats are supported.'
|
||||||
)
|
)
|
||||||
|
|
||||||
export const imageFileSchemaRequired = imageFileSchema.refine((file) => !!file, 'Required')
|
export const imageFileSchemaRequired = imageFileSchema.refine((file) => !!file, 'Required')
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ title: About
|
|||||||
author: KYCnot.me
|
author: KYCnot.me
|
||||||
pubDate: 2025-05-15
|
pubDate: 2025-05-15
|
||||||
description: 'Learn how KYCnot.me website works and about our mission to protect privacy in cryptocurrency.'
|
description: 'Learn how KYCnot.me website works and about our mission to protect privacy in cryptocurrency.'
|
||||||
|
icon: 'ri:information-line'
|
||||||
---
|
---
|
||||||
|
|
||||||
## What is this page?
|
## What is this page?
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const inputErrors = isInputError(result?.error) ? result.error.fields : {}
|
|||||||
<MiniLayout
|
<MiniLayout
|
||||||
pageTitle={`Edit Profile - ${user.name}`}
|
pageTitle={`Edit Profile - ${user.name}`}
|
||||||
description="Edit your user profile"
|
description="Edit your user profile"
|
||||||
ogImage={{ template: 'generic', title: 'Edit Profile' }}
|
ogImage={{ template: 'generic', title: 'Edit Profile', icon: 'ri:user-settings-line' }}
|
||||||
layoutHeader={{
|
layoutHeader={{
|
||||||
icon: 'ri:edit-line',
|
icon: 'ri:edit-line',
|
||||||
title: 'Edit profile',
|
title: 'Edit profile',
|
||||||
|
|||||||
@@ -25,7 +25,12 @@ const prettyToken = preGeneratedToken ? prettifyUserSecretToken(preGeneratedToke
|
|||||||
<MiniLayout
|
<MiniLayout
|
||||||
pageTitle="Create Account"
|
pageTitle="Create Account"
|
||||||
description="Create a new account"
|
description="Create a new account"
|
||||||
ogImage={{ template: 'generic', title: 'Create Account' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Create Account',
|
||||||
|
description: 'Zero data, 100% anonymous',
|
||||||
|
icon: 'ri:user-add-line',
|
||||||
|
}}
|
||||||
layoutHeader={{
|
layoutHeader={{
|
||||||
icon: 'ri:user-add-line',
|
icon: 'ri:user-add-line',
|
||||||
title: 'New account',
|
title: 'New account',
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { actions } from 'astro:actions'
|
import { actions } from 'astro:actions'
|
||||||
import { Picture } from 'astro:assets'
|
|
||||||
import { sortBy } from 'lodash-es'
|
import { sortBy } from 'lodash-es'
|
||||||
|
|
||||||
import defaultServiceImage from '../../assets/fallback-service-image.jpg'
|
|
||||||
import BadgeSmall from '../../components/BadgeSmall.astro'
|
import BadgeSmall from '../../components/BadgeSmall.astro'
|
||||||
import Button from '../../components/Button.astro'
|
import Button from '../../components/Button.astro'
|
||||||
|
import MyPicture from '../../components/MyPicture.astro'
|
||||||
import TimeFormatted from '../../components/TimeFormatted.astro'
|
import TimeFormatted from '../../components/TimeFormatted.astro'
|
||||||
import Tooltip from '../../components/Tooltip.astro'
|
import Tooltip from '../../components/Tooltip.astro'
|
||||||
import { getKarmaTransactionActionInfo } from '../../constants/karmaTransactionActions'
|
import { getKarmaTransactionActionInfo } from '../../constants/karmaTransactionActions'
|
||||||
@@ -161,7 +160,12 @@ if (!user) return Astro.rewrite('/404')
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle={`${user.name} - Account`}
|
pageTitle={`${user.name} - Account`}
|
||||||
description="Manage your user profile"
|
description="Manage your user profile"
|
||||||
ogImage={{ template: 'generic', title: `${user.name} | Account` }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: `${user.name} | Account`,
|
||||||
|
description: 'Manage your user profile',
|
||||||
|
icon: 'ri:user-3-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
className={{
|
className={{
|
||||||
main: 'space-y-6',
|
main: 'space-y-6',
|
||||||
@@ -180,7 +184,13 @@ if (!user) return Astro.rewrite('/404')
|
|||||||
<header class="flex items-center gap-4">
|
<header class="flex items-center gap-4">
|
||||||
{
|
{
|
||||||
user.picture ? (
|
user.picture ? (
|
||||||
<img src={user.picture} alt="" class="ring-day-500/30 size-16 rounded-full ring-2" />
|
<MyPicture
|
||||||
|
src={user.picture}
|
||||||
|
alt=""
|
||||||
|
class="ring-day-500/30 size-16 rounded-full ring-2"
|
||||||
|
width={64}
|
||||||
|
height={64}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div class="bg-day-500/10 ring-day-500/30 text-day-400 flex size-16 items-center justify-center rounded-full ring-2">
|
<div class="bg-day-500/10 ring-day-500/30 text-day-400 flex size-16 items-center justify-center rounded-full ring-2">
|
||||||
<Icon name="ri:user-3-line" class="size-8" />
|
<Icon name="ri:user-3-line" class="size-8" />
|
||||||
@@ -460,8 +470,9 @@ if (!user) return Astro.rewrite('/404')
|
|||||||
href={`/service/${affiliation.service.slug}`}
|
href={`/service/${affiliation.service.slug}`}
|
||||||
class="text-day-300 group flex min-w-32 items-center gap-2 text-sm"
|
class="text-day-300 group flex min-w-32 items-center gap-2 text-sm"
|
||||||
>
|
>
|
||||||
<Picture
|
<MyPicture
|
||||||
src={affiliation.service.imageUrl ?? (defaultServiceImage as unknown as string)}
|
src={affiliation.service.imageUrl}
|
||||||
|
fallback="service"
|
||||||
alt={affiliation.service.name}
|
alt={affiliation.service.name}
|
||||||
width={40}
|
width={40}
|
||||||
height={40}
|
height={40}
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ const message = Astro.url.searchParams.get('message')
|
|||||||
<MiniLayout
|
<MiniLayout
|
||||||
pageTitle="Login"
|
pageTitle="Login"
|
||||||
description="Login to your account"
|
description="Login to your account"
|
||||||
ogImage={{ template: 'generic', title: 'Login' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Login',
|
||||||
|
description: message ?? 'Enter your login key',
|
||||||
|
icon: 'ri:login-box-line',
|
||||||
|
}}
|
||||||
layoutHeader={{
|
layoutHeader={{
|
||||||
icon: 'ri:user-line',
|
icon: 'ri:user-line',
|
||||||
title: 'Welcome back',
|
title: 'Welcome back',
|
||||||
|
|||||||
@@ -17,7 +17,12 @@ const prettyToken = result ? prettifyUserSecretToken(result.data.token) : null
|
|||||||
<MiniLayout
|
<MiniLayout
|
||||||
pageTitle="Welcome"
|
pageTitle="Welcome"
|
||||||
description="New account welcome page"
|
description="New account welcome page"
|
||||||
ogImage={{ template: 'generic', title: 'Welcome' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Welcome',
|
||||||
|
description: 'New account welcome page',
|
||||||
|
icon: 'ri:key-2-line',
|
||||||
|
}}
|
||||||
layoutHeader={{
|
layoutHeader={{
|
||||||
icon: 'ri:key-2-line',
|
icon: 'ri:key-2-line',
|
||||||
title: 'Save your Login Key',
|
title: 'Save your Login Key',
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import {
|
|||||||
} from '@prisma/client'
|
} from '@prisma/client'
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { actions, isInputError } from 'astro:actions'
|
import { actions, isInputError } from 'astro:actions'
|
||||||
import { Image } from 'astro:assets'
|
|
||||||
|
|
||||||
|
import MyPicture from '../../../../components/MyPicture.astro'
|
||||||
import { serviceVisibilities } from '../../../../constants/serviceVisibility'
|
import { serviceVisibilities } from '../../../../constants/serviceVisibility'
|
||||||
import BaseLayout from '../../../../layouts/BaseLayout.astro'
|
import BaseLayout from '../../../../layouts/BaseLayout.astro'
|
||||||
import { cn } from '../../../../lib/cn'
|
import { cn } from '../../../../lib/cn'
|
||||||
@@ -334,7 +334,7 @@ const buttonSmallWarningClasses = cn(
|
|||||||
{
|
{
|
||||||
service.imageUrl ? (
|
service.imageUrl ? (
|
||||||
<div class="mt-2 shrink-0">
|
<div class="mt-2 shrink-0">
|
||||||
<Image
|
<MyPicture
|
||||||
src={service.imageUrl}
|
src={service.imageUrl}
|
||||||
alt="Current service image"
|
alt="Current service image"
|
||||||
width={100}
|
width={100}
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
import { ServiceVisibility, VerificationStatus, type Prisma } from '@prisma/client'
|
import { ServiceVisibility, VerificationStatus, type Prisma } from '@prisma/client'
|
||||||
import { z } from 'astro/zod'
|
import { z } from 'astro/zod'
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { Image } from 'astro:assets'
|
|
||||||
|
|
||||||
import defaultImage from '../../../assets/fallback-service-image.jpg'
|
import MyPicture from '../../../components/MyPicture.astro'
|
||||||
import SortArrowIcon from '../../../components/SortArrowIcon.astro'
|
import SortArrowIcon from '../../../components/SortArrowIcon.astro'
|
||||||
import { getKycLevelInfo } from '../../../constants/kycLevels'
|
import { getKycLevelInfo } from '../../../constants/kycLevels'
|
||||||
import { getVerificationStatusInfo } from '../../../constants/verificationStatus'
|
import { getVerificationStatusInfo } from '../../../constants/verificationStatus'
|
||||||
@@ -343,23 +342,14 @@ const truncate = (text: string, length: number) => {
|
|||||||
<td class="px-4 py-3">
|
<td class="px-4 py-3">
|
||||||
<div class="flex items-center space-x-3">
|
<div class="flex items-center space-x-3">
|
||||||
<div class="h-10 w-10 flex-shrink-0">
|
<div class="h-10 w-10 flex-shrink-0">
|
||||||
{service.imageUrl ? (
|
<MyPicture
|
||||||
<Image
|
src={service.imageUrl}
|
||||||
src={service.imageUrl}
|
fallback="service"
|
||||||
alt={service.name}
|
alt={service.name}
|
||||||
width={40}
|
width={40}
|
||||||
height={40}
|
height={40}
|
||||||
class="h-10 w-10 rounded-md object-cover"
|
class="h-10 w-10 rounded-md object-cover"
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<Image
|
|
||||||
src={defaultImage}
|
|
||||||
alt={service.name}
|
|
||||||
width={40}
|
|
||||||
height={40}
|
|
||||||
class="h-10 w-10 rounded-md object-cover"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
<div class="text-sm font-medium text-zinc-200">{service.name}</div>
|
<div class="text-sm font-medium text-zinc-200">{service.name}</div>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { actions, isInputError } from 'astro:actions'
|
import { actions, isInputError } from 'astro:actions'
|
||||||
import { Image } from 'astro:assets'
|
|
||||||
|
|
||||||
import BadgeSmall from '../../../components/BadgeSmall.astro'
|
import BadgeSmall from '../../../components/BadgeSmall.astro'
|
||||||
import Button from '../../../components/Button.astro'
|
import Button from '../../../components/Button.astro'
|
||||||
@@ -11,6 +10,7 @@ import InputSelect from '../../../components/InputSelect.astro'
|
|||||||
import InputSubmitButton from '../../../components/InputSubmitButton.astro'
|
import InputSubmitButton from '../../../components/InputSubmitButton.astro'
|
||||||
import InputText from '../../../components/InputText.astro'
|
import InputText from '../../../components/InputText.astro'
|
||||||
import InputTextArea from '../../../components/InputTextArea.astro'
|
import InputTextArea from '../../../components/InputTextArea.astro'
|
||||||
|
import MyPicture from '../../../components/MyPicture.astro'
|
||||||
import TimeFormatted from '../../../components/TimeFormatted.astro'
|
import TimeFormatted from '../../../components/TimeFormatted.astro'
|
||||||
import { getServiceUserRoleInfo, serviceUserRoles } from '../../../constants/serviceUserRoles'
|
import { getServiceUserRoleInfo, serviceUserRoles } from '../../../constants/serviceUserRoles'
|
||||||
import BaseLayout from '../../../layouts/BaseLayout.astro'
|
import BaseLayout from '../../../layouts/BaseLayout.astro'
|
||||||
@@ -123,7 +123,7 @@ if (!user) return Astro.rewrite('/404')
|
|||||||
<div class="mt-12">
|
<div class="mt-12">
|
||||||
{
|
{
|
||||||
!!user.picture && (
|
!!user.picture && (
|
||||||
<Image
|
<MyPicture
|
||||||
src={user.picture}
|
src={user.picture}
|
||||||
alt=""
|
alt=""
|
||||||
width={80}
|
width={80}
|
||||||
@@ -218,7 +218,7 @@ if (!user) return Astro.rewrite('/404')
|
|||||||
value={user.picture}
|
value={user.picture}
|
||||||
error={updateInputErrors.pictureFile}
|
error={updateInputErrors.pictureFile}
|
||||||
square
|
square
|
||||||
description="Upload a square image for best results. Supported formats: JPG, PNG, WebP, AVIF, JXL. Max size: 5MB."
|
description="Upload a square image for best results. Supported formats: JPG, PNG, WebP, AVIF. Max size: 5MB."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<InputCardGroup
|
<InputCardGroup
|
||||||
@@ -265,7 +265,7 @@ if (!user) return Astro.rewrite('/404')
|
|||||||
<div class="mb-1 flex items-center justify-between gap-4">
|
<div class="mb-1 flex items-center justify-between gap-4">
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
{!!note.addedByUser?.picture && (
|
{!!note.addedByUser?.picture && (
|
||||||
<Image
|
<MyPicture
|
||||||
src={note.addedByUser.picture}
|
src={note.addedByUser.picture}
|
||||||
alt=""
|
alt=""
|
||||||
width={12}
|
width={12}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { Markdown } from 'astro-remote'
|
import { Markdown } from 'astro-remote'
|
||||||
import { Picture } from 'astro:assets'
|
|
||||||
import { z } from 'astro:content'
|
import { z } from 'astro:content'
|
||||||
import { orderBy } from 'lodash-es'
|
import { orderBy } from 'lodash-es'
|
||||||
|
|
||||||
import BadgeStandard from '../components/BadgeStandard.astro'
|
import BadgeStandard from '../components/BadgeStandard.astro'
|
||||||
import { makeOverallScoreInfo } from '../components/ScoreSquare.astro'
|
import MyPicture from '../components/MyPicture.astro'
|
||||||
import SortArrowIcon from '../components/SortArrowIcon.astro'
|
import SortArrowIcon from '../components/SortArrowIcon.astro'
|
||||||
import { getAttributeCategoryInfo } from '../constants/attributeCategories'
|
import { getAttributeCategoryInfo } from '../constants/attributeCategories'
|
||||||
import { getAttributeTypeInfo } from '../constants/attributeTypes'
|
import { getAttributeTypeInfo } from '../constants/attributeTypes'
|
||||||
@@ -15,6 +14,7 @@ import BaseLayout from '../layouts/BaseLayout.astro'
|
|||||||
import { sortAttributes } from '../lib/attributes'
|
import { sortAttributes } from '../lib/attributes'
|
||||||
import { cn } from '../lib/cn'
|
import { cn } from '../lib/cn'
|
||||||
import { formatNumber } from '../lib/numbers'
|
import { formatNumber } from '../lib/numbers'
|
||||||
|
import { makeOverallScoreInfo } from '../lib/overallScore'
|
||||||
import { zodParseQueryParamsStoringErrors } from '../lib/parseUrlFilters'
|
import { zodParseQueryParamsStoringErrors } from '../lib/parseUrlFilters'
|
||||||
import { prisma } from '../lib/prisma'
|
import { prisma } from '../lib/prisma'
|
||||||
|
|
||||||
@@ -102,8 +102,13 @@ const makeSortUrl = (slug: NonNullable<(typeof filters)['sort-by']>) => {
|
|||||||
|
|
||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle="Attributes"
|
pageTitle="Attributes"
|
||||||
description="Browse all available service attributes used to evaluate privacy and trust scores on KYCnot.me."
|
description="Browse all available service attributes used to evaluate privacy and trust scores."
|
||||||
ogImage={{ template: 'generic', title: 'All attributes' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'All attributes',
|
||||||
|
description: 'Browse all available service attributes',
|
||||||
|
icon: 'ri:list-radio',
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<h1 class="font-title mb-2 text-center text-3xl font-bold text-white">Service attributes</h1>
|
<h1 class="font-title mb-2 text-center text-3xl font-bold text-white">Service attributes</h1>
|
||||||
|
|
||||||
@@ -202,12 +207,11 @@ const makeSortUrl = (slug: NonNullable<(typeof filters)['sort-by']>) => {
|
|||||||
class="flex items-center gap-2 rounded-md p-2 transition-colors hover:bg-zinc-800"
|
class="flex items-center gap-2 rounded-md p-2 transition-colors hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
{service.imageUrl ? (
|
{service.imageUrl ? (
|
||||||
<Picture
|
<MyPicture
|
||||||
src={service.imageUrl}
|
src={service.imageUrl}
|
||||||
alt={service.name}
|
alt={service.name}
|
||||||
width={24}
|
width={24}
|
||||||
height={24}
|
height={24}
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
class="size-6 shrink-0 rounded-xs object-contain"
|
class="size-6 shrink-0 rounded-xs object-contain"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -349,12 +353,11 @@ const makeSortUrl = (slug: NonNullable<(typeof filters)['sort-by']>) => {
|
|||||||
class="flex items-center gap-2 rounded-md p-2 transition-colors hover:bg-zinc-800"
|
class="flex items-center gap-2 rounded-md p-2 transition-colors hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
{service.imageUrl ? (
|
{service.imageUrl ? (
|
||||||
<Picture
|
<MyPicture
|
||||||
src={service.imageUrl}
|
src={service.imageUrl}
|
||||||
alt={service.name}
|
alt={service.name}
|
||||||
width={24}
|
width={24}
|
||||||
height={24}
|
height={24}
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
class="size-6 shrink-0 rounded-xs object-contain"
|
class="size-6 shrink-0 rounded-xs object-contain"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
import { z } from 'astro/zod'
|
import { z } from 'astro/zod'
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { Picture } from 'astro:assets'
|
|
||||||
import { orderBy } from 'lodash-es'
|
import { orderBy } from 'lodash-es'
|
||||||
|
|
||||||
import Button from '../components/Button.astro'
|
import Button from '../components/Button.astro'
|
||||||
import FormatTimeInterval from '../components/FormatTimeInterval.astro'
|
import FormatTimeInterval from '../components/FormatTimeInterval.astro'
|
||||||
|
import MyPicture from '../components/MyPicture.astro'
|
||||||
import TimeFormatted from '../components/TimeFormatted.astro'
|
import TimeFormatted from '../components/TimeFormatted.astro'
|
||||||
import {
|
import {
|
||||||
eventTypes,
|
eventTypes,
|
||||||
@@ -151,7 +151,12 @@ const createUrlWithoutFilter = (paramName: keyof typeof params) => {
|
|||||||
description="Discover important events, updates, and news about KYC-free services in chronological order."
|
description="Discover important events, updates, and news about KYC-free services in chronological order."
|
||||||
widthClassName="max-w-screen-lg"
|
widthClassName="max-w-screen-lg"
|
||||||
className={{ main: 'sm:flex sm:items-start sm:gap-6' }}
|
className={{ main: 'sm:flex sm:items-start sm:gap-6' }}
|
||||||
ogImage={{ template: 'generic', title: 'Events' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Events',
|
||||||
|
description: 'Discover important events, updates, and news about KYC-free services',
|
||||||
|
icon: 'ri:calendar-event-line',
|
||||||
|
}}
|
||||||
htmx
|
htmx
|
||||||
>
|
>
|
||||||
<h1 class="font-title mb-6 block text-center text-2xl font-bold text-white sm:hidden">
|
<h1 class="font-title mb-6 block text-center text-2xl font-bold text-white sm:hidden">
|
||||||
@@ -287,12 +292,11 @@ const createUrlWithoutFilter = (paramName: keyof typeof params) => {
|
|||||||
class="group flex h-8 items-center gap-2 rounded-full border border-green-500/30 bg-black/40 px-3 text-sm text-white"
|
class="group flex h-8 items-center gap-2 rounded-full border border-green-500/30 bg-black/40 px-3 text-sm text-white"
|
||||||
>
|
>
|
||||||
{service?.imageUrl && (
|
{service?.imageUrl && (
|
||||||
<Picture
|
<MyPicture
|
||||||
src={service.imageUrl}
|
src={service.imageUrl}
|
||||||
alt={service.name}
|
alt={service.name}
|
||||||
width={16}
|
width={16}
|
||||||
height={16}
|
height={16}
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
class="size-4 shrink-0 rounded-xs object-contain"
|
class="size-4 shrink-0 rounded-xs object-contain"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -385,12 +389,11 @@ const createUrlWithoutFilter = (paramName: keyof typeof params) => {
|
|||||||
class="-m-1.5 flex w-fit items-center rounded-md p-1.5 leading-none transition-colors hover:bg-zinc-800"
|
class="-m-1.5 flex w-fit items-center rounded-md p-1.5 leading-none transition-colors hover:bg-zinc-800"
|
||||||
>
|
>
|
||||||
{event.service.imageUrl && (
|
{event.service.imageUrl && (
|
||||||
<Picture
|
<MyPicture
|
||||||
src={event.service.imageUrl}
|
src={event.service.imageUrl}
|
||||||
alt={event.service.name}
|
alt={event.service.name}
|
||||||
width={16}
|
width={16}
|
||||||
height={16}
|
height={16}
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
class="size-4 shrink-0 rounded-xs object-contain"
|
class="size-4 shrink-0 rounded-xs object-contain"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
layout: ../layouts/MarkdownLayout.astro
|
layout: ../layouts/MarkdownLayout.astro
|
||||||
title: How does karma work?
|
title: How does karma work?
|
||||||
description: "KYCnot.me has a user karma system, here's how it works"
|
description: "KYCnot.me has a user karma system, here's how it works"
|
||||||
|
icon: 'ri:hearts-line'
|
||||||
author: KYCnot.me
|
author: KYCnot.me
|
||||||
pubDate: 2025-05-15
|
pubDate: 2025-05-15
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -183,7 +183,12 @@ const notifications = dbNotifications.map((notification) => ({
|
|||||||
pageTitle="Notifications"
|
pageTitle="Notifications"
|
||||||
description="View your notifications and manage your notification preferences."
|
description="View your notifications and manage your notification preferences."
|
||||||
widthClassName="max-w-screen-lg"
|
widthClassName="max-w-screen-lg"
|
||||||
ogImage={{ template: 'generic', title: 'Notifications' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Notifications',
|
||||||
|
description: 'View and manage your notifications',
|
||||||
|
icon: 'ri:notification-line',
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<section class="mx-auto w-full">
|
<section class="mx-auto w-full">
|
||||||
<div class="mb-4 flex items-center justify-between">
|
<div class="mb-4 flex items-center justify-between">
|
||||||
|
|||||||
@@ -1,19 +1,31 @@
|
|||||||
import { ogImageTemplates } from '../components/OgImage'
|
import { ogImageTemplates, type OgImageAllTemplatesWithProps } from '../components/OgImage'
|
||||||
import { urlParamsToObject } from '../lib/urls'
|
|
||||||
|
|
||||||
import type { APIRoute } from 'astro'
|
import type { APIRoute } from 'astro'
|
||||||
|
import type { Misc } from 'ts-toolbelt'
|
||||||
|
|
||||||
export const GET: APIRoute = (context) => {
|
function toJSON<T extends Misc.JSON.Value>(data: string | null | undefined): T | undefined {
|
||||||
const { template, ...props } = urlParamsToObject(context.url.searchParams)
|
if (!data) return undefined
|
||||||
|
try {
|
||||||
|
return JSON.parse(data) as T
|
||||||
|
} catch (_error) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!template) return ogImageTemplates.default({}, context)
|
export const GET: APIRoute = async (context) => {
|
||||||
|
const { template, ...props } = toJSON<OgImageAllTemplatesWithProps>(
|
||||||
|
context.url.searchParams.get('data')
|
||||||
|
) ?? { template: 'default' }
|
||||||
|
|
||||||
|
if (!template as unknown) return ogImageTemplates.default({}, context)
|
||||||
|
|
||||||
if (!(template in ogImageTemplates)) {
|
if (!(template in ogImageTemplates)) {
|
||||||
console.error(`Invalid template: "${template}"`)
|
console.error(`Invalid template: "${template}"`)
|
||||||
return ogImageTemplates.default({}, context)
|
return ogImageTemplates.default({}, context)
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = ogImageTemplates[template as keyof typeof ogImageTemplates](props, context)
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any
|
||||||
|
const response = await ogImageTemplates[template](props as any, context)
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
if (!response) {
|
if (!response) {
|
||||||
console.error(`Cannot generate image for template: ${template} and props: ${JSON.stringify(props)}`)
|
console.error(`Cannot generate image for template: ${template} and props: ${JSON.stringify(props)}`)
|
||||||
|
|||||||
@@ -86,7 +86,12 @@ const statusInfo = getServiceSuggestionStatusInfo(serviceSuggestion.status)
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle={`${serviceSuggestion.service.name} | Service suggestion`}
|
pageTitle={`${serviceSuggestion.service.name} | Service suggestion`}
|
||||||
description="View your service suggestion"
|
description="View your service suggestion"
|
||||||
ogImage={{ template: 'generic', title: serviceSuggestion.service.name }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'My service suggestions',
|
||||||
|
description: 'View and manage your service suggestion',
|
||||||
|
icon: 'ri:service-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
htmx
|
htmx
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
|
|||||||
@@ -65,7 +65,12 @@ if (!service) return Astro.rewrite('/404')
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle="Edit service"
|
pageTitle="Edit service"
|
||||||
description="Suggest an edit to service"
|
description="Suggest an edit to service"
|
||||||
ogImage={{ template: 'generic', title: 'Edit service' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Edit service',
|
||||||
|
description: 'Suggest an edit to service',
|
||||||
|
icon: 'ri:edit-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { actions } from 'astro:actions'
|
import { actions } from 'astro:actions'
|
||||||
import { Picture } from 'astro:assets'
|
|
||||||
import { z } from 'astro:content'
|
import { z } from 'astro:content'
|
||||||
|
|
||||||
import defaultServiceImage from '../../assets/fallback-service-image.jpg'
|
|
||||||
import Button from '../../components/Button.astro'
|
import Button from '../../components/Button.astro'
|
||||||
|
import MyPicture from '../../components/MyPicture.astro'
|
||||||
import TimeFormatted from '../../components/TimeFormatted.astro'
|
import TimeFormatted from '../../components/TimeFormatted.astro'
|
||||||
import Tooltip from '../../components/Tooltip.astro'
|
import Tooltip from '../../components/Tooltip.astro'
|
||||||
import {
|
import {
|
||||||
@@ -72,7 +71,12 @@ const success = !!createResult && !createResult.error
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle="My service suggestions"
|
pageTitle="My service suggestions"
|
||||||
description="Manage your service suggestions"
|
description="Manage your service suggestions"
|
||||||
ogImage={{ template: 'generic', title: 'Service suggestions' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'Service suggestions',
|
||||||
|
description: 'Manage your service suggestions',
|
||||||
|
icon: 'ri:service-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{
|
{
|
||||||
@@ -122,13 +126,13 @@ const success = !!createResult && !createResult.error
|
|||||||
href={`/service/${suggestion.service.slug}`}
|
href={`/service/${suggestion.service.slug}`}
|
||||||
class="inline-flex w-full min-w-32 items-center gap-2 hover:underline"
|
class="inline-flex w-full min-w-32 items-center gap-2 hover:underline"
|
||||||
>
|
>
|
||||||
<Picture
|
<MyPicture
|
||||||
src={suggestion.service.imageUrl ?? (defaultServiceImage as unknown as string)}
|
src={suggestion.service.imageUrl}
|
||||||
|
fallback="service"
|
||||||
alt={suggestion.service.name}
|
alt={suggestion.service.name}
|
||||||
width={32}
|
width={32}
|
||||||
height={32}
|
height={32}
|
||||||
class="inline-block size-8 min-w-8 shrink-0 rounded-md"
|
class="inline-block size-8 min-w-8 shrink-0 rounded-md"
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
/>
|
/>
|
||||||
<span class="shrink truncate">{suggestion.service.name}</span>
|
<span class="shrink truncate">{suggestion.service.name}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -65,7 +65,12 @@ const [categories, attributes] = await Astro.locals.banners.tryMany([
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle="New service"
|
pageTitle="New service"
|
||||||
description="Suggest a new service to be added to KYCnot.me"
|
description="Suggest a new service to be added to KYCnot.me"
|
||||||
ogImage={{ template: 'generic', title: 'New service' }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
title: 'New service',
|
||||||
|
description: 'Suggest a new service to be listed',
|
||||||
|
icon: 'ri:add-circle-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import { Icon } from 'astro-icon/components'
|
|||||||
import { Markdown } from 'astro-remote'
|
import { Markdown } from 'astro-remote'
|
||||||
import { Schema } from 'astro-seo-schema'
|
import { Schema } from 'astro-seo-schema'
|
||||||
import { actions } from 'astro:actions'
|
import { actions } from 'astro:actions'
|
||||||
import { Picture } from 'astro:assets'
|
import { head, orderBy, pick, shuffle, sortBy, tail } from 'lodash-es'
|
||||||
import { head, orderBy, shuffle, sortBy, tail } from 'lodash-es'
|
|
||||||
|
|
||||||
import AdminOnly from '../../components/AdminOnly.astro'
|
import AdminOnly from '../../components/AdminOnly.astro'
|
||||||
import BadgeSmall from '../../components/BadgeSmall.astro'
|
import BadgeSmall from '../../components/BadgeSmall.astro'
|
||||||
@@ -17,6 +16,7 @@ import DropdownButton from '../../components/DropdownButton.astro'
|
|||||||
import DropdownButtonItemForm from '../../components/DropdownButtonItemForm.astro'
|
import DropdownButtonItemForm from '../../components/DropdownButtonItemForm.astro'
|
||||||
import DropdownButtonItemLink from '../../components/DropdownButtonItemLink.astro'
|
import DropdownButtonItemLink from '../../components/DropdownButtonItemLink.astro'
|
||||||
import FormatTimeInterval from '../../components/FormatTimeInterval.astro'
|
import FormatTimeInterval from '../../components/FormatTimeInterval.astro'
|
||||||
|
import MyPicture from '../../components/MyPicture.astro'
|
||||||
import { makeOgImageUrl, type OgImageAllTemplatesWithProps } from '../../components/OgImage'
|
import { makeOgImageUrl, type OgImageAllTemplatesWithProps } from '../../components/OgImage'
|
||||||
import ScoreGauge from '../../components/ScoreGauge.astro'
|
import ScoreGauge from '../../components/ScoreGauge.astro'
|
||||||
import ScoreSquare from '../../components/ScoreSquare.astro'
|
import ScoreSquare from '../../components/ScoreSquare.astro'
|
||||||
@@ -349,8 +349,12 @@ const getVerificationStepStatusInfo = (status: VerificationStepStatus) => {
|
|||||||
const itemReviewedId = new URL(`/service/${service.slug}`, Astro.url).href
|
const itemReviewedId = new URL(`/service/${service.slug}`, Astro.url).href
|
||||||
|
|
||||||
const ogImageTemplateData = {
|
const ogImageTemplateData = {
|
||||||
template: 'generic',
|
template: 'service',
|
||||||
title: service.name,
|
title: service.name,
|
||||||
|
description: service.description,
|
||||||
|
categories: service.categories.map((category) => pick(category, ['name', 'icon'])),
|
||||||
|
score: service.overallScore,
|
||||||
|
imageUrl: service.imageUrl,
|
||||||
} satisfies OgImageAllTemplatesWithProps
|
} satisfies OgImageAllTemplatesWithProps
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -477,9 +481,8 @@ const ogImageTemplateData = {
|
|||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
{
|
{
|
||||||
!!service.imageUrl && (
|
!!service.imageUrl && (
|
||||||
<Picture
|
<MyPicture
|
||||||
src={service.imageUrl}
|
src={service.imageUrl}
|
||||||
formats={['jxl', 'avif', 'webp']}
|
|
||||||
alt={service.name || "Service's logo"}
|
alt={service.name || "Service's logo"}
|
||||||
class="size-12 shrink-0 rounded-sm object-contain"
|
class="size-12 shrink-0 rounded-sm object-contain"
|
||||||
width={48}
|
width={48}
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
---
|
---
|
||||||
import { Icon } from 'astro-icon/components'
|
import { Icon } from 'astro-icon/components'
|
||||||
import { actions } from 'astro:actions'
|
import { actions } from 'astro:actions'
|
||||||
import { Picture } from 'astro:assets'
|
|
||||||
import { sortBy } from 'lodash-es'
|
import { sortBy } from 'lodash-es'
|
||||||
|
|
||||||
import defaultServiceImage from '../../assets/fallback-service-image.jpg'
|
|
||||||
import AdminOnly from '../../components/AdminOnly.astro'
|
import AdminOnly from '../../components/AdminOnly.astro'
|
||||||
import BadgeSmall from '../../components/BadgeSmall.astro'
|
import BadgeSmall from '../../components/BadgeSmall.astro'
|
||||||
import InputSubmitButton from '../../components/InputSubmitButton.astro'
|
import InputSubmitButton from '../../components/InputSubmitButton.astro'
|
||||||
import InputTextArea from '../../components/InputTextArea.astro'
|
import InputTextArea from '../../components/InputTextArea.astro'
|
||||||
|
import MyPicture from '../../components/MyPicture.astro'
|
||||||
import TimeFormatted from '../../components/TimeFormatted.astro'
|
import TimeFormatted from '../../components/TimeFormatted.astro'
|
||||||
import Tooltip from '../../components/Tooltip.astro'
|
import Tooltip from '../../components/Tooltip.astro'
|
||||||
import { getKarmaTransactionActionInfo } from '../../constants/karmaTransactionActions'
|
import { getKarmaTransactionActionInfo } from '../../constants/karmaTransactionActions'
|
||||||
@@ -178,7 +177,13 @@ const isCurrentUser = !!Astro.locals.user && user.id === Astro.locals.user.id
|
|||||||
<BaseLayout
|
<BaseLayout
|
||||||
pageTitle={`${user.name} - Account`}
|
pageTitle={`${user.name} - Account`}
|
||||||
description="Manage your user profile"
|
description="Manage your user profile"
|
||||||
ogImage={{ template: 'generic', title: `${user.name} | Account` }}
|
ogImage={{
|
||||||
|
template: 'generic',
|
||||||
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||||
|
title: user.displayName || user.name,
|
||||||
|
description: 'User profile page',
|
||||||
|
icon: 'ri:user-3-line',
|
||||||
|
}}
|
||||||
widthClassName="max-w-screen-md"
|
widthClassName="max-w-screen-md"
|
||||||
className={{
|
className={{
|
||||||
main: 'space-y-6',
|
main: 'space-y-6',
|
||||||
@@ -238,7 +243,13 @@ const isCurrentUser = !!Astro.locals.user && user.id === Astro.locals.user.id
|
|||||||
<header class="flex items-center gap-4">
|
<header class="flex items-center gap-4">
|
||||||
{
|
{
|
||||||
user.picture ? (
|
user.picture ? (
|
||||||
<img src={user.picture} alt="" class="ring-day-500/30 size-16 rounded-full ring-2" />
|
<MyPicture
|
||||||
|
src={user.picture}
|
||||||
|
alt=""
|
||||||
|
class="ring-day-500/30 size-16 rounded-full ring-2"
|
||||||
|
width={64}
|
||||||
|
height={64}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div class="bg-day-500/10 ring-day-500/30 text-day-400 flex size-16 items-center justify-center rounded-full ring-2">
|
<div class="bg-day-500/10 ring-day-500/30 text-day-400 flex size-16 items-center justify-center rounded-full ring-2">
|
||||||
<Icon name="ri:user-3-line" class="size-8" />
|
<Icon name="ri:user-3-line" class="size-8" />
|
||||||
@@ -555,8 +566,9 @@ const isCurrentUser = !!Astro.locals.user && user.id === Astro.locals.user.id
|
|||||||
href={`/service/${affiliation.service.slug}`}
|
href={`/service/${affiliation.service.slug}`}
|
||||||
class="text-day-300 group flex min-w-32 items-center gap-2 text-sm"
|
class="text-day-300 group flex min-w-32 items-center gap-2 text-sm"
|
||||||
>
|
>
|
||||||
<Picture
|
<MyPicture
|
||||||
src={affiliation.service.imageUrl ?? (defaultServiceImage as unknown as string)}
|
src={affiliation.service.imageUrl}
|
||||||
|
fallback="service"
|
||||||
alt={affiliation.service.name}
|
alt={affiliation.service.name}
|
||||||
width={40}
|
width={40}
|
||||||
height={40}
|
height={40}
|
||||||
|
|||||||
Reference in New Issue
Block a user