ui: remove credentials badge from WEB sessions, remove Back button from RDP
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
-22
@@ -1637,28 +1637,6 @@ def session_view_page(session_id: str, request: Request, user: User = Depends(re
|
||||
iframe_src = None
|
||||
if iframe_src:
|
||||
creds_html = ""
|
||||
if service.type != ServiceType.RDP and (service.svc_login or service.svc_password):
|
||||
rows = ""
|
||||
if service.svc_login:
|
||||
login_esc = service.svc_login.replace('"', '"').replace('<', '<')
|
||||
rows += f'''<div class="cr-row"><span class="cr-label">Логин</span><span class="cr-val">{login_esc}</span></div>'''
|
||||
if service.svc_password:
|
||||
pass_esc = service.svc_password.replace('"', '"').replace('<', '<')
|
||||
rows += f'''<div class="cr-row"><span class="cr-label">Пароль</span><span class="cr-val cr-masked">{pass_esc}</span></div>'''
|
||||
if service.svc_cred_hint:
|
||||
hint_esc = service.svc_cred_hint.replace('<', '<')
|
||||
rows += f'''<p class="cr-hint">{hint_esc}</p>'''
|
||||
creds_html = f'''
|
||||
<div class="creds-panel" id="creds-panel">
|
||||
<button class="creds-close" id="creds-close" title="Закрыть">✕</button>
|
||||
{rows}
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("creds-close").onclick = function() {{
|
||||
document.getElementById("creds-panel").style.display = "none";
|
||||
}};
|
||||
|
||||
</script>'''
|
||||
|
||||
return HTMLResponse(
|
||||
content=f"""
|
||||
|
||||
@@ -84,7 +84,6 @@ cat > /opt/portal/index.html <<HTML
|
||||
</div>
|
||||
<div id="status"></div>
|
||||
<div class="nav-panel">
|
||||
<button class="nav-btn" id="btn-back" type="button" title="Назад"><span class="nb-icon">←</span><span class="nb-label">Назад</span></button>
|
||||
<button class="nav-btn" id="btn-home" type="button" title="Главная"><span class="nb-icon">⌂</span><span class="nb-label">Главная</span></button>
|
||||
<button class="nav-btn" id="btn-fs" type="button" title="На весь экран"><span class="nb-icon">⛶</span><span class="nb-label">Экран</span></button>
|
||||
</div>
|
||||
@@ -235,7 +234,6 @@ cat > /opt/portal/index.html <<HTML
|
||||
window.location.href = '/';
|
||||
}
|
||||
|
||||
document.getElementById('btn-back').addEventListener('click', () => chord(XK_ALT_L, XK_LEFT, 'AltLeft', 'ArrowLeft'));
|
||||
document.getElementById('btn-home').addEventListener('click', goHome);
|
||||
document.getElementById('btn-fs').addEventListener('click', () => {
|
||||
if (!document.fullscreenElement) document.documentElement.requestFullscreen();
|
||||
|
||||
Reference in New Issue
Block a user