ci: formatting

This commit is contained in:
Moyasee
2025-10-26 08:32:28 +02:00
parent a1f419957f
commit 28cc25b368
3 changed files with 26 additions and 32 deletions

View File

@@ -40,7 +40,6 @@ export class AchievementImageService {
return `data:${mimeType?.mime || "image/jpeg"};base64,${base64Image}`;
}
private static async hasActiveSubscription(): Promise<boolean> {
return db
.get<string, User>(levelKeys.user, { valueEncoding: "json" })

View File

@@ -162,8 +162,8 @@ export const mergeAchievements = async (
}
// For subscribers, capture and upload screenshots first to get image URLs
let achievementsWithImages = [...mergedLocalAchievements];
const achievementsWithImages = [...mergedLocalAchievements];
if (
newAchievements.length &&
userPreferences.enableAchievementScreenshots === true
@@ -171,14 +171,12 @@ export const mergeAchievements = async (
try {
for (const achievement of newAchievements) {
try {
const achievementData = achievementsData.find(
(steamAchievement) => {
return (
achievement.name.toUpperCase() ===
steamAchievement.name.toUpperCase()
);
}
);
const achievementData = achievementsData.find((steamAchievement) => {
return (
achievement.name.toUpperCase() ===
steamAchievement.name.toUpperCase()
);
});
const achievementDisplayName =
achievementData?.displayName || achievement.name;
@@ -189,11 +187,12 @@ export const mergeAchievements = async (
achievementDisplayName
);
const uploadResult = await AchievementImageService.uploadAchievementImage(
game.objectId,
achievement.name,
screenshotPath
);
const uploadResult =
await AchievementImageService.uploadAchievementImage(
game.objectId,
achievement.name,
screenshotPath
);
// Update the achievement with the image URL for API sync
const achievementIndex = achievementsWithImages.findIndex(
@@ -206,10 +205,7 @@ export const mergeAchievements = async (
};
}
} catch (error) {
achievementsLogger.error(
"Failed to upload achievement image",
error
);
achievementsLogger.error("Failed to upload achievement image", error);
}
}
} catch (error) {

View File

@@ -216,29 +216,29 @@
transition: all ease 0.2s;
position: relative;
container-type: inline-size;
&:hover {
transform: translateY(-4px);
background: rgba(0, 0, 0, 0.4);
border-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
@container (max-width: 240px) {
.profile-content__image-achievement-icon {
width: 20px;
height: 20px;
}
.profile-content__image-achievement-name {
font-size: 13px;
}
.profile-content__image-game-title {
font-size: 11px;
}
}
@container (max-width: 280px) {
.profile-content__image-card-content {
gap: calc(globals.$spacing-unit * 0.75);
@@ -257,13 +257,13 @@
position: relative;
width: 100%;
height: 100%;
.profile-content__image-button {
width: 100%;
height: 100%;
display: block;
}
&:hover .profile-content__image-achievement-image-overlay {
opacity: 1;
}
@@ -290,15 +290,14 @@
opacity: 0;
transition: opacity 0.2s ease;
pointer-events: none;
svg {
color: white;
}
}
// Show overlay on keyboard focus for accessibility
&__image-button:focus-visible
+ &__image-achievement-image-overlay {
&__image-button:focus-visible + &__image-achievement-image-overlay {
opacity: 1;
}
@@ -397,7 +396,7 @@
border-radius: 8px;
overflow: hidden;
transition: transform ease 0.2s;
&:hover {
transform: scale(1.05);
}
@@ -410,7 +409,7 @@
border-radius: 8px;
border: 2px solid rgba(255, 255, 255, 0.1);
transition: border-color ease 0.2s;
&:hover {
border-color: rgba(255, 255, 255, 0.3);
}