добавлены ссылки на фронт

This commit is contained in:
2025-12-24 11:38:35 +03:00
parent 2a107b64e6
commit dbeb1b9cc0

View File

@@ -291,6 +291,44 @@
color: var(--text-secondary); color: var(--text-secondary);
} }
.connection-info {
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-color);
}
.connection-info h3 {
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 1rem;
font-weight: 500;
}
.info-item {
background: var(--bg-secondary);
padding: 0.75rem 1rem;
border-radius: 12px;
margin-bottom: 0.75rem;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 0.85rem;
}
.info-item .label {
color: var(--text-secondary);
}
.info-item .value {
font-family: 'JetBrains Mono', monospace;
color: var(--accent);
background: rgba(99, 102, 241, 0.1);
padding: 0.25rem 0.5rem;
border-radius: 6px;
user-select: all;
cursor: pointer;
}
/* Responsive */ /* Responsive */
@media (max-width: 480px) { @media (max-width: 480px) {
body { body {
@@ -350,6 +388,18 @@
<span class="message-icon" id="messageIcon"></span> <span class="message-icon" id="messageIcon"></span>
<span id="messageText"></span> <span id="messageText"></span>
</div> </div>
<div class="connection-info">
<h3>Данные для подключения</h3>
<div class="info-item">
<span class="label">HTTP / HTTPS</span>
<code class="value" id="httpLink" title="Нажмите, чтобы скопировать">...</code>
</div>
<div class="info-item">
<span class="label">SOCKS5</span>
<code class="value" id="socksLink" title="Нажмите, чтобы скопировать">...</code>
</div>
</div>
</div> </div>
<div class="footer"> <div class="footer">
@@ -443,6 +493,24 @@
fetchStatus(); fetchStatus();
// Refresh status every 30 seconds // Refresh status every 30 seconds
setInterval(fetchStatus, 30000); setInterval(fetchStatus, 30000);
// Update connection links
const hostname = window.location.hostname;
const httpLink = document.getElementById('httpLink');
const socksLink = document.getElementById('socksLink');
httpLink.textContent = `http://${hostname}:8082`;
socksLink.textContent = `socks5://${hostname}:8082`;
// Copy to clipboard on click
[httpLink, socksLink].forEach(el => {
el.addEventListener('click', () => {
navigator.clipboard.writeText(el.textContent);
const original = el.style.color;
el.style.color = 'var(--success)';
setTimeout(() => el.style.color = original, 500);
});
});
</script> </script>
</body> </body>
</html> </html>