From db309df7010349587a009e29dccedd75d4031321 Mon Sep 17 00:00:00 2001 From: Pavel Laptev Date: Tue, 23 Jan 2024 16:38:46 +0100 Subject: [PATCH] lane style updates --- .../src/routes/[projectId]/board/Board.svelte | 3 +- .../[projectId]/components/BranchCard.svelte | 261 ++++++++++-------- .../components/BranchHeader.svelte | 4 +- .../[projectId]/components/BranchLane.svelte | 38 +-- .../[projectId]/components/FileCard.svelte | 225 +++++++-------- 5 files changed, 278 insertions(+), 253 deletions(-) diff --git a/gitbutler-ui/src/routes/[projectId]/board/Board.svelte b/gitbutler-ui/src/routes/[projectId]/board/Board.svelte index 5ba7c29b6..36f9aa17b 100644 --- a/gitbutler-ui/src/routes/[projectId]/board/Board.svelte +++ b/gitbutler-ui/src/routes/[projectId]/board/Board.svelte @@ -205,9 +205,10 @@ flex-shrink: 1; align-items: flex-start; height: 100%; - padding: 0 var(--space-8); + /* padding: 0 var(--space-8); */ user-select: none; } + .loading { display: flex; justify-content: center; diff --git a/gitbutler-ui/src/routes/[projectId]/components/BranchCard.svelte b/gitbutler-ui/src/routes/[projectId]/components/BranchCard.svelte index d704f5498..9af19e763 100644 --- a/gitbutler-ui/src/routes/[projectId]/components/BranchCard.svelte +++ b/gitbutler-ui/src/routes/[projectId]/components/BranchCard.svelte @@ -142,143 +142,164 @@ } -
- -
- { - if (e.detail == 'generate-branch-name') { - generateBranchName(); - } - }} - /> - +
+
+ { + if (e.detail == 'generate-branch-name') { + generateBranchName(); + } + }} + /> + + + + +
- -
- - - {#if branch.files?.length > 0} -
- 0} +
+ + {#if branch.active} + { + if (e.detail == 'generate-branch-name') { + generateBranchName(); + } + }} /> - {#if branch.active} - { - if (e.detail == 'generate-branch-name') { - generateBranchName(); - } + {/if} +
+ {:else if branch.commits.length == 0} +
+
+
+ - {/if} -
- {:else if branch.commits.length == 0} -
-
-
- -
-

- This is a new branch. -

-

- You can drag and drop files or parts of files here. -

+

This is a new branch.

+

+ You can drag and drop files or parts of files here. +

- {:else} - -
-
-
- -
-

- No uncommitted changes
on this branch -

+
+ {:else} + +
+
+
+
+

+ No uncommitted changes
on this branch +

- {/if} -
- +
+ {/if}
- + - 0} - minWidth={320} - on:width={(e) => { - laneWidth = e.detail / (16 * $userSettings.zoom); - lscache.set(laneWidthKey + branch.id, laneWidth, 7 * 1440); // 7 day ttl - $defaultBranchWidthRem = laneWidth; - }} - /> + 0} + minWidth={320} + on:width={(e) => { + laneWidth = e.detail / (16 * $userSettings.zoom); + lscache.set(laneWidthKey + branch.id, laneWidth, 7 * 1440); // 7 day ttl + $defaultBranchWidthRem = laneWidth; + }} + /> +
+ +