Skip to content

Commit 8e73a5e

Browse files
author
CodeJudge
committed
feat: 复制判题结果
1 parent d6c0169 commit 8e73a5e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

frontend/src/pages/ProblemDetail.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,16 @@ export default function ProblemDetail() {
447447
>
448448
<Send size={14} /> 查看全部提交
449449
</Link>
450+
<button
451+
onClick={() => {
452+
const text = `CodeJudge - ${problem.title}\n状态: ${submissionResult.status}\n得分: ${submissionResult.score}\n时间: ${submissionResult.created_at}`;
453+
navigator.clipboard.writeText(text);
454+
toast.success('结果已复制');
455+
}}
456+
className="text-sm text-dark-400 hover:text-white transition-colors inline-flex items-center gap-1"
457+
>
458+
<Clipboard size={14} /> 复制结果
459+
</button>
450460
</div>
451461
</div>
452462
);

0 commit comments

Comments
 (0)