yetone
|
b92513439f
|
gui: a copy button copies in a browser tab with no clipboard API, as magpie web on a NAS opened from another computer is (悠悠哥 on Discord: 网关的apikey复制不生效) — copy asks magpie first (/api/copy), which magpie web refuses (it has no clipboard of the browser's computer to write to), then navigator.clipboard, which a page over plain http from another computer doesn't have (not a secure context): the button showed the key in the status line and copied nothing. The copy command is now the last try (copyByCommand: a readonly textarea out of sight, focused and selected without scrolling, removed after, the focus given back). copy-command.test.cjs (WebKit, en and zh: no navigator.clipboard, /api/copy 501; the sign-in link is what the copy command copied, the status says copied, nothing scrolls) fails without the change and passes with it; click-scroll and signin-link pass in WebKit. go test -tags nogui ./internal/gui passes.
|
2026-10-02 22:36:29 +08:00 |
|