mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-30 08:40:52 +08:00
Add Changes section to Review
This commit is contained in:
@@ -13,13 +13,14 @@
|
||||
import NakedButton from "@app/components/NakedButton.svelte";
|
||||
|
||||
interface Props {
|
||||
rid: string;
|
||||
patchId: string;
|
||||
revision: Revision;
|
||||
rid: string;
|
||||
showCommits?: boolean;
|
||||
}
|
||||
|
||||
/* eslint-disable prefer-const */
|
||||
let { rid, patchId, revision }: Props = $props();
|
||||
let { patchId, revision, rid, showCommits = true }: Props = $props();
|
||||
/* eslint-enable prefer-const */
|
||||
|
||||
let hideChanges = $state(false);
|
||||
@@ -110,33 +111,35 @@
|
||||
</div>
|
||||
|
||||
<div class:hide={hideChanges}>
|
||||
{#await loadCommits(rid, revision.base, revision.head) then commits}
|
||||
<div style:margin-bottom="1rem">
|
||||
<CommitsContainer expanded={filesExpanded}>
|
||||
{#snippet leftHeader()}
|
||||
<div class="txt-semibold">Commits</div>
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
<div style:padding="0 1rem">
|
||||
<div
|
||||
class="global-flex txt-small"
|
||||
style:color="var(--color-foreground-dim)">
|
||||
<Icon name="branch" /><Id id={revision.base} variant="commit" />
|
||||
<div class="global-counter">base</div>
|
||||
{#if showCommits}
|
||||
{#await loadCommits(rid, revision.base, revision.head) then commits}
|
||||
<div style:margin-bottom="1rem">
|
||||
<CommitsContainer expanded={filesExpanded}>
|
||||
{#snippet leftHeader()}
|
||||
<div class="txt-semibold">Commits</div>
|
||||
{/snippet}
|
||||
{#snippet children()}
|
||||
<div style:padding="0 1rem">
|
||||
<div
|
||||
class="global-flex txt-small"
|
||||
style:color="var(--color-foreground-dim)">
|
||||
<Icon name="branch" /><Id id={revision.base} variant="commit" />
|
||||
<div class="global-counter">base</div>
|
||||
</div>
|
||||
<div class="commits">
|
||||
{#each commits.reverse() as commit}
|
||||
<div class="commit" style:position="relative">
|
||||
<div class="commit-dot"></div>
|
||||
<CobCommitTeaser {commit} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<div class="commits">
|
||||
{#each commits.reverse() as commit}
|
||||
<div class="commit" style:position="relative">
|
||||
<div class="commit-dot"></div>
|
||||
<CobCommitTeaser {commit} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/snippet}
|
||||
</CommitsContainer>
|
||||
</div>
|
||||
{/await}
|
||||
{/snippet}
|
||||
</CommitsContainer>
|
||||
</div>
|
||||
{/await}
|
||||
{/if}
|
||||
|
||||
{#await loadHighlightedDiff(rid, revision.base, revision.head)}
|
||||
<span class="txt-small">Loading…</span>
|
||||
|
||||
@@ -18,24 +18,25 @@
|
||||
import { nodeRunning } from "@app/lib/events";
|
||||
|
||||
import Border from "@app/components/Border.svelte";
|
||||
import Changes from "@app/components/Changes.svelte";
|
||||
import CommentComponent from "@app/components/Comment.svelte";
|
||||
import Discussion from "@app/components/Discussion.svelte";
|
||||
import Icon from "@app/components/Icon.svelte";
|
||||
import Id from "@app/components/Id.svelte";
|
||||
import LabelInput from "@app/components/LabelInput.svelte";
|
||||
import NakedButton from "@app/components/NakedButton.svelte";
|
||||
import NodeId from "@app/components/NodeId.svelte";
|
||||
import VerdictBadge from "@app/components/VerdictBadge.svelte";
|
||||
import VerdictButton from "@app/components/VerdictButton.svelte";
|
||||
import VerdictBadge from "./VerdictBadge.svelte";
|
||||
import Discussion from "./Discussion.svelte";
|
||||
|
||||
interface Props {
|
||||
config: Config;
|
||||
onNavigateBack: () => void;
|
||||
patchId: string;
|
||||
reload: (reviewId?: string) => Promise<void>;
|
||||
repo: RepoInfo;
|
||||
review: Review;
|
||||
revision: Revision;
|
||||
repo: RepoInfo;
|
||||
}
|
||||
|
||||
const {
|
||||
@@ -43,9 +44,9 @@
|
||||
onNavigateBack,
|
||||
patchId,
|
||||
reload,
|
||||
repo,
|
||||
review,
|
||||
revision,
|
||||
repo,
|
||||
}: Props = $props();
|
||||
|
||||
const contributors = $derived(
|
||||
@@ -348,4 +349,6 @@
|
||||
{createComment}
|
||||
{editComment}
|
||||
{reactOnComment} />
|
||||
|
||||
<Changes rid={repo.rid} showCommits={false} {patchId} {revision} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user