fix: copy the raw API token from the input value

The copy button passed the token through Django's escapejs filter into the
hyperscript writeText() call, which turns every "-" into -. hyperscript
does not decode \u escapes, so any token containing "-" (common with
token_urlsafe) was copied corrupted and failed auth on paste. Copy from the
input's value instead, which holds the unescaped raw token.
This commit is contained in:
obervinov
2026-06-30 01:02:54 +04:00
parent ca14f77f41
commit 9e9e60ccec
@@ -24,7 +24,7 @@
_="on focus call me.select()" />
<button type="button"
class="btn btn-sm btn-secondary join-item"
_="on click call navigator.clipboard.writeText('{{ raw_token|escapejs }}')
_="on click call navigator.clipboard.writeText(#raw-token-value.value)
then put 'Copied!' into me
then wait 1.5s
then put 'Copy' into me">