支持快捷复制提交消息

This commit is contained in:
xintaofei
2026-03-13 23:50:41 +08:00
parent 61361c240e
commit 6fb6f5b651
11 changed files with 17 additions and 2 deletions

View File

@@ -1083,10 +1083,15 @@ export function GitLogTab() {
</time>
</span>
</div>
<div className="rounded-lg border border-border/60 bg-muted/20 p-2.5">
<p className="text-xs whitespace-pre-wrap break-words">
<div className="group/msg relative rounded-lg border border-border/60 bg-muted/20 p-2.5">
<p className="text-xs whitespace-pre-wrap break-words pr-6">
{entry.message}
</p>
<CommitCopyButton
className="absolute top-1.5 right-1.5 size-5 opacity-0 transition-opacity group-hover/msg:opacity-100 group-focus-within/msg:opacity-100"
hash={entry.message}
title={t("copyMessage")}
/>
</div>
{entry.files.length === 0 ? (
<div className="space-y-1">

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "لم يتم العثور على التزامات",
"hash": "بصمة الالتزام",
"copyHash": "نسخ الـ hash",
"copyMessage": "نسخ الرسالة",
"author": "المؤلف",
"noFileChangeDetails": "لا توجد تفاصيل تغييرات ملفات متاحة.",
"branchesTitle": "الفروع",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "Keine Commits gefunden",
"hash": "Hash-Wert",
"copyHash": "Hash kopieren",
"copyMessage": "Nachricht kopieren",
"author": "Autor",
"noFileChangeDetails": "Keine Details zu Dateiänderungen verfügbar.",
"branchesTitle": "Zweige",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "No commits found",
"hash": "Hash",
"copyHash": "Copy hash",
"copyMessage": "Copy message",
"author": "Author",
"noFileChangeDetails": "No file change details available.",
"branchesTitle": "Branches",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "No se encontraron commits",
"hash": "Hash del commit",
"copyHash": "Copiar hash",
"copyMessage": "Copiar mensaje",
"author": "Autor",
"noFileChangeDetails": "No hay detalles de cambios de archivo disponibles.",
"branchesTitle": "Ramas",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "Aucun commit trouvé",
"hash": "Empreinte",
"copyHash": "Copier le hash",
"copyMessage": "Copier le message",
"author": "Auteur",
"noFileChangeDetails": "Aucun détail de changement de fichier disponible.",
"branchesTitle": "Branches Git",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "コミットが見つかりません",
"hash": "ハッシュ",
"copyHash": "ハッシュをコピー",
"copyMessage": "メッセージをコピー",
"author": "作成者",
"noFileChangeDetails": "ファイル変更の詳細はありません。",
"branchesTitle": "ブランチ",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "커밋을 찾을 수 없습니다",
"hash": "해시",
"copyHash": "해시 복사",
"copyMessage": "메시지 복사",
"author": "작성자",
"noFileChangeDetails": "파일 변경 상세 정보가 없습니다.",
"branchesTitle": "브랜치",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "Nenhum commit encontrado",
"hash": "Hash do commit",
"copyHash": "Copiar hash",
"copyMessage": "Copiar mensagem",
"author": "Autor",
"noFileChangeDetails": "Sem detalhes de alteração de arquivos disponíveis.",
"branchesTitle": "Branches Git",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "未找到提交记录",
"hash": "Hash",
"copyHash": "复制哈希",
"copyMessage": "复制提交消息",
"author": "作者",
"noFileChangeDetails": "暂无文件变更详情。",
"branchesTitle": "分支",

View File

@@ -871,6 +871,7 @@
"noCommitsFound": "未找到提交記錄",
"hash": "Hash",
"copyHash": "複製雜湊",
"copyMessage": "複製提交訊息",
"author": "作者",
"noFileChangeDetails": "暫無檔案變更詳情。",
"branchesTitle": "分支",