fix: make copy buttons work on HTTP panel pages

Read share links from input fields and fall back to execCommand when
Clipboard API is unavailable outside secure contexts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 10:17:04 +08:00
parent d339fbd917
commit 9ebab211dd
3 changed files with 57 additions and 10 deletions
+7 -1
View File
@@ -70,7 +70,8 @@ body {
input[type="text"],
input[type="password"],
input[readonly] {
input[readonly],
input.copy-input {
width: 100%;
padding: 10px 12px;
border-radius: 8px;
@@ -79,6 +80,11 @@ input[readonly] {
color: var(--text);
}
input.copy-input {
cursor: pointer;
font-size: 0.82rem;
}
.btn {
border: 1px solid var(--border);
background: #111827;