feat: add click-to-copy CopyableCode component across all detail pages

- New CopyableCode component with monospace styling and click-to-copy
- TaskDetailPage: copyable task code in header
- ProjectDetailPage: copyable project code in header
- MilestoneDetailPage: copyable milestone code in header
- MeetingDetailPage: copyable meeting code in header
- SupportDetailPage: copyable support code in header
- ProposeDetailPage: copyable propose code in header and info section

Helps users easily copy resource codes for CLI usage (hf task get <code>, etc)
This commit is contained in:
zhi
2026-03-22 00:22:28 +00:00
parent a65429250a
commit 4fc120f595
7 changed files with 58 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ import { useState, useEffect } from 'react'
import { useParams, useNavigate } from 'react-router-dom'
import api from '@/services/api'
import { useAuth } from '@/hooks/useAuth'
import CopyableCode from '@/components/CopyableCode'
interface SupportItem {
id: number
@@ -141,7 +142,7 @@ export default function SupportDetailPage() {
<button className="btn-back" onClick={() => navigate(-1)}> Back</button>
<div className="task-header">
<h2>🎫 {support.support_code || `#${support.id}`}</h2>
<h2>🎫 {support.support_code ? <CopyableCode code={support.support_code} /> : `#${support.id}`}</h2>
<div className="task-meta">
<span className={`badge status-${support.status}`}>{support.status}</span>
<span className={`badge priority-${support.priority}`}>{support.priority}</span>