From 95ecdaebb03d01b2b47aa942018609477e7c33aa Mon Sep 17 00:00:00 2001 From: yoma Date: Thu, 9 Jul 2026 05:22:34 +0800 Subject: [PATCH] Disable mobile revoked token copy --- apps/mobile/src/screens/WorkspaceScreen.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsx index 623724ca..5e486491 100644 --- a/apps/mobile/src/screens/WorkspaceScreen.tsx +++ b/apps/mobile/src/screens/WorkspaceScreen.tsx @@ -2614,6 +2614,7 @@ const ApiTokenRow = ({ }) => { const tokenCopyLabel = `token-${token.id}`; const configCopyLabel = `config-${token.id}`; + const canCopyToken = Boolean(token.token && !token.isRevoked); return ( @@ -2627,11 +2628,11 @@ const ApiTokenRow = ({ {token.lastUsedAt ? `最近使用 ${formatDate(token.lastUsedAt)}` : "从未使用"} - token.token && onCopy(token.token, tokenCopyLabel)}> - {copiedValue === tokenCopyLabel ? : } + token.token && onCopy(token.token, tokenCopyLabel)}> + {copiedValue === tokenCopyLabel ? : } - token.token && onCopy(buildMcpRemoteConfig(baseUrl, token.token), configCopyLabel)}> - {copiedValue === configCopyLabel ? : } + token.token && onCopy(buildMcpRemoteConfig(baseUrl, token.token), configCopyLabel)}> + {copiedValue === configCopyLabel ? : } !isDeleting && onDelete(token)}>