From 0b61ad4aa2d77e90a9d2aea8528c63aaf28a4332 Mon Sep 17 00:00:00 2001 From: xphoniex Date: Sun, 28 May 2023 11:34:04 +0000 Subject: [PATCH] Improve commit listing in revision component Signed-off-by: xphoniex --- src/components/Comment.svelte | 2 +- src/views/projects/Cob/Revision.svelte | 97 ++++++++++++++------------ 2 files changed, 54 insertions(+), 45 deletions(-) diff --git a/src/components/Comment.svelte b/src/components/Comment.svelte index d6d5fb129..5aa7dd7ac 100644 --- a/src/components/Comment.svelte +++ b/src/components/Comment.svelte @@ -35,7 +35,7 @@ } .card-body { font-size: var(--font-size-small); - padding: 0 1rem 1rem 1rem; + padding: 0 1rem 0.5rem 1rem; } .actions { display: flex; diff --git a/src/views/projects/Cob/Revision.svelte b/src/views/projects/Cob/Revision.svelte index 512dd219c..92abb5dba 100644 --- a/src/views/projects/Cob/Revision.svelte +++ b/src/views/projects/Cob/Revision.svelte @@ -19,6 +19,7 @@ import InlineMarkdown from "@app/components/InlineMarkdown.svelte"; import ProjectLink from "@app/components/ProjectLink.svelte"; import ThreadComponent from "@app/components/Thread.svelte"; + import Markdown from "@app/components/Markdown.svelte"; export let authorId: string; export let authorAlias: string | undefined = undefined; @@ -144,17 +145,31 @@ } .commit-event { color: var(--color-foreground-6); - padding: 0.5rem 0.5rem 0.5rem 1rem; + padding: 0.5rem 0.5rem 0.5rem 0.25rem; display: flex; flex-direction: row; align-items: center; justify-content: space-between; + font-family: var(--font-family-monospace); } .commit-event span { display: flex; - gap: 0.5rem; + gap: 0.25rem; align-items: center; } + .commit-pointer { + color: var(--color-foreground-5); + user-select: none; + } + .commit-separator { + width: 0; + height: 1rem; + color: var(--color-foreground-5); + position: relative; + top: -1.15rem; + left: -1.155rem; + user-select: none; + }
@@ -236,49 +251,43 @@ ? "opened this patch" : `updated to ${utils.formatObjectId(element.inner.id)}`} {#if element.inner.description} -
- -
- {:else} -
- - {caption} - -
- {/if} - {#if response?.commits} -
- {#each response.commits as commit} -
- - - - - - - - {utils.formatCommit(commit.id)} - -
- {/each} -
+ {/if} +
+ + {caption} + + {#if response?.commits} +
+ {#each response.commits as commit, i} +
+ + ╰─ + + {i === 0 ? "╎" : "│"} + + + + + + + + {utils.formatCommit(commit.id)} + +
+ {/each} +
+ {/if} +
{#if error}