Merge branch 'v2' into renovate/astro-and-starlight-packages

This commit is contained in:
Vitor Ayres
2025-10-24 00:28:58 -03:00
committed by GitHub
3 changed files with 15 additions and 5 deletions

BIN
src/assets/fallback.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -2,6 +2,7 @@
import { Image } from 'astro:assets';
import { OC_IMAGE_DIMENSION } from 'packages/fetch-sponsors/config';
import { type OpenCollectiveSponsor as Sponsor } from 'packages/fetch-sponsors/types';
import fallbackImage from 'src/assets/fallback.jpg';
interface Props {
sponsor: Sponsor;
@@ -18,6 +19,11 @@ const roundingStyle: Record<Sponsor['type'], string> = {
function getUrl(sponsor: Sponsor): string {
return `${sponsor.socialLinks?.website ?? sponsor.profileUrl}?ref=tauri.app&utm_source=tauri.app`;
}
const res = await fetch(sponsor.avatarUrl, { method: 'HEAD' });
if (res && !res.ok) {
sponsor.avatarUrl = fallbackImage.src;
}
---
{

View File

@@ -113,11 +113,15 @@ export const config = {
// ensure the rust project is built since we expect this binary to exist for the webdriver sessions
onPrepare: () => {
// Remove the extra `--` if you're not using npm!
spawnSync('npm', ['run', 'tauri', 'build', '--', '--debug', '--no-bundle'], {
spawnSync(
'npm',
['run', 'tauri', 'build', '--', '--debug', '--no-bundle'],
{
cwd: path.resolve(__dirname, '..'),
stdio: 'inherit',
shell: true,
});
}
);
},
// ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests