main
Satur@it-depot.ru 2025-03-05 09:52:18 +03:00
parent 18a0d98190
commit be04858dd0
1 changed files with 18 additions and 8 deletions

View File

@ -73,12 +73,21 @@
let sortDirection = 'asc';
const protocolIcons = {
'rustdesk': '🖥️', // Эмодзи для RustDesk
'anydesk': '🔴', // Эмодзи для AnyDesk
'ammyy': '🟢', // Эмодзи для Ammyy Admin
'teamviewer': '🔵', // Эмодзи для TeamViewer
'vnc': '🟡', // Эмодзи для VNC
'rdp': '🟣' // Эмодзи для RDP
'rustdesk': '🖥️',
'anydesk': '🔴',
'ammyy': '🟢',
'teamviewer': '🔵',
'vnc': '🟡',
'rdp': '🟣'
};
const protocolLinks = {
'rustdesk': 'rustdesk://',
'anydesk': 'anydesk://',
'ammyy': 'ammyy://',
'teamviewer': 'teamviewer://remote-control/',
'vnc': 'vnc://',
'rdp': 'rdp://'
};
$(document).ready(function () {
@ -142,7 +151,7 @@
<div style="flex: 1; text-align: center;">${item.computer_name}</div>
<div style="flex: 1; text-align: center;">${item.install_time}</div>
<div style="flex: 1; text-align: center;">
<a href="${item.protocol}://${item.rust_id}" onclick="openRemote('${item.rust_id}', '${item.protocol}'); return false;">Подключиться</a>
<a href="${protocolLinks[item.protocol]}${item.rust_id}" onclick="openRemote('${item.rust_id}', '${item.protocol}'); return false;">Подключиться</a>
<button onclick="editInstall(${item.id}, '${item.rust_id}', '${item.computer_name}', '${item.install_time}', '${item.protocol}')">Редактировать</button>
<button onclick="deleteInstall(${item.id})">Удалить</button>
</div>
@ -308,7 +317,8 @@
function openRemote(id, protocol) {
if (confirm(`Подключиться к ${id} через ${protocol}?`)) {
window.location.href = `${protocol}://${id}`;
const link = protocolLinks[protocol] + id;
window.location.href = link;
}
}
</script>