fix
parent
cbc0289ad0
commit
bccf38ffe5
|
|
@ -9,8 +9,8 @@
|
|||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.12/themes/default/style.min.css">
|
||||
<style>
|
||||
body { display: flex; font-family: Arial, sans-serif; margin: 0; }
|
||||
#tree-container { width: 20%; padding: 10px; border-right: 1px solid #ccc; }
|
||||
#installs-container { width: 50%; padding: 10px; position: relative; }
|
||||
#tree-container { width: 15%; padding: 10px; border-right: 1px solid #ccc; } /* Уменьшаем ширину до 15% */
|
||||
#installs-container { width: 55%; padding: 10px; position: relative; } /* Увеличиваем ширину до 55% */
|
||||
.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; }
|
||||
|
|
@ -37,11 +37,10 @@
|
|||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease; /* Плавный переход для эффекта наведения */
|
||||
transition: background 0.2s ease; /* Плавный переход только фона */
|
||||
}
|
||||
.edit-button:hover {
|
||||
background: #e0e0e0; /* Легкий серый при наведении */
|
||||
transform: scale(1.1); /* Увеличение размера */
|
||||
color: #0056b3;
|
||||
}
|
||||
.copy-button {
|
||||
|
|
@ -56,11 +55,10 @@
|
|||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease; /* Плавный переход для эффекта наведения */
|
||||
transition: background 0.2s ease; /* Плавный переход только фона */
|
||||
}
|
||||
.copy-button:hover {
|
||||
background: #e0e0e0; /* Легкий серый при наведении */
|
||||
transform: scale(1.1); /* Увеличение размера */
|
||||
color: #218838;
|
||||
}
|
||||
.install-item:hover .edit-button { display: inline-block; }
|
||||
|
|
@ -301,17 +299,17 @@
|
|||
} else {
|
||||
$('#installs-list').html(installs.map(item => `
|
||||
<div class="install-item" data-id="${item.id}" draggable="true" style="display: flex; justify-content: space-between; position: relative;">
|
||||
<div style="flex: 1; text-align: center; position: relative;">
|
||||
<div style="flex: 1; text-align: center; position: relative; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
${item.computer_name}
|
||||
<button class="edit-button" onclick="editField(${item.id}, 'computer_name', '${item.computer_name}')">✏️</button>
|
||||
</div>
|
||||
<div style="flex: 1; text-align: center; position: relative;">
|
||||
<div style="flex: 1; text-align: center; position: relative; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
<span class="protocol-icon">${protocolIcons[item.protocol]}</span>
|
||||
<a href="${protocolLinks[item.protocol]}${item.rust_id}" class="connection-link" onclick="selectInstall(${item.id}, '${item.rust_id}', '${item.protocol}'); return false;">${item.rust_id}</a>
|
||||
<a href="${protocolLinks[item.protocol]}${item.rust_id}" class="connection-link" target="_blank">${item.rust_id}</a>
|
||||
<button class="copy-button" onclick="copyToClipboard('${item.rust_id}')">📋</button>
|
||||
<button class="edit-button" onclick="editField(${item.id}, 'rust_id', '${item.rust_id}')">✏️</button>
|
||||
</div>
|
||||
<div style="flex: 1; text-align: center; position: relative;">
|
||||
<div style="flex: 1; text-align: center; position: relative; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
${item.install_time}
|
||||
<button class="edit-button" onclick="editField(${item.id}, 'install_time', '${item.install_time}')">✏️</button>
|
||||
</div>
|
||||
|
|
@ -332,10 +330,9 @@
|
|||
$('.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;
|
||||
}
|
||||
// Убрано подтверждение, переход сразу
|
||||
const link = protocolLinks[protocol] + rustId;
|
||||
window.location.href = link;
|
||||
}
|
||||
|
||||
function sortInstalls(field, filteredInstalls = null) {
|
||||
|
|
@ -668,13 +665,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Функция для копирования в буфер обмена
|
||||
// Функция для копирования в буфер обмена без алерта
|
||||
function copyToClipboard(text) {
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
alert('ID скопирован в буфер обмена: ' + text);
|
||||
}).catch(err => {
|
||||
navigator.clipboard.writeText(text).catch(err => {
|
||||
console.error('Ошибка копирования: ', err);
|
||||
alert('Не удалось скопировать ID');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue