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:
@@ -19,6 +19,7 @@ export async function updateSitePreferences(data: {
|
|||||||
homeBackground?: string | null;
|
homeBackground?: string | null;
|
||||||
eventsBackground?: string | null;
|
eventsBackground?: string | null;
|
||||||
leaderboardBackground?: string | null;
|
leaderboardBackground?: string | null;
|
||||||
|
challengesBackground?: string | null;
|
||||||
}) {
|
}) {
|
||||||
try {
|
try {
|
||||||
await checkAdminAccess()();
|
await checkAdminAccess()();
|
||||||
@@ -27,12 +28,14 @@ export async function updateSitePreferences(data: {
|
|||||||
homeBackground: data.homeBackground,
|
homeBackground: data.homeBackground,
|
||||||
eventsBackground: data.eventsBackground,
|
eventsBackground: data.eventsBackground,
|
||||||
leaderboardBackground: data.leaderboardBackground,
|
leaderboardBackground: data.leaderboardBackground,
|
||||||
|
challengesBackground: data.challengesBackground,
|
||||||
});
|
});
|
||||||
|
|
||||||
revalidatePath("/admin");
|
revalidatePath("/admin");
|
||||||
revalidatePath("/");
|
revalidatePath("/");
|
||||||
revalidatePath("/events");
|
revalidatePath("/events");
|
||||||
revalidatePath("/leaderboard");
|
revalidatePath("/leaderboard");
|
||||||
|
revalidatePath("/challenges");
|
||||||
|
|
||||||
return { success: true, data: preferences };
|
return { success: true, data: preferences };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export async function GET() {
|
|||||||
homeBackground: null,
|
homeBackground: null,
|
||||||
eventsBackground: null,
|
eventsBackground: null,
|
||||||
leaderboardBackground: null,
|
leaderboardBackground: null,
|
||||||
|
challengesBackground: null,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ export async function GET() {
|
|||||||
homeBackground: sitePreferences.homeBackground,
|
homeBackground: sitePreferences.homeBackground,
|
||||||
eventsBackground: sitePreferences.eventsBackground,
|
eventsBackground: sitePreferences.eventsBackground,
|
||||||
leaderboardBackground: sitePreferences.leaderboardBackground,
|
leaderboardBackground: sitePreferences.leaderboardBackground,
|
||||||
|
challengesBackground: sitePreferences.challengesBackground,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching preferences:", error);
|
console.error("Error fetching preferences:", error);
|
||||||
@@ -27,6 +29,7 @@ export async function GET() {
|
|||||||
homeBackground: null,
|
homeBackground: null,
|
||||||
eventsBackground: null,
|
eventsBackground: null,
|
||||||
leaderboardBackground: null,
|
leaderboardBackground: null,
|
||||||
|
challengesBackground: null,
|
||||||
},
|
},
|
||||||
{ status: 200 }
|
{ status: 200 }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ export default async function ChallengesPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const backgroundImage = await getBackgroundImage(
|
const backgroundImage = await getBackgroundImage(
|
||||||
"home",
|
"challenges",
|
||||||
"/got-background.jpg"
|
"/got-2.jpg"
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ interface SitePreferences {
|
|||||||
homeBackground: string | null;
|
homeBackground: string | null;
|
||||||
eventsBackground: string | null;
|
eventsBackground: string | null;
|
||||||
leaderboardBackground: string | null;
|
leaderboardBackground: string | null;
|
||||||
|
challengesBackground: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BackgroundPreferencesProps {
|
interface BackgroundPreferencesProps {
|
||||||
@@ -20,6 +21,7 @@ const DEFAULT_IMAGES = {
|
|||||||
home: "/got-2.jpg",
|
home: "/got-2.jpg",
|
||||||
events: "/got-2.jpg",
|
events: "/got-2.jpg",
|
||||||
leaderboard: "/leaderboard-bg.jpg",
|
leaderboard: "/leaderboard-bg.jpg",
|
||||||
|
challenges: "/got-2.jpg",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function BackgroundPreferences({
|
export default function BackgroundPreferences({
|
||||||
@@ -57,6 +59,10 @@ export default function BackgroundPreferences({
|
|||||||
initialPreferences.leaderboardBackground,
|
initialPreferences.leaderboardBackground,
|
||||||
DEFAULT_IMAGES.leaderboard
|
DEFAULT_IMAGES.leaderboard
|
||||||
),
|
),
|
||||||
|
challengesBackground: getFormValue(
|
||||||
|
initialPreferences.challengesBackground,
|
||||||
|
DEFAULT_IMAGES.challenges
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
[initialPreferences]
|
[initialPreferences]
|
||||||
);
|
);
|
||||||
@@ -90,6 +96,10 @@ export default function BackgroundPreferences({
|
|||||||
formData.leaderboardBackground,
|
formData.leaderboardBackground,
|
||||||
DEFAULT_IMAGES.leaderboard
|
DEFAULT_IMAGES.leaderboard
|
||||||
),
|
),
|
||||||
|
challengesBackground: getApiValue(
|
||||||
|
formData.challengesBackground,
|
||||||
|
DEFAULT_IMAGES.challenges
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = await updateSitePreferences(apiData);
|
const result = await updateSitePreferences(apiData);
|
||||||
@@ -110,6 +120,10 @@ export default function BackgroundPreferences({
|
|||||||
result.data.leaderboardBackground,
|
result.data.leaderboardBackground,
|
||||||
DEFAULT_IMAGES.leaderboard
|
DEFAULT_IMAGES.leaderboard
|
||||||
),
|
),
|
||||||
|
challengesBackground: getFormValue(
|
||||||
|
result.data.challengesBackground,
|
||||||
|
DEFAULT_IMAGES.challenges
|
||||||
|
),
|
||||||
});
|
});
|
||||||
setIsEditing(false);
|
setIsEditing(false);
|
||||||
} else {
|
} else {
|
||||||
@@ -138,6 +152,10 @@ export default function BackgroundPreferences({
|
|||||||
preferences.leaderboardBackground,
|
preferences.leaderboardBackground,
|
||||||
DEFAULT_IMAGES.leaderboard
|
DEFAULT_IMAGES.leaderboard
|
||||||
),
|
),
|
||||||
|
challengesBackground: getFormValue(
|
||||||
|
preferences.challengesBackground,
|
||||||
|
DEFAULT_IMAGES.challenges
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -197,6 +215,16 @@ export default function BackgroundPreferences({
|
|||||||
}
|
}
|
||||||
label="Background Leaderboard"
|
label="Background Leaderboard"
|
||||||
/>
|
/>
|
||||||
|
<ImageSelector
|
||||||
|
value={formData.challengesBackground}
|
||||||
|
onChange={(url) =>
|
||||||
|
setFormData({
|
||||||
|
...formData,
|
||||||
|
challengesBackground: url,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
label="Background Challenges"
|
||||||
|
/>
|
||||||
<div className="flex flex-col sm:flex-row gap-2 pt-4">
|
<div className="flex flex-col sm:flex-row gap-2 pt-4">
|
||||||
<Button onClick={handleSave} variant="success" size="md">
|
<Button onClick={handleSave} variant="success" size="md">
|
||||||
Enregistrer
|
Enregistrer
|
||||||
@@ -376,6 +404,62 @@ export default function BackgroundPreferences({
|
|||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4">
|
||||||
|
<span className="text-pixel-gold font-bold text-sm sm:text-base min-w-0 sm:min-w-[120px] flex-shrink-0">
|
||||||
|
Challenges:
|
||||||
|
</span>
|
||||||
|
{(() => {
|
||||||
|
const currentImage =
|
||||||
|
preferences?.challengesBackground &&
|
||||||
|
preferences.challengesBackground.trim() !== ""
|
||||||
|
? preferences.challengesBackground
|
||||||
|
: DEFAULT_IMAGES.challenges;
|
||||||
|
const isDefault =
|
||||||
|
!preferences?.challengesBackground ||
|
||||||
|
preferences.challengesBackground.trim() === "";
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex items-center gap-2 sm:gap-3 min-w-0 flex-1">
|
||||||
|
<div className="relative w-16 h-10 sm:w-20 sm:h-12 rounded border border-pixel-gold/30 overflow-hidden bg-black/60 flex-shrink-0">
|
||||||
|
<img
|
||||||
|
src={currentImage}
|
||||||
|
alt="Challenges background"
|
||||||
|
className="w-full h-full object-cover"
|
||||||
|
onError={(e) => {
|
||||||
|
const target = e.currentTarget;
|
||||||
|
const currentSrc = target.src;
|
||||||
|
const fallbackSrc = "/got-2.jpg";
|
||||||
|
if (!currentSrc.includes(fallbackSrc)) {
|
||||||
|
target.src = fallbackSrc;
|
||||||
|
} else {
|
||||||
|
target.style.display = "none";
|
||||||
|
const fallbackDiv =
|
||||||
|
target.nextElementSibling as HTMLElement;
|
||||||
|
if (fallbackDiv) {
|
||||||
|
fallbackDiv.classList.remove("hidden");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div className="absolute inset-0 flex items-center justify-center bg-black/60 text-gray-500 text-xs hidden">
|
||||||
|
No image
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col min-w-0 flex-1">
|
||||||
|
<span className="text-xs text-gray-400 truncate min-w-0">
|
||||||
|
{isDefault ? "Par défaut: " : ""}
|
||||||
|
{currentImage}
|
||||||
|
</span>
|
||||||
|
{isDefault && (
|
||||||
|
<span className="text-[10px] text-gray-500 italic">
|
||||||
|
(Image par défaut)
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -204,18 +204,28 @@ export default function ChallengesSection({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section className="relative w-full min-h-screen flex flex-col items-center overflow-hidden pt-24 pb-16">
|
||||||
className="relative w-full min-h-screen flex flex-col items-center overflow-hidden pt-24 pb-16"
|
{/* Background Image */}
|
||||||
|
<div
|
||||||
|
className="absolute inset-0 bg-cover bg-center bg-no-repeat"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `url(${backgroundImage})`,
|
backgroundImage: `url('${backgroundImage}')`,
|
||||||
backgroundSize: "cover",
|
|
||||||
backgroundPosition: "center",
|
|
||||||
backgroundRepeat: "no-repeat",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="absolute inset-0 bg-black/70 backdrop-blur-sm"></div>
|
{/* Dark overlay for readability */}
|
||||||
|
<div
|
||||||
|
className="absolute inset-0 bg-gradient-to-b"
|
||||||
|
style={{
|
||||||
|
background: `linear-gradient(to bottom,
|
||||||
|
color-mix(in srgb, var(--background) 70%, transparent),
|
||||||
|
color-mix(in srgb, var(--background) 60%, transparent),
|
||||||
|
color-mix(in srgb, var(--background) 80%, transparent)
|
||||||
|
)`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="relative z-10 w-full max-w-6xl mx-auto px-8 py-16">
|
<div className="relative z-10 w-full max-w-6xl mx-auto px-4 sm:px-8 py-16">
|
||||||
<SectionTitle variant="gradient" size="md" className="mb-8 text-center">
|
<SectionTitle variant="gradient" size="md" className="mb-8 text-center">
|
||||||
DÉFIS ENTRE JOUEURS
|
DÉFIS ENTRE JOUEURS
|
||||||
</SectionTitle>
|
</SectionTitle>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ interface Preferences {
|
|||||||
homeBackground: string | null;
|
homeBackground: string | null;
|
||||||
eventsBackground: string | null;
|
eventsBackground: string | null;
|
||||||
leaderboardBackground: string | null;
|
leaderboardBackground: string | null;
|
||||||
|
challengesBackground: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function usePreferences() {
|
export function usePreferences() {
|
||||||
@@ -21,6 +22,7 @@ export function usePreferences() {
|
|||||||
homeBackground: null,
|
homeBackground: null,
|
||||||
eventsBackground: null,
|
eventsBackground: null,
|
||||||
leaderboardBackground: null,
|
leaderboardBackground: null,
|
||||||
|
challengesBackground: null,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -30,6 +32,7 @@ export function usePreferences() {
|
|||||||
homeBackground: null,
|
homeBackground: null,
|
||||||
eventsBackground: null,
|
eventsBackground: null,
|
||||||
leaderboardBackground: null,
|
leaderboardBackground: null,
|
||||||
|
challengesBackground: null,
|
||||||
});
|
});
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
});
|
});
|
||||||
@@ -39,7 +42,7 @@ export function usePreferences() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function useBackgroundImage(
|
export function useBackgroundImage(
|
||||||
page: "home" | "events" | "leaderboard",
|
page: "home" | "events" | "leaderboard" | "challenges",
|
||||||
defaultImage: string
|
defaultImage: string
|
||||||
) {
|
) {
|
||||||
const { preferences } = usePreferences();
|
const { preferences } = usePreferences();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { sitePreferencesService } from "@/services/preferences/site-preferences.service";
|
import { sitePreferencesService } from "@/services/preferences/site-preferences.service";
|
||||||
|
|
||||||
export async function getBackgroundImage(
|
export async function getBackgroundImage(
|
||||||
page: "home" | "events" | "leaderboard",
|
page: "home" | "events" | "leaderboard" | "challenges",
|
||||||
defaultImage: string
|
defaultImage: string
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return sitePreferencesService.getBackgroundImage(page, defaultImage);
|
return sitePreferencesService.getBackgroundImage(page, defaultImage);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// biome-ignore-all lint: generated file
|
// biome-ignore-all lint: generated file
|
||||||
@@ -12,42 +13,42 @@
|
|||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as Prisma from "./internal/prismaNamespaceBrowser";
|
import * as Prisma from './internal/prismaNamespaceBrowser'
|
||||||
export { Prisma };
|
export { Prisma }
|
||||||
export * as $Enums from "./enums";
|
export * as $Enums from './enums'
|
||||||
export * from "./enums";
|
export * from './enums';
|
||||||
/**
|
/**
|
||||||
* Model User
|
* Model User
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type User = Prisma.UserModel;
|
export type User = Prisma.UserModel
|
||||||
/**
|
/**
|
||||||
* Model UserPreferences
|
* Model UserPreferences
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type UserPreferences = Prisma.UserPreferencesModel;
|
export type UserPreferences = Prisma.UserPreferencesModel
|
||||||
/**
|
/**
|
||||||
* Model Event
|
* Model Event
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Event = Prisma.EventModel;
|
export type Event = Prisma.EventModel
|
||||||
/**
|
/**
|
||||||
* Model EventRegistration
|
* Model EventRegistration
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type EventRegistration = Prisma.EventRegistrationModel;
|
export type EventRegistration = Prisma.EventRegistrationModel
|
||||||
/**
|
/**
|
||||||
* Model EventFeedback
|
* Model EventFeedback
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type EventFeedback = Prisma.EventFeedbackModel;
|
export type EventFeedback = Prisma.EventFeedbackModel
|
||||||
/**
|
/**
|
||||||
* Model SitePreferences
|
* Model SitePreferences
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SitePreferences = Prisma.SitePreferencesModel;
|
export type SitePreferences = Prisma.SitePreferencesModel
|
||||||
/**
|
/**
|
||||||
* Model Challenge
|
* Model Challenge
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Challenge = Prisma.ChallengeModel;
|
export type Challenge = Prisma.ChallengeModel
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// biome-ignore-all lint: generated file
|
// biome-ignore-all lint: generated file
|
||||||
@@ -9,18 +10,18 @@
|
|||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as process from "node:process";
|
import * as process from 'node:process'
|
||||||
import * as path from "node:path";
|
import * as path from 'node:path'
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from 'node:url'
|
||||||
globalThis["__dirname"] = path.dirname(fileURLToPath(import.meta.url));
|
globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))
|
||||||
|
|
||||||
import * as runtime from "@prisma/client/runtime/client";
|
import * as runtime from "@prisma/client/runtime/client"
|
||||||
import * as $Enums from "./enums";
|
import * as $Enums from "./enums"
|
||||||
import * as $Class from "./internal/class";
|
import * as $Class from "./internal/class"
|
||||||
import * as Prisma from "./internal/prismaNamespace";
|
import * as Prisma from "./internal/prismaNamespace"
|
||||||
|
|
||||||
export * as $Enums from "./enums";
|
export * as $Enums from './enums'
|
||||||
export * from "./enums";
|
export * from "./enums"
|
||||||
/**
|
/**
|
||||||
* ## Prisma Client
|
* ## Prisma Client
|
||||||
*
|
*
|
||||||
@@ -34,48 +35,42 @@ export * from "./enums";
|
|||||||
*
|
*
|
||||||
* Read more in our [docs](https://pris.ly/d/client).
|
* Read more in our [docs](https://pris.ly/d/client).
|
||||||
*/
|
*/
|
||||||
export const PrismaClient = $Class.getPrismaClientClass();
|
export const PrismaClient = $Class.getPrismaClientClass()
|
||||||
export type PrismaClient<
|
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
||||||
LogOpts extends Prisma.LogLevel = never,
|
export { Prisma }
|
||||||
OmitOpts extends Prisma.PrismaClientOptions["omit"] =
|
|
||||||
Prisma.PrismaClientOptions["omit"],
|
|
||||||
ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
|
||||||
runtime.Types.Extensions.DefaultArgs,
|
|
||||||
> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>;
|
|
||||||
export { Prisma };
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model User
|
* Model User
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type User = Prisma.UserModel;
|
export type User = Prisma.UserModel
|
||||||
/**
|
/**
|
||||||
* Model UserPreferences
|
* Model UserPreferences
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type UserPreferences = Prisma.UserPreferencesModel;
|
export type UserPreferences = Prisma.UserPreferencesModel
|
||||||
/**
|
/**
|
||||||
* Model Event
|
* Model Event
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Event = Prisma.EventModel;
|
export type Event = Prisma.EventModel
|
||||||
/**
|
/**
|
||||||
* Model EventRegistration
|
* Model EventRegistration
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type EventRegistration = Prisma.EventRegistrationModel;
|
export type EventRegistration = Prisma.EventRegistrationModel
|
||||||
/**
|
/**
|
||||||
* Model EventFeedback
|
* Model EventFeedback
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type EventFeedback = Prisma.EventFeedbackModel;
|
export type EventFeedback = Prisma.EventFeedbackModel
|
||||||
/**
|
/**
|
||||||
* Model SitePreferences
|
* Model SitePreferences
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SitePreferences = Prisma.SitePreferencesModel;
|
export type SitePreferences = Prisma.SitePreferencesModel
|
||||||
/**
|
/**
|
||||||
* Model Challenge
|
* Model Challenge
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Challenge = Prisma.ChallengeModel;
|
export type Challenge = Prisma.ChallengeModel
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,52 +1,54 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// biome-ignore-all lint: generated file
|
// biome-ignore-all lint: generated file
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
/*
|
/*
|
||||||
* This file exports all enum related types from the schema.
|
* This file exports all enum related types from the schema.
|
||||||
*
|
*
|
||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const Role = {
|
export const Role = {
|
||||||
USER: "USER",
|
USER: 'USER',
|
||||||
ADMIN: "ADMIN",
|
ADMIN: 'ADMIN'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type Role = (typeof Role)[keyof typeof Role]
|
||||||
|
|
||||||
export type Role = (typeof Role)[keyof typeof Role];
|
|
||||||
|
|
||||||
export const EventType = {
|
export const EventType = {
|
||||||
ATELIER: "ATELIER",
|
ATELIER: 'ATELIER',
|
||||||
KATA: "KATA",
|
KATA: 'KATA',
|
||||||
PRESENTATION: "PRESENTATION",
|
PRESENTATION: 'PRESENTATION',
|
||||||
LEARNING_HOUR: "LEARNING_HOUR",
|
LEARNING_HOUR: 'LEARNING_HOUR'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type EventType = (typeof EventType)[keyof typeof EventType]
|
||||||
|
|
||||||
export type EventType = (typeof EventType)[keyof typeof EventType];
|
|
||||||
|
|
||||||
export const CharacterClass = {
|
export const CharacterClass = {
|
||||||
WARRIOR: "WARRIOR",
|
WARRIOR: 'WARRIOR',
|
||||||
MAGE: "MAGE",
|
MAGE: 'MAGE',
|
||||||
ROGUE: "ROGUE",
|
ROGUE: 'ROGUE',
|
||||||
RANGER: "RANGER",
|
RANGER: 'RANGER',
|
||||||
PALADIN: "PALADIN",
|
PALADIN: 'PALADIN',
|
||||||
ENGINEER: "ENGINEER",
|
ENGINEER: 'ENGINEER',
|
||||||
MERCHANT: "MERCHANT",
|
MERCHANT: 'MERCHANT',
|
||||||
SCHOLAR: "SCHOLAR",
|
SCHOLAR: 'SCHOLAR',
|
||||||
BERSERKER: "BERSERKER",
|
BERSERKER: 'BERSERKER',
|
||||||
NECROMANCER: "NECROMANCER",
|
NECROMANCER: 'NECROMANCER'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type CharacterClass = (typeof CharacterClass)[keyof typeof CharacterClass]
|
||||||
|
|
||||||
export type CharacterClass =
|
|
||||||
(typeof CharacterClass)[keyof typeof CharacterClass];
|
|
||||||
|
|
||||||
export const ChallengeStatus = {
|
export const ChallengeStatus = {
|
||||||
PENDING: "PENDING",
|
PENDING: 'PENDING',
|
||||||
ACCEPTED: "ACCEPTED",
|
ACCEPTED: 'ACCEPTED',
|
||||||
COMPLETED: "COMPLETED",
|
COMPLETED: 'COMPLETED',
|
||||||
REJECTED: "REJECTED",
|
REJECTED: 'REJECTED',
|
||||||
CANCELLED: "CANCELLED",
|
CANCELLED: 'CANCELLED'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
export type ChallengeStatus =
|
export type ChallengeStatus = (typeof ChallengeStatus)[keyof typeof ChallengeStatus]
|
||||||
(typeof ChallengeStatus)[keyof typeof ChallengeStatus];
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// biome-ignore-all lint: generated file
|
// biome-ignore-all lint: generated file
|
||||||
@@ -14,185 +15,184 @@
|
|||||||
* model files in the `model` directory!
|
* model files in the `model` directory!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as runtime from "@prisma/client/runtime/index-browser";
|
import * as runtime from "@prisma/client/runtime/index-browser"
|
||||||
|
|
||||||
export type * from "../models";
|
export type * from '../models'
|
||||||
export type * from "./prismaNamespace";
|
export type * from './prismaNamespace'
|
||||||
|
|
||||||
|
export const Decimal = runtime.Decimal
|
||||||
|
|
||||||
export const Decimal = runtime.Decimal;
|
|
||||||
|
|
||||||
export const NullTypes = {
|
export const NullTypes = {
|
||||||
DbNull: runtime.NullTypes.DbNull as new (
|
DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
|
||||||
secret: never
|
JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
|
||||||
) => typeof runtime.DbNull,
|
AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
|
||||||
JsonNull: runtime.NullTypes.JsonNull as new (
|
}
|
||||||
secret: never
|
|
||||||
) => typeof runtime.JsonNull,
|
|
||||||
AnyNull: runtime.NullTypes.AnyNull as new (
|
|
||||||
secret: never
|
|
||||||
) => typeof runtime.AnyNull,
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
|
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
|
||||||
*
|
*
|
||||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
||||||
*/
|
*/
|
||||||
export const DbNull = runtime.DbNull;
|
export const DbNull = runtime.DbNull
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
|
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
|
||||||
*
|
*
|
||||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
||||||
*/
|
*/
|
||||||
export const JsonNull = runtime.JsonNull;
|
export const JsonNull = runtime.JsonNull
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
|
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
|
||||||
*
|
*
|
||||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
||||||
*/
|
*/
|
||||||
export const AnyNull = runtime.AnyNull;
|
export const AnyNull = runtime.AnyNull
|
||||||
|
|
||||||
|
|
||||||
export const ModelName = {
|
export const ModelName = {
|
||||||
User: "User",
|
User: 'User',
|
||||||
UserPreferences: "UserPreferences",
|
UserPreferences: 'UserPreferences',
|
||||||
Event: "Event",
|
Event: 'Event',
|
||||||
EventRegistration: "EventRegistration",
|
EventRegistration: 'EventRegistration',
|
||||||
EventFeedback: "EventFeedback",
|
EventFeedback: 'EventFeedback',
|
||||||
SitePreferences: "SitePreferences",
|
SitePreferences: 'SitePreferences',
|
||||||
Challenge: "Challenge",
|
Challenge: 'Challenge'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName];
|
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enums
|
* Enums
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const TransactionIsolationLevel = {
|
export const TransactionIsolationLevel = {
|
||||||
Serializable: "Serializable",
|
Serializable: 'Serializable'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||||
|
|
||||||
export type TransactionIsolationLevel =
|
|
||||||
(typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel];
|
|
||||||
|
|
||||||
export const UserScalarFieldEnum = {
|
export const UserScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
email: "email",
|
email: 'email',
|
||||||
password: "password",
|
password: 'password',
|
||||||
username: "username",
|
username: 'username',
|
||||||
role: "role",
|
role: 'role',
|
||||||
score: "score",
|
score: 'score',
|
||||||
level: "level",
|
level: 'level',
|
||||||
hp: "hp",
|
hp: 'hp',
|
||||||
maxHp: "maxHp",
|
maxHp: 'maxHp',
|
||||||
xp: "xp",
|
xp: 'xp',
|
||||||
maxXp: "maxXp",
|
maxXp: 'maxXp',
|
||||||
avatar: "avatar",
|
avatar: 'avatar',
|
||||||
createdAt: "createdAt",
|
createdAt: 'createdAt',
|
||||||
updatedAt: "updatedAt",
|
updatedAt: 'updatedAt',
|
||||||
bio: "bio",
|
bio: 'bio',
|
||||||
characterClass: "characterClass",
|
characterClass: 'characterClass'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||||
|
|
||||||
export type UserScalarFieldEnum =
|
|
||||||
(typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum];
|
|
||||||
|
|
||||||
export const UserPreferencesScalarFieldEnum = {
|
export const UserPreferencesScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
userId: "userId",
|
userId: 'userId',
|
||||||
homeBackground: "homeBackground",
|
homeBackground: 'homeBackground',
|
||||||
eventsBackground: "eventsBackground",
|
eventsBackground: 'eventsBackground',
|
||||||
leaderboardBackground: "leaderboardBackground",
|
leaderboardBackground: 'leaderboardBackground',
|
||||||
theme: "theme",
|
theme: 'theme',
|
||||||
createdAt: "createdAt",
|
createdAt: 'createdAt',
|
||||||
updatedAt: "updatedAt",
|
updatedAt: 'updatedAt'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type UserPreferencesScalarFieldEnum = (typeof UserPreferencesScalarFieldEnum)[keyof typeof UserPreferencesScalarFieldEnum]
|
||||||
|
|
||||||
export type UserPreferencesScalarFieldEnum =
|
|
||||||
(typeof UserPreferencesScalarFieldEnum)[keyof typeof UserPreferencesScalarFieldEnum];
|
|
||||||
|
|
||||||
export const EventScalarFieldEnum = {
|
export const EventScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
date: "date",
|
date: 'date',
|
||||||
name: "name",
|
name: 'name',
|
||||||
description: "description",
|
description: 'description',
|
||||||
type: "type",
|
type: 'type',
|
||||||
room: "room",
|
room: 'room',
|
||||||
time: "time",
|
time: 'time',
|
||||||
maxPlaces: "maxPlaces",
|
maxPlaces: 'maxPlaces',
|
||||||
createdAt: "createdAt",
|
createdAt: 'createdAt',
|
||||||
updatedAt: "updatedAt",
|
updatedAt: 'updatedAt'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type EventScalarFieldEnum = (typeof EventScalarFieldEnum)[keyof typeof EventScalarFieldEnum]
|
||||||
|
|
||||||
export type EventScalarFieldEnum =
|
|
||||||
(typeof EventScalarFieldEnum)[keyof typeof EventScalarFieldEnum];
|
|
||||||
|
|
||||||
export const EventRegistrationScalarFieldEnum = {
|
export const EventRegistrationScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
userId: "userId",
|
userId: 'userId',
|
||||||
eventId: "eventId",
|
eventId: 'eventId',
|
||||||
createdAt: "createdAt",
|
createdAt: 'createdAt'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type EventRegistrationScalarFieldEnum = (typeof EventRegistrationScalarFieldEnum)[keyof typeof EventRegistrationScalarFieldEnum]
|
||||||
|
|
||||||
export type EventRegistrationScalarFieldEnum =
|
|
||||||
(typeof EventRegistrationScalarFieldEnum)[keyof typeof EventRegistrationScalarFieldEnum];
|
|
||||||
|
|
||||||
export const EventFeedbackScalarFieldEnum = {
|
export const EventFeedbackScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
userId: "userId",
|
userId: 'userId',
|
||||||
eventId: "eventId",
|
eventId: 'eventId',
|
||||||
rating: "rating",
|
rating: 'rating',
|
||||||
comment: "comment",
|
comment: 'comment',
|
||||||
createdAt: "createdAt",
|
createdAt: 'createdAt',
|
||||||
updatedAt: "updatedAt",
|
updatedAt: 'updatedAt'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type EventFeedbackScalarFieldEnum = (typeof EventFeedbackScalarFieldEnum)[keyof typeof EventFeedbackScalarFieldEnum]
|
||||||
|
|
||||||
export type EventFeedbackScalarFieldEnum =
|
|
||||||
(typeof EventFeedbackScalarFieldEnum)[keyof typeof EventFeedbackScalarFieldEnum];
|
|
||||||
|
|
||||||
export const SitePreferencesScalarFieldEnum = {
|
export const SitePreferencesScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
homeBackground: "homeBackground",
|
homeBackground: 'homeBackground',
|
||||||
eventsBackground: "eventsBackground",
|
eventsBackground: 'eventsBackground',
|
||||||
leaderboardBackground: "leaderboardBackground",
|
leaderboardBackground: 'leaderboardBackground',
|
||||||
createdAt: "createdAt",
|
challengesBackground: 'challengesBackground',
|
||||||
updatedAt: "updatedAt",
|
createdAt: 'createdAt',
|
||||||
} as const;
|
updatedAt: 'updatedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SitePreferencesScalarFieldEnum = (typeof SitePreferencesScalarFieldEnum)[keyof typeof SitePreferencesScalarFieldEnum]
|
||||||
|
|
||||||
export type SitePreferencesScalarFieldEnum =
|
|
||||||
(typeof SitePreferencesScalarFieldEnum)[keyof typeof SitePreferencesScalarFieldEnum];
|
|
||||||
|
|
||||||
export const ChallengeScalarFieldEnum = {
|
export const ChallengeScalarFieldEnum = {
|
||||||
id: "id",
|
id: 'id',
|
||||||
challengerId: "challengerId",
|
challengerId: 'challengerId',
|
||||||
challengedId: "challengedId",
|
challengedId: 'challengedId',
|
||||||
title: "title",
|
title: 'title',
|
||||||
description: "description",
|
description: 'description',
|
||||||
pointsReward: "pointsReward",
|
pointsReward: 'pointsReward',
|
||||||
status: "status",
|
status: 'status',
|
||||||
adminId: "adminId",
|
adminId: 'adminId',
|
||||||
adminComment: "adminComment",
|
adminComment: 'adminComment',
|
||||||
winnerId: "winnerId",
|
winnerId: 'winnerId',
|
||||||
createdAt: "createdAt",
|
createdAt: 'createdAt',
|
||||||
acceptedAt: "acceptedAt",
|
acceptedAt: 'acceptedAt',
|
||||||
completedAt: "completedAt",
|
completedAt: 'completedAt',
|
||||||
updatedAt: "updatedAt",
|
updatedAt: 'updatedAt'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type ChallengeScalarFieldEnum = (typeof ChallengeScalarFieldEnum)[keyof typeof ChallengeScalarFieldEnum]
|
||||||
|
|
||||||
export type ChallengeScalarFieldEnum =
|
|
||||||
(typeof ChallengeScalarFieldEnum)[keyof typeof ChallengeScalarFieldEnum];
|
|
||||||
|
|
||||||
export const SortOrder = {
|
export const SortOrder = {
|
||||||
asc: "asc",
|
asc: 'asc',
|
||||||
desc: "desc",
|
desc: 'desc'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
||||||
|
|
||||||
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder];
|
|
||||||
|
|
||||||
export const NullsOrder = {
|
export const NullsOrder = {
|
||||||
first: "first",
|
first: 'first',
|
||||||
last: "last",
|
last: 'last'
|
||||||
} as const;
|
} as const
|
||||||
|
|
||||||
|
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||||
|
|
||||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder];
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// biome-ignore-all lint: generated file
|
// biome-ignore-all lint: generated file
|
||||||
@@ -7,11 +8,11 @@
|
|||||||
*
|
*
|
||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
export type * from "./models/User";
|
export type * from './models/User'
|
||||||
export type * from "./models/UserPreferences";
|
export type * from './models/UserPreferences'
|
||||||
export type * from "./models/Event";
|
export type * from './models/Event'
|
||||||
export type * from "./models/EventRegistration";
|
export type * from './models/EventRegistration'
|
||||||
export type * from "./models/EventFeedback";
|
export type * from './models/EventFeedback'
|
||||||
export type * from "./models/SitePreferences";
|
export type * from './models/SitePreferences'
|
||||||
export type * from "./models/Challenge";
|
export type * from './models/Challenge'
|
||||||
export type * from "./commonInputTypes";
|
export type * from './commonInputTypes'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
|||||||
|
-- RedefineTables
|
||||||
|
PRAGMA defer_foreign_keys=ON;
|
||||||
|
PRAGMA foreign_keys=OFF;
|
||||||
|
CREATE TABLE "new_SitePreferences" (
|
||||||
|
"id" TEXT NOT NULL PRIMARY KEY DEFAULT 'global',
|
||||||
|
"homeBackground" TEXT,
|
||||||
|
"eventsBackground" TEXT,
|
||||||
|
"leaderboardBackground" TEXT,
|
||||||
|
"challengesBackground" TEXT,
|
||||||
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updatedAt" DATETIME NOT NULL
|
||||||
|
);
|
||||||
|
INSERT INTO "new_SitePreferences" ("createdAt", "eventsBackground", "homeBackground", "id", "leaderboardBackground", "updatedAt") SELECT "createdAt", "eventsBackground", "homeBackground", "id", "leaderboardBackground", "updatedAt" FROM "SitePreferences";
|
||||||
|
DROP TABLE "SitePreferences";
|
||||||
|
ALTER TABLE "new_SitePreferences" RENAME TO "SitePreferences";
|
||||||
|
PRAGMA foreign_keys=ON;
|
||||||
|
PRAGMA defer_foreign_keys=OFF;
|
||||||
@@ -99,6 +99,7 @@ model SitePreferences {
|
|||||||
homeBackground String?
|
homeBackground String?
|
||||||
eventsBackground String?
|
eventsBackground String?
|
||||||
leaderboardBackground String?
|
leaderboardBackground String?
|
||||||
|
challengesBackground String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface UpdateSitePreferencesInput {
|
|||||||
homeBackground?: string | null;
|
homeBackground?: string | null;
|
||||||
eventsBackground?: string | null;
|
eventsBackground?: string | null;
|
||||||
leaderboardBackground?: string | null;
|
leaderboardBackground?: string | null;
|
||||||
|
challengesBackground?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,6 +37,7 @@ export class SitePreferencesService {
|
|||||||
homeBackground: null,
|
homeBackground: null,
|
||||||
eventsBackground: null,
|
eventsBackground: null,
|
||||||
leaderboardBackground: null,
|
leaderboardBackground: null,
|
||||||
|
challengesBackground: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -64,6 +66,10 @@ export class SitePreferencesService {
|
|||||||
data.leaderboardBackground === ""
|
data.leaderboardBackground === ""
|
||||||
? null
|
? null
|
||||||
: (data.leaderboardBackground ?? undefined),
|
: (data.leaderboardBackground ?? undefined),
|
||||||
|
challengesBackground:
|
||||||
|
data.challengesBackground === ""
|
||||||
|
? null
|
||||||
|
: (data.challengesBackground ?? undefined),
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
id: "global",
|
id: "global",
|
||||||
@@ -75,6 +81,10 @@ export class SitePreferencesService {
|
|||||||
data.leaderboardBackground === ""
|
data.leaderboardBackground === ""
|
||||||
? null
|
? null
|
||||||
: (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
|
* Récupère l'image de fond pour une page donnée
|
||||||
*/
|
*/
|
||||||
async getBackgroundImage(
|
async getBackgroundImage(
|
||||||
page: "home" | "events" | "leaderboard",
|
page: "home" | "events" | "leaderboard" | "challenges",
|
||||||
defaultImage: string
|
defaultImage: string
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user