Update page.tsx

This commit is contained in:
Typer_Body
2026-01-25 01:36:51 +08:00
committed by GitHub
parent 81ec7c201c
commit 24d865bcd3
+11 -7
View File
@@ -402,13 +402,17 @@ export default function PluginConfigPage() {
}; };
const handleCopyDebugInfo = (text: string, type: 'url' | 'key') => { const handleCopyDebugInfo = (text: string, type: 'url' | 'key') => {
navigator.clipboard.writeText(text); try {
if (type === 'url') { navigator.clipboard.writeText(text);
setCopiedDebugUrl(true); if (type === 'url') {
setTimeout(() => setCopiedDebugUrl(false), 2000); setCopiedDebugUrl(true);
} else { setTimeout(() => setCopiedDebugUrl(false), 2000);
setCopiedDebugKey(true); } else {
setTimeout(() => setCopiedDebugKey(false), 2000); setCopiedDebugKey(true);
setTimeout(() => setCopiedDebugKey(false), 2000);
}
} catch {
} }
}; };