Spaces:
Running
Running
Upload 42 files
Browse files- achievements.html +3 -3
achievements.html
CHANGED
|
@@ -323,7 +323,7 @@
|
|
| 323 |
return;
|
| 324 |
}
|
| 325 |
|
| 326 |
-
const achievementsContainer = document.getElementById('achievements-
|
| 327 |
if (!achievementsContainer) {
|
| 328 |
console.error('找不到成就容器');
|
| 329 |
return;
|
|
@@ -345,7 +345,7 @@
|
|
| 345 |
|
| 346 |
function createAchievementCard(achievement, isUnlocked) {
|
| 347 |
const card = document.createElement('div');
|
| 348 |
-
card.className = `achievement-card ${achievement.type || achievement.category} ${isUnlocked ? 'unlocked' : 'locked'}`;
|
| 349 |
|
| 350 |
const icon = getAchievementIcon(achievement.type || achievement.category);
|
| 351 |
const title = isUnlocked ? achievement.title : '???';
|
|
@@ -386,7 +386,7 @@
|
|
| 386 |
const unlockedCount = achievementSystem.getUnlockedCount();
|
| 387 |
const totalCount = achievementSystem.getTotalCount();
|
| 388 |
|
| 389 |
-
const statsElement = document.querySelector('.
|
| 390 |
if (statsElement) {
|
| 391 |
statsElement.textContent = `已解鎖:${unlockedCount}/${totalCount}`;
|
| 392 |
}
|
|
|
|
| 323 |
return;
|
| 324 |
}
|
| 325 |
|
| 326 |
+
const achievementsContainer = document.getElementById('achievements-grid');
|
| 327 |
if (!achievementsContainer) {
|
| 328 |
console.error('找不到成就容器');
|
| 329 |
return;
|
|
|
|
| 345 |
|
| 346 |
function createAchievementCard(achievement, isUnlocked) {
|
| 347 |
const card = document.createElement('div');
|
| 348 |
+
card.className = `achievement-card ${achievement.type || achievement.category || 'default'} ${isUnlocked ? 'unlocked' : 'locked'}`;
|
| 349 |
|
| 350 |
const icon = getAchievementIcon(achievement.type || achievement.category);
|
| 351 |
const title = isUnlocked ? achievement.title : '???';
|
|
|
|
| 386 |
const unlockedCount = achievementSystem.getUnlockedCount();
|
| 387 |
const totalCount = achievementSystem.getTotalCount();
|
| 388 |
|
| 389 |
+
const statsElement = document.querySelector('.achievements-stats');
|
| 390 |
if (statsElement) {
|
| 391 |
statsElement.textContent = `已解鎖:${unlockedCount}/${totalCount}`;
|
| 392 |
}
|