Improve history view

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-04-16 11:22:24 +02:00
parent d046fe8bf7
commit eb0b665a79
2 changed files with 22 additions and 15 deletions
+5 -1
View File
@@ -12,6 +12,10 @@
project.navigateTo({ content, revision, path: null });
};
const browseCommit = (event: { detail: string }) => {
project.navigateTo({ content: ProjectContent.Tree, revision: event.detail, path: null });
};
const fetchCommits = async (parentCommit: string): Promise<GroupedCommitsHistory> => {
const commitsQuery = await Project.getCommits(project.urn, project.seed.api, {
parent: parentCommit, verified: true
@@ -70,7 +74,7 @@
<div class="commit-group-headers">
{#each group.commits as commit (commit.header.sha1)}
<div class="commit" on:click={() => navigateHistory(commit.header.sha1, ProjectContent.Commit)}>
<CommitTeaser {commit} />
<CommitTeaser {commit} on:browseCommit={browseCommit} />
</div>
{/each}
</div>