Add profile and house background preferences to SitePreferences: Extend SitePreferences model and related services to include profileBackground and houseBackground fields. Update API and UI components to support new background settings, enhancing user customization options.
This commit is contained in:
@@ -28,3 +28,4 @@ export async function GET() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ export async function GET() {
|
||||
eventsBackground: null,
|
||||
leaderboardBackground: null,
|
||||
challengesBackground: null,
|
||||
profileBackground: null,
|
||||
houseBackground: null,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,6 +23,8 @@ export async function GET() {
|
||||
eventsBackground: sitePreferences.eventsBackground,
|
||||
leaderboardBackground: sitePreferences.leaderboardBackground,
|
||||
challengesBackground: sitePreferences.challengesBackground,
|
||||
profileBackground: sitePreferences.profileBackground,
|
||||
houseBackground: sitePreferences.houseBackground,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error fetching preferences:", error);
|
||||
@@ -30,6 +34,8 @@ export async function GET() {
|
||||
eventsBackground: null,
|
||||
leaderboardBackground: null,
|
||||
challengesBackground: null,
|
||||
profileBackground: null,
|
||||
houseBackground: null,
|
||||
},
|
||||
{ status: 200 }
|
||||
);
|
||||
|
||||
@@ -40,3 +40,4 @@ export async function GET() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export default async function HousesPage() {
|
||||
username: "asc",
|
||||
},
|
||||
}),
|
||||
getBackgroundImage("challenges", "/got-2.jpg"),
|
||||
getBackgroundImage("houses", "/got-2.jpg"),
|
||||
]);
|
||||
|
||||
// Sérialiser les données pour le client
|
||||
|
||||
@@ -29,7 +29,7 @@ export default async function ProfilePage() {
|
||||
score: true,
|
||||
createdAt: true,
|
||||
}),
|
||||
getBackgroundImage("home", "/got-background.jpg"),
|
||||
getBackgroundImage("profile", "/got-background.jpg"),
|
||||
]);
|
||||
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user