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
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m23s
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user