From 8f3617afddda7e5a865cb2f3d24289cd67410200 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Tue, 28 Apr 2026 13:49:47 +0000 Subject: [PATCH] Remove copy buttons from credentials panels --- app/main.py | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/app/main.py b/app/main.py index 63c57b7..d8c0077 100644 --- a/app/main.py +++ b/app/main.py @@ -2516,10 +2516,10 @@ def session_view_page(session_id: str, request: Request, user: User = Depends(re rows = "" if service.svc_login: login_esc = service.svc_login.replace('"', '"').replace('<', '<') - rows += f'''
Логин{login_esc}
''' + rows += f'''
Логин{login_esc}
''' if service.svc_password: pass_esc = service.svc_password.replace('"', '"').replace('<', '<') - rows += f'''
Пароль{pass_esc}
''' + rows += f'''
Пароль{pass_esc}
''' if service.svc_cred_hint: hint_esc = service.svc_cred_hint.replace('<', '<') rows += f'''

{hint_esc}

''' @@ -2532,19 +2532,7 @@ def session_view_page(session_id: str, request: Request, user: User = Depends(re document.getElementById("creds-close").onclick = function() {{ document.getElementById("creds-panel").style.display = "none"; }}; - document.querySelectorAll(".cr-copy").forEach(function(btn) {{ - btn.addEventListener("click", async function() {{ - var text = btn.dataset.copy; - try {{ await navigator.clipboard.writeText(text); }} catch(e) {{ - var ta = document.createElement("textarea"); - ta.value = text; ta.style.position = "fixed"; ta.style.opacity = "0"; - document.body.appendChild(ta); ta.select(); - document.execCommand("copy"); document.body.removeChild(ta); - }} - btn.classList.add("copied"); - setTimeout(function() {{ btn.classList.remove("copied"); }}, 1500); - }}); - }}); + ''' return HTMLResponse( @@ -2574,14 +2562,7 @@ def session_view_page(session_id: str, request: Request, user: User = Depends(re .cr-val{{font:600 13px/1 monospace;color:#dce8f5;flex:1;overflow:hidden; text-overflow:ellipsis;white-space:nowrap;}} .cr-masked{{letter-spacing:.1em;font-size:14px;}} - .cr-copy{{ - flex-shrink:0;width:26px;height:26px;border:1px solid rgba(255,255,255,.26); - border-radius:6px;background:linear-gradient(180deg,#2a8cd6,#1668a6); - color:#fff;cursor:pointer;font-size:13px;display:grid;place-items:center;padding:0; - box-shadow:inset 0 1px 0 rgba(255,255,255,.22);transition:filter .15s; - }} - .cr-copy:hover{{filter:brightness(1.15)}} - .cr-copy.copied{{background:linear-gradient(180deg,#2ab86a,#1a8a4a);}} + .cr-hint{{margin:4px 0 0;font:400 11px/1.35 sans-serif;color:rgba(180,210,240,.65);}}