Refactor admin actions and improve code formatting: Standardize import statements, enhance error handling messages, and apply consistent formatting across event, user, and preference management functions for better readability and maintainability.
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled

This commit is contained in:
Julien Froidefond
2025-12-15 21:20:39 +01:00
parent 321da3176e
commit b790ee21f2
52 changed files with 12712 additions and 8554 deletions

View File

@@ -10,7 +10,10 @@ interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
label?: string;
}
const getGradientStyle = (variant: "hp" | "xp" | "default", percentage: number) => {
const getGradientStyle = (
variant: "hp" | "xp" | "default",
percentage: number
) => {
if (variant === "hp") {
if (percentage > 60) {
return {
@@ -50,7 +53,10 @@ export default function ProgressBar({
return (
<div className={className} {...props}>
{showLabel && (
<div className="flex justify-between text-xs mb-1" style={{ color: "var(--gray-400)" }}>
<div
className="flex justify-between text-xs mb-1"
style={{ color: "var(--gray-400)" }}
>
<span>{label || variant.toUpperCase()}</span>
<span>
{value} / {max}
@@ -74,7 +80,8 @@ export default function ProgressBar({
<div
className="absolute inset-0"
style={{
background: "linear-gradient(to right, transparent, color-mix(in srgb, var(--foreground) 10%, transparent), transparent)",
background:
"linear-gradient(to right, transparent, color-mix(in srgb, var(--foreground) 10%, transparent), transparent)",
}}
/>
</div>
@@ -88,4 +95,3 @@ export default function ProgressBar({
</div>
);
}