Add challenges background preference support: Extend site preferences and related components to include challengesBackground, update API and UI to handle new background image settings for challenges.
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m23s

This commit is contained in:
Julien Froidefond
2025-12-15 21:26:30 +01:00
parent 83446759fe
commit d3a4fa7cf5
25 changed files with 8373 additions and 12328 deletions

View File

@@ -6,6 +6,7 @@ export interface UpdateSitePreferencesInput {
homeBackground?: string | null;
eventsBackground?: string | null;
leaderboardBackground?: string | null;
challengesBackground?: string | null;
}
/**
@@ -36,6 +37,7 @@ export class SitePreferencesService {
homeBackground: null,
eventsBackground: null,
leaderboardBackground: null,
challengesBackground: null,
},
});
}
@@ -64,6 +66,10 @@ export class SitePreferencesService {
data.leaderboardBackground === ""
? null
: (data.leaderboardBackground ?? undefined),
challengesBackground:
data.challengesBackground === ""
? null
: (data.challengesBackground ?? undefined),
},
create: {
id: "global",
@@ -75,6 +81,10 @@ export class SitePreferencesService {
data.leaderboardBackground === ""
? null
: (data.leaderboardBackground ?? null),
challengesBackground:
data.challengesBackground === ""
? null
: (data.challengesBackground ?? null),
},
});
}
@@ -83,7 +93,7 @@ export class SitePreferencesService {
* Récupère l'image de fond pour une page donnée
*/
async getBackgroundImage(
page: "home" | "events" | "leaderboard",
page: "home" | "events" | "leaderboard" | "challenges",
defaultImage: string
): Promise<string> {
try {