From 817796ed3cb6ea6b854f03620fc9e8ec7f6f6254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:12:33 -0500 Subject: [PATCH] feat: full command --- src/commands/ratingSession.tsx | 147 ++++++++++++++++++++++++++++++ src/components/CommandWrapper.tsx | 2 +- 2 files changed, 148 insertions(+), 1 deletion(-) diff --git a/src/commands/ratingSession.tsx b/src/commands/ratingSession.tsx index aec783a9c..33788bc53 100644 --- a/src/commands/ratingSession.tsx +++ b/src/commands/ratingSession.tsx @@ -339,6 +339,153 @@ export const ratingStatsCommand = new Promise((resolve) => { {delta.battles === 0 && ( )} + + {delta.battles > 0 && ( +
+
+ + {delta.battles.toLocaleString(interaction.locale)} + + + Battles + +
+
+ + {(100 * (delta.wins / delta.battles)).toFixed(0)}% + + + Winrate + +
+
+ + {Math.round(delta.damageDealt / delta.battles).toLocaleString( + interaction.locale, + )} + + + Damage + +
+
+ + {(100 * (delta.survived / delta.battles)).toFixed(0)}% + + + Survival + +
+
+ + {(delta.kills / delta.battles).toFixed(2)} + + + Kills + +
+
+ )} ); }, diff --git a/src/components/CommandWrapper.tsx b/src/components/CommandWrapper.tsx index ea77f1f1b..9f1dcfa85 100644 --- a/src/components/CommandWrapper.tsx +++ b/src/components/CommandWrapper.tsx @@ -17,7 +17,7 @@ export default function CommandWrapper({ children, fat }: CommandWrapperProps) { width: 480, color: theme.colors.textHighContrast, position: 'relative', - background: 'url(https://i.imgur.com/zjwyGv1.png)', + background: `linear-gradient(${theme.colors.appBackground2}, ${theme.colors.appBackground1})`, }} > {children}