From 30d7991d144cfc95699a6d3409b2b4bb82ef2c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 9 May 2024 16:00:27 +0200 Subject: [PATCH] Move Compare tab in Patch view to where revision button is --- src/views/projects/Patch.svelte | 57 +++++++++---------- src/views/projects/Patch/CompareButton.svelte | 17 ++++++ 2 files changed, 43 insertions(+), 31 deletions(-) create mode 100644 src/views/projects/Patch/CompareButton.svelte diff --git a/src/views/projects/Patch.svelte b/src/views/projects/Patch.svelte index b814f1ad5..24523df87 100644 --- a/src/views/projects/Patch.svelte +++ b/src/views/projects/Patch.svelte @@ -66,6 +66,7 @@ import CobHeader from "@app/views/projects/Cob/CobHeader.svelte"; import CobStateButton from "@app/views/projects/Cob/CobStateButton.svelte"; import CommentToggleInput from "@app/components/CommentToggleInput.svelte"; + import CompareButton from "@app/views/projects/Patch/CompareButton.svelte"; import CopyableId from "@app/components/CopyableId.svelte"; import DiffStatBadge from "@app/components/DiffStatBadge.svelte"; import Embeds from "@app/views/projects/Cob/Embeds.svelte"; @@ -688,10 +689,6 @@ gap: 0.5rem; width: 100%; } - .diff-button-range { - font-family: var(--font-family-monospace); - font-weight: var(--font-weight-bold); - } .connector { width: 1px; height: 1.5rem; @@ -898,35 +895,15 @@ {/each} - {#if view.name === "diff"} - - - - {/if} {#if view.name === "changes"} @@ -936,6 +913,17 @@ {/if} + {#if view.name === "diff"} +
+
+ +
+
+ {/if}
@@ -945,12 +933,19 @@ style:padding="0 1rem" style:display="flex" class="global-hide-on-small-desktop-up"> -
- -
+
{/if} {#if view.name === "diff"} +
+ +
+ import Button from "@app/components/Button.svelte"; + import IconSmall from "@app/components/IconSmall.svelte"; + + export let fromCommit: string; + export let toCommit: string; + + +