refine ui
restore in a Dialog
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
isBusy: boolean;
|
||||
expandedCommitHashes: Set<string>;
|
||||
onRestoreCommit: (commit: GitCommit) => void;
|
||||
onRestoreCommitFile: (commit: GitCommit, file: GitCommitFile) => void;
|
||||
onPreviewCommitFile: (commit: GitCommit, file: GitCommitFile) => void;
|
||||
onToggleCommitFiles: (hash: string) => void;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
isBusy = false,
|
||||
expandedCommitHashes = new Set(),
|
||||
onRestoreCommit = () => {},
|
||||
onRestoreCommitFile = () => {},
|
||||
onPreviewCommitFile = () => {},
|
||||
onToggleCommitFiles = () => {},
|
||||
}: Props = $props();
|
||||
|
||||
@@ -204,9 +204,9 @@
|
||||
<button
|
||||
class="commit-file-button"
|
||||
type="button"
|
||||
onclick={() => onRestoreCommitFile(item, file)}
|
||||
onclick={() => onPreviewCommitFile(item, file)}
|
||||
disabled={isBusy}
|
||||
title="Restore this file from this commit"
|
||||
title="Show differences before restoring"
|
||||
>
|
||||
<span class={`status-badge ${file.status}`}>{statusLabel(file.status)}</span>
|
||||
<strong>{displayCommitFile(file)}</strong>
|
||||
|
||||
Reference in New Issue
Block a user