feat: add dodi folder

This commit is contained in:
Zamitto 2024-10-07 11:52:25 -03:00
parent 7f09a7796f
commit 7c9c27801f
3 changed files with 51 additions and 35 deletions

View File

@ -86,6 +86,10 @@ const getPathFromCracker = (cracker: Cracker) => {
folderPath: path.join(programData, "Steam", "Player"), folderPath: path.join(programData, "Steam", "Player"),
fileLocation: ["stats", "achievements.ini"], fileLocation: ["stats", "achievements.ini"],
}, },
{
folderPath: path.join(programData, "Steam", "dodi"),
fileLocation: ["stats", "achievements.ini"],
},
]; ];
} }

View File

@ -24,6 +24,7 @@ export const contentSidebarTitle = style({
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
backgroundColor: vars.color.background, backgroundColor: vars.color.background,
justifyContent: "space-between",
}); });
export const requirementButtonContainer = style({ export const requirementButtonContainer = style({

View File

@ -49,44 +49,55 @@ export function Sidebar() {
/> */} /> */}
{achievements.length > 0 && ( {achievements.length > 0 && (
<div <>
style={{ <div
display: "flex", className={styles.contentSidebarTitle}
flexDirection: "column", style={{ border: "none" }}
gap: `${SPACING_UNIT}px`, >
padding: `${SPACING_UNIT}px`, <h3>{t("achievements")}</h3>
}} <span>{achievements.length}</span>
> </div>
{achievements.map((achievement, index) => ( <div
<div style={{
key={index} display: "flex",
style={{ flexDirection: "column",
display: "flex", gap: `${SPACING_UNIT}px`,
flexDirection: "row", padding: `${SPACING_UNIT}px`,
alignItems: "center", }}
gap: `${SPACING_UNIT}px`, >
}} {achievements.map((achievement, index) => (
title={achievement.description} <div
> key={index}
<img
style={{ style={{
height: "72px", display: "flex",
width: "72px", flexDirection: "row",
filter: achievement.unlocked ? "none" : "grayscale(100%)", alignItems: "center",
gap: `${SPACING_UNIT}px`,
}} }}
src={ title={achievement.description}
achievement.unlocked ? achievement.icon : achievement.icongray >
} <img
alt={achievement.displayName} style={{
loading="lazy" height: "72px",
/> width: "72px",
<div> filter: achievement.unlocked ? "none" : "grayscale(100%)",
<p>{achievement.displayName}</p> }}
{achievement.unlockTime && format(achievement.unlockTime)} src={
achievement.unlocked
? achievement.icon
: achievement.icongray
}
alt={achievement.displayName}
loading="lazy"
/>
<div>
<p>{achievement.displayName}</p>
{achievement.unlockTime && format(achievement.unlockTime)}
</div>
</div> </div>
</div> ))}
))} </div>
</div> </>
)} )}
{stats && ( {stats && (