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