修复bug
This commit is contained in:
parent
3dc9fd0c22
commit
aea5472fd7
@ -281,38 +281,7 @@
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.empty-state {
|
||||
display: none;
|
||||
width: 375px;
|
||||
padding-top: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state.active {
|
||||
display: block;
|
||||
}
|
||||
.empty-state img {
|
||||
display: block;
|
||||
width: 146px;
|
||||
height: 143px;
|
||||
margin: 0 auto 24px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.empty-text,
|
||||
.footer-text {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
font-size: 10px;
|
||||
line-height: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.footer-text {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.achievement-loading {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 320px;
|
||||
z-index: 7;
|
||||
width: 375px;
|
||||
color: rgba(255, 255, 255, 0.72);
|
||||
}
|
||||
.achievement-loading .hy-loading__mascot {
|
||||
@ -543,28 +512,17 @@
|
||||
</div>
|
||||
<section class="content" aria-live="polite">
|
||||
<div id="badgeGrid" class="badge-grid"></div>
|
||||
<div id="emptyState" class="empty-state">
|
||||
<img src="assets/figma/empty-cat.png" alt="" />
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<div
|
||||
id="loading"
|
||||
class="hy-loading achievement-loading"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="hy-loading__mascot" aria-hidden="true"></div>
|
||||
<div class="hy-loading__spinner" aria-hidden="true"></div>
|
||||
<div
|
||||
class="hy-loading__text"
|
||||
data-i18n="achievement.loading"
|
||||
>
|
||||
Loading...
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div
|
||||
id="loading"
|
||||
class="hy-loading achievement-loading"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="hy-loading__mascot" aria-hidden="true"></div>
|
||||
<div class="hy-loading__spinner" aria-hidden="true"></div>
|
||||
</div>
|
||||
<div id="toast" class="toast"></div>
|
||||
<div id="achievementModal" class="achievement-modal" aria-hidden="true">
|
||||
<img id="modalBadge" class="modal-badge" alt="" />
|
||||
@ -852,10 +810,7 @@
|
||||
config.unlock_method ||
|
||||
config.how_to_get ||
|
||||
def.description ||
|
||||
t(
|
||||
'achievement.defaultHowTo',
|
||||
'Complete the required achievement goal to collect this badge.'
|
||||
)
|
||||
''
|
||||
);
|
||||
}
|
||||
function ownerCountOf(item) {
|
||||
@ -934,7 +889,10 @@
|
||||
byId('userName').textContent = profileName(profile);
|
||||
setImage(byId('profileAvatar'), profileAvatar(profile), '');
|
||||
renderProfileFrame(profile);
|
||||
byId('earnedText').innerHTML = earnedText(unlockedCount());
|
||||
byId('earnedText').innerHTML =
|
||||
state.loaded.honors || state.loaded.event
|
||||
? earnedText(unlockedCount())
|
||||
: '';
|
||||
}
|
||||
function cardHTML(item, index) {
|
||||
var unlocked = isUnlocked(item);
|
||||
@ -969,9 +927,6 @@
|
||||
);
|
||||
});
|
||||
byId('badgeGrid').innerHTML = list.map(cardHTML).join('');
|
||||
var empty = !state.loading && list.length === 0;
|
||||
byId('emptyState').classList.toggle('active', empty);
|
||||
byId('footerText').style.display = empty ? 'none' : 'block';
|
||||
byId('loading').classList.toggle('active', state.loading);
|
||||
byId('loading').setAttribute(
|
||||
'aria-hidden',
|
||||
@ -1187,10 +1142,7 @@
|
||||
'count',
|
||||
owners
|
||||
)
|
||||
: t(
|
||||
'achievement.ownerUpdating',
|
||||
'Collection records are updating'
|
||||
);
|
||||
: '';
|
||||
renderCollectors(item);
|
||||
byId('achievementModal').classList.add('active');
|
||||
byId('achievementModal').setAttribute(
|
||||
|
||||
@ -625,15 +625,11 @@
|
||||
"achievement.back": "رجوع",
|
||||
"achievement.honors": "الأوسمة",
|
||||
"achievement.event": "الفعاليات",
|
||||
"achievement.stayTuned": "ترقب المزيد من الإنجازات!",
|
||||
"achievement.loading": "جار التحميل...",
|
||||
"achievement.earned": "حصلت على {count} إنجازات",
|
||||
"achievement.defaultHowTo": "أكمل هدف الإنجاز المطلوب لجمع هذه الشارة.",
|
||||
"achievement.loadFailed": "فشل التحميل",
|
||||
"achievement.collection": "مجموعة الإنجازات",
|
||||
"achievement.notCollected": "لم يتم جمعها",
|
||||
"achievement.collected": "تم جمعها",
|
||||
"achievement.collectedWithDate": "تم جمعها في {date}",
|
||||
"achievement.ownerCount": "يمتلكها {count} أشخاص فقط",
|
||||
"achievement.ownerUpdating": "يتم تحديث سجلات المجموعة"
|
||||
"achievement.ownerCount": "يمتلكها {count} أشخاص فقط"
|
||||
}
|
||||
|
||||
@ -631,15 +631,11 @@
|
||||
"achievement.back": "Back",
|
||||
"achievement.honors": "Honors",
|
||||
"achievement.event": "Event",
|
||||
"achievement.stayTuned": "Stay Tuned For More Achievements!",
|
||||
"achievement.loading": "Loading...",
|
||||
"achievement.earned": "Earn {count} achievements",
|
||||
"achievement.defaultHowTo": "Complete the required achievement goal to collect this badge.",
|
||||
"achievement.loadFailed": "Load failed",
|
||||
"achievement.collection": "Achievement Collection",
|
||||
"achievement.notCollected": "Not Collected",
|
||||
"achievement.collected": "Collected",
|
||||
"achievement.collectedWithDate": "Collected on {date}",
|
||||
"achievement.ownerCount": "Only {count} people own it",
|
||||
"achievement.ownerUpdating": "Collection records are updating"
|
||||
"achievement.ownerCount": "Only {count} people own it"
|
||||
}
|
||||
|
||||
@ -625,15 +625,11 @@
|
||||
"achievement.back": "Volver",
|
||||
"achievement.honors": "Honores",
|
||||
"achievement.event": "Evento",
|
||||
"achievement.stayTuned": "¡Pronto habrá más logros!",
|
||||
"achievement.loading": "Cargando...",
|
||||
"achievement.earned": "Has conseguido {count} logros",
|
||||
"achievement.defaultHowTo": "Completa el objetivo requerido para coleccionar esta insignia.",
|
||||
"achievement.loadFailed": "Error al cargar",
|
||||
"achievement.collection": "Colección de logros",
|
||||
"achievement.notCollected": "No coleccionado",
|
||||
"achievement.collected": "Coleccionado",
|
||||
"achievement.collectedWithDate": "Coleccionado el {date}",
|
||||
"achievement.ownerCount": "Solo {count} personas lo tienen",
|
||||
"achievement.ownerUpdating": "Los registros de colección se están actualizando"
|
||||
"achievement.ownerCount": "Solo {count} personas lo tienen"
|
||||
}
|
||||
|
||||
@ -592,15 +592,11 @@
|
||||
"achievement.back": "Kembali",
|
||||
"achievement.honors": "Honor",
|
||||
"achievement.event": "Event",
|
||||
"achievement.stayTuned": "Nantikan pencapaian lainnya!",
|
||||
"achievement.loading": "Memuat...",
|
||||
"achievement.earned": "Mendapat {count} pencapaian",
|
||||
"achievement.defaultHowTo": "Selesaikan target pencapaian untuk mengoleksi lencana ini.",
|
||||
"achievement.loadFailed": "Gagal memuat",
|
||||
"achievement.collection": "Koleksi Pencapaian",
|
||||
"achievement.notCollected": "Belum dikoleksi",
|
||||
"achievement.collected": "Dikoleksi",
|
||||
"achievement.collectedWithDate": "Dikoleksi pada {date}",
|
||||
"achievement.ownerCount": "Hanya {count} orang yang memilikinya",
|
||||
"achievement.ownerUpdating": "Catatan koleksi sedang diperbarui"
|
||||
"achievement.ownerCount": "Hanya {count} orang yang memilikinya"
|
||||
}
|
||||
|
||||
@ -592,15 +592,11 @@
|
||||
"achievement.back": "Geri",
|
||||
"achievement.honors": "Onurlar",
|
||||
"achievement.event": "Etkinlik",
|
||||
"achievement.stayTuned": "Daha fazla başarı yakında!",
|
||||
"achievement.loading": "Yükleniyor...",
|
||||
"achievement.earned": "{count} başarı kazandın",
|
||||
"achievement.defaultHowTo": "Bu rozeti toplamak için gerekli başarı hedefini tamamla.",
|
||||
"achievement.loadFailed": "Yüklenemedi",
|
||||
"achievement.collection": "Başarı Koleksiyonu",
|
||||
"achievement.notCollected": "Toplanmadı",
|
||||
"achievement.collected": "Toplandı",
|
||||
"achievement.collectedWithDate": "{date} tarihinde toplandı",
|
||||
"achievement.ownerCount": "Sadece {count} kişi sahip",
|
||||
"achievement.ownerUpdating": "Koleksiyon kayıtları güncelleniyor"
|
||||
"achievement.ownerCount": "Sadece {count} kişi sahip"
|
||||
}
|
||||
|
||||
@ -598,15 +598,11 @@
|
||||
"achievement.back": "返回",
|
||||
"achievement.honors": "荣誉",
|
||||
"achievement.event": "活动",
|
||||
"achievement.stayTuned": "更多成就敬请期待!",
|
||||
"achievement.loading": "加载中...",
|
||||
"achievement.earned": "已获得 {count} 个成就",
|
||||
"achievement.defaultHowTo": "完成对应成就目标后可收集该徽章。",
|
||||
"achievement.loadFailed": "加载失败",
|
||||
"achievement.collection": "成就收藏",
|
||||
"achievement.notCollected": "未收集",
|
||||
"achievement.collected": "已收集",
|
||||
"achievement.collectedWithDate": "{date} 已收集",
|
||||
"achievement.ownerCount": "仅 {count} 人拥有",
|
||||
"achievement.ownerUpdating": "收藏记录更新中"
|
||||
"achievement.ownerCount": "仅 {count} 人拥有"
|
||||
}
|
||||
|
||||
@ -105,14 +105,20 @@
|
||||
}
|
||||
|
||||
.hy-loading {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 90;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background: rgba(10, 7, 18, 0.48);
|
||||
color: var(--hy-theme-muted);
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.hy-loading.active,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user