-
{v.version} {v.message}
-
{new Date(v.committedAt).toLocaleString("zh-CN")}{v.author ? " · " + v.author : ""}
+
+
{(v.author ?? "?").slice(0, 1).toUpperCase()}
+
+
{v.message}
+
+ {#if v.author}{v.author} · {/if}{new Date(v.committedAt).toLocaleString("zh-CN")}
+
+
{/each}
diff --git a/hub/filelib-web/src/lib/HistoryPanel.svelte b/hub/filelib-web/src/lib/HistoryPanel.svelte
new file mode 100644
index 0000000..3ca6216
--- /dev/null
+++ b/hub/filelib-web/src/lib/HistoryPanel.svelte
@@ -0,0 +1,113 @@
+
+
+
+
修改历史
+
+ {#if history === null && loadError === null}
+
加载中…
+ {:else if loadError}
+
{loadError}
+ {:else if history && history.length === 0}
+
暂无提交记录
+ {:else if history}
+
+ {#each history as commit (commit.version)}
+ {@const isOpen = expanded.has(commit.version)}
+
+
+
+ {#if isOpen}
+
+
+ {#each commit.files as filePath (filePath)}
+
+ {filePath}
+
+ {/each}
+ {#if commit.files.length === 0}
+ 无文件变更信息
+ {/if}
+
+
+ {/if}
+
+ {/each}
+
+
+ {#if history.length >= limit}
+
+
+
+ {/if}
+ {/if}
+
diff --git a/hub/filelib-web/src/lib/NodeDetailPanel.svelte b/hub/filelib-web/src/lib/NodeDetailPanel.svelte
index fe437c2..97b65b2 100644
--- a/hub/filelib-web/src/lib/NodeDetailPanel.svelte
+++ b/hub/filelib-web/src/lib/NodeDetailPanel.svelte
@@ -5,10 +5,11 @@
import OverviewPanel from "./OverviewPanel.svelte";
import FilesPanel from "./FilesPanel.svelte";
import GrantsPanel from "./GrantsPanel.svelte";
+ import HistoryPanel from "./HistoryPanel.svelte";
import Modal from "./Modal.svelte";
import Icon from "./Icon.svelte";
- type Tab = "detail" | "files" | "grants";
+ type Tab = "detail" | "files" | "history" | "grants";
let tab = $state