mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 15:00:45 +08:00
Drop workbench card blurbs and let API key secrets dismiss after copy.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
52cd4d1298
commit
99d180c501
4 changed files with 6 additions and 33 deletions
|
|
@ -164,10 +164,13 @@ export function ApiTokensPage() {
|
|||
createMut.mutate();
|
||||
};
|
||||
|
||||
const dismissCreatedPlain = () => setCreatedPlain("");
|
||||
|
||||
const copyToken = async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(createdPlain);
|
||||
showOk(t("auth.tokenCopied"));
|
||||
dismissCreatedPlain();
|
||||
} catch {
|
||||
showError(t("auth.tokenCopyFailed"));
|
||||
}
|
||||
|
|
@ -260,6 +263,9 @@ export function ApiTokensPage() {
|
|||
<button type="button" onClick={() => void copyToken()}>
|
||||
{t("auth.copyToken")}
|
||||
</button>
|
||||
<button type="button" onClick={dismissCreatedPlain}>
|
||||
{t("common.close")}
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue