mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-10 05:00:59 +00:00
Update page.tsx
This commit is contained in:
@@ -420,6 +420,15 @@ export default function PluginConfigPage() {
|
|||||||
document.body.appendChild(textArea);
|
document.body.appendChild(textArea);
|
||||||
textArea.select();
|
textArea.select();
|
||||||
textArea.setSelectionRange(0, 99999);
|
textArea.setSelectionRange(0, 99999);
|
||||||
|
const success = document.execCommand('copy');
|
||||||
|
document.body.removeChild(textArea);
|
||||||
|
if (success) {
|
||||||
|
setCopiedDebugUrl(true);
|
||||||
|
setTimeout(() => setCopiedDebugUrl(false), 2000);
|
||||||
|
} else {
|
||||||
|
setCopiedDebugKey(true);
|
||||||
|
setTimeout(() => setCopiedDebugKey(false), 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user