style: apply linter suggestions

This commit is contained in:
Edouard Vanbelle
2026-04-07 22:50:42 +02:00
parent 1ce29c101d
commit a4266a6e93
33 changed files with 444 additions and 437 deletions
+5 -3
View File
@@ -115,7 +115,7 @@ async function checkAuthentication() {
window.location.href = '/login?source=session_expired';
return;
}
} catch (err) {
} catch (_err) {
localStorage.removeItem(USER_DATA_KEY);
window.location.href = '/login?source=session_expired';
return;
@@ -128,9 +128,11 @@ async function checkAuthentication() {
console.log('No cached user data, fetching from server');
try {
const freshData = await refreshUserData();
if (freshData && freshData.username) {
if (freshData?.username) {
const userInitials = freshData.username.substring(0, 2).toUpperCase();
document.querySelectorAll('.user-avatar, .user-menu-avatar').forEach((el) => (el.textContent = userInitials));
document.querySelectorAll('.user-avatar, .user-menu-avatar').forEach((el) => {
el.textContent = userInitials;
});
window.updateStorageUsageDisplay(freshData);
resolveHomeFolder().then(() => window.loadFiles());
} else {