diff --git a/LichessWebView/templates/index.html b/LichessWebView/templates/index.html
index a5b8469..0999d32 100644
--- a/LichessWebView/templates/index.html
+++ b/LichessWebView/templates/index.html
@@ -238,6 +238,44 @@
color: #6B5432 !important;
text-decoration: underline !important;
}
+
+ .user-link {
+ color: inherit;
+ text-decoration: none;
+ transition: color 0.3s;
+ }
+
+ .user-link:hover {
+ color: #6B5432;
+ text-decoration: underline;
+ }
+
+ .user-item.active .user-link {
+ color: inherit;
+ }
+
+ .user-item.active .user-link:hover {
+ color: rgba(255, 255, 255, 0.9);
+ }
+
+ .username-link {
+ color: #8B6F47;
+ text-decoration: none;
+ transition: color 0.3s;
+ }
+
+ .username-link:hover {
+ color: #6B5432;
+ text-decoration: underline;
+ }
+
+ .user-item.active .username-link {
+ color: rgba(255, 255, 255, 0.8);
+ }
+
+ .user-item.active .username-link:hover {
+ color: rgba(255, 255, 255, 0.95);
+ }
@@ -381,17 +419,32 @@
return;
}
- usersList.innerHTML = filteredUsers.map(user => `
+ usersList.innerHTML = filteredUsers.map(user => {
+ const userName = escapeHtml(user.first_name);
+ const username = user.username && user.username !== '-' ? escapeHtml(user.username) : null;
+ const telegramLink = username ? `https://t.me/${username}` : `tg://user?id=${user.user_id}`;
+
+ return `
-
${escapeHtml(user.first_name)}
-
@${escapeHtml(user.username)} • ID: ${user.user_id}
+
+
+ ${username ?
+ `
@${username}` :
+ `
ID: ${user.user_id}`
+ } • ID: ${user.user_id}
+
Добавлен: ${formatDate(user.created_at)}
-📊 ${user.gamer_count} игроков
+ 📊 ${user.gamer_count} игроков
⏰ ${user.monitored_gamers} с уведомл.
- `).join('');
+ `;
+ }).join('');
}
// Выбор пользователя
@@ -404,8 +457,21 @@
if (user) {
document.getElementById('selected-user-info').style.display = 'block';
- document.getElementById('selected-user-name').textContent = user.first_name;
- document.getElementById('selected-user-username').textContent = `@${user.username} • ID: ${user.user_id}`;
+ const username = user.username && user.username !== '-' ? user.username : null;
+ const telegramLink = username ? `https://t.me/${username}` : `tg://user?id=${user.user_id}`;
+
+ // Create name with link
+ const nameElement = document.getElementById('selected-user-name');
+ nameElement.innerHTML = `${escapeHtml(user.first_name)}`;
+
+ // Create username with link
+ const usernameElement = document.getElementById('selected-user-username');
+ if (username) {
+ usernameElement.innerHTML = `@${escapeHtml(username)} • ID: ${user.user_id}`;
+ } else {
+ usernameElement.textContent = `ID: ${user.user_id}`;
+ }
+
document.getElementById('selected-user-date').textContent = `Добавлен: ${formatDate(user.created_at)}`;
}