diff --git a/templates/index.html b/templates/index.html
index c3944c8..5daaf46 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -12,10 +12,11 @@
#tree-container { width: 20%; padding: 10px; border-right: 1px solid #ccc; }
#installs-container { width: 50%; padding: 10px; position: relative; }
.install-item { padding: 5px; margin: 2px; border: 1px solid #ddd; cursor: move; position: relative; }
+ .install-item.selected { background-color: #e6f7ff; } /* Подсветка выбранного пункта */
.form-container { margin-bottom: 20px; }
.jstree-node { position: relative; }
.folder-actions { display: none; margin-left: 10px; }
- .jstree-node:hover .folder-actions { display: inline; }
+ .jstree-node:hover .folder-actions { display: inline; } /* Показываем кнопки только для наведенной папки */
#search-container { position: absolute; top: 10px; right: 10px; text-align: right; }
#search-input { width: 200px; }
#installs-list { margin-top: 20px; }
@@ -231,7 +232,7 @@
@@ -253,6 +254,17 @@
updateSortArrows();
}
+ function selectInstall(installId, rustId, protocol) {
+ selectedInstallId = installId;
+ $('.install-item').removeClass('selected'); // Убираем подсветку со всех элементов
+ $(`#installs-list .install-item[data-id="${installId}"]`).addClass('selected'); // Добавляем подсветку выбранному элементу
+ updateNotesPanel(); // Обновляем заметку
+ if (confirm(`Подключиться к ${rustId} через ${protocol}?`)) {
+ const link = protocolLinks[protocol] + rustId;
+ window.location.href = link;
+ }
+ }
+
function filterInstalls() {
const query = $('#search-input').val().toLowerCase();
const scope = $('input[name="search-scope"]:checked').val();
@@ -533,6 +545,8 @@
// Обновляем заметки при клике на подключение
$('#installs-list').on('click', '.install-item', function () {
selectedInstallId = $(this).data('id');
+ $('.install-item').removeClass('selected'); // Убираем подсветку со всех элементов
+ $(this).addClass('selected'); // Добавляем подсветку выбранному элементу
updateNotesPanel();
});