Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Show parents on commit page
Defelo committed 2 months ago
commit d4eeccb90f0f7d24c5e02bd84f813600e739c80d
parent c21389a
1 file changed +16 -0
modified src/views/repos/Commit.svelte
@@ -123,6 +123,22 @@
        <CommitAuthorship {header}>
          <Id id={header.id} style="commit" ariaLabel="commit-id" />
        </CommitAuthorship>
+
        <span class="txt-small">
+
          {header.parents.length === 1 ? "Parent" : "Parents"}:
+
          {#each header.parents as parent, i}
+
            {i > 0 ? " + " : ""}
+
            <Link
+
              styleHoverState
+
              route={{
+
                resource: "repo.commit",
+
                repo: repo.rid,
+
                node: baseUrl,
+
                commit: parent,
+
              }}>
+
              <span class="global-commit">{formatObjectId(parent)}</span>
+
            </Link>
+
          {/each}
+
        </span>
      </div>
      {#if header.description}
        <pre class="description txt-small">{@html dompurify.sanitize(