add Loading Spinner when file History is loading

Make Renamed instad of Del and untracked
This commit is contained in:
Christoph Brandau
2026-07-02 12:17:57 +02:00
parent 310a0fb09a
commit e18f8f1040
5 changed files with 328 additions and 17 deletions
@@ -8,6 +8,7 @@
selectedExplorerLabel: string;
hasRepository: boolean;
isBusy: boolean;
isLoading?: boolean;
onDiff: (commit: GitCommit) => void;
onRestore: (commit: GitCommit) => void;
}
@@ -18,6 +19,7 @@
selectedExplorerLabel = "File history",
hasRepository = false,
isBusy = false,
isLoading = false,
onDiff = () => {},
onRestore = () => {},
}: Props = $props();
@@ -89,6 +91,25 @@
<div class="blank-state">No repository loaded.</div>
{:else if !selectedExplorerPath}
<div class="blank-state">Select a file in Explorer.</div>
{:else if isLoading}
<div class="file-history-loading" role="status" aria-live="polite">
<svg class="file-history-loading-graph" viewBox="0 0 120 120" aria-hidden="true">
<defs>
<linearGradient id="fhl-line" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#646cff" />
<stop offset="100%" stop-color="#41d1ff" />
</linearGradient>
</defs>
<circle class="fhl-ring" cx="60" cy="60" r="52" />
<path class="fhl-trunk" d="M42 22 L42 98" />
<path class="fhl-branch" d="M42 44 C42 62, 82 58, 82 76 L82 88" />
<circle class="fhl-node fhl-n1" cx="42" cy="30" r="6" />
<circle class="fhl-node fhl-n2" cx="42" cy="60" r="6" />
<circle class="fhl-node fhl-n3" cx="82" cy="88" r="6" />
<circle class="fhl-node fhl-n4" cx="42" cy="90" r="6" />
</svg>
<span class="file-history-loading-label">Loading history…</span>
</div>
{:else if fileHistory.length === 0}
<div class="blank-state">No history returned for this selection.</div>
{:else}