+
diff --git a/web/src/lib/components/repo/DiffStatPill.svelte b/web/src/lib/components/repo/DiffStatPill.svelte
index 7604defae..0618d8c14 100644
--- a/web/src/lib/components/repo/DiffStatPill.svelte
+++ b/web/src/lib/components/repo/DiffStatPill.svelte
@@ -1,39 +1,59 @@
+
+
{#if stat.insertions > 0 || stat.deletions > 0}
-
- {#if stat.insertions > 0 && stat.deletions > 0}
-
- +{stat.insertions}
-
-
- -{stat.deletions}
-
- {:else if stat.insertions > 0}
-
- +{stat.insertions}
-
- {:else}
-
- -{stat.deletions}
-
- {/if}
+
+
+ +{stat.insertions}
+
+
+ -{stat.deletions}
+
{/if}
diff --git a/web/src/lib/components/repo/DiffTopbar.stories.svelte b/web/src/lib/components/repo/DiffTopbar.stories.svelte
index 4d2176aa8..20ea3335e 100644
--- a/web/src/lib/components/repo/DiffTopbar.stories.svelte
+++ b/web/src/lib/components/repo/DiffTopbar.stories.svelte
@@ -30,17 +30,17 @@
}
}}
play={async ({ canvas }: PlayContext) => {
- await expect(canvas.getByRole("link", { name: ".patch" })).toHaveAttribute(
+ await expect(canvas.getByRole("link", { name: "Download patch" })).toHaveAttribute(
"href",
expect.stringContaining(".patch")
);
- await expect(canvas.getByRole("link", { name: ".diff" })).toHaveAttribute(
+ await expect(canvas.getByRole("link", { name: "Download diff" })).toHaveAttribute(
"href",
expect.stringContaining(".diff")
);
// reloads on purpose, the client router would shadow the endpoint with the
// commit page's [ref] route and 404
- for (const link of canvas.getAllByRole("link", { name: /^\./ })) {
+ for (const link of canvas.getAllByRole("link", { name: /^Download/ })) {
await expect(link).toHaveAttribute("data-sveltekit-reload");
}
}}
@@ -87,7 +87,7 @@
{#snippet center()}
- Round #2
+ Round #2
{/snippet}
{#snippet actions()}
review panel
diff --git a/web/src/lib/components/repo/DiffTopbar.svelte b/web/src/lib/components/repo/DiffTopbar.svelte
index ab9fe461b..9ce7f0ccf 100644
--- a/web/src/lib/components/repo/DiffTopbar.svelte
+++ b/web/src/lib/components/repo/DiffTopbar.svelte
@@ -1,5 +1,4 @@
-
+
{#if treeOpen}