Skip to content

Commit fcf7641

Browse files
committed
fix: refactor StackDetails to be more simple
1 parent 5e6fe78 commit fcf7641

File tree

1 file changed

+16
-35
lines changed

1 file changed

+16
-35
lines changed

apps/desktop/src/components/v3/StackDetails.svelte

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,8 @@
3939
});
4040
</script>
4141

42-
<div class="stack">
43-
<div
44-
class="stack__wrapper"
45-
bind:this={resizeStackBranches}
46-
style:width={$stackBranchWidth + 'rem'}
47-
>
42+
<div class="wrapper">
43+
<div class="branches" bind:this={resizeStackBranches} style:width={$stackBranchWidth + 'rem'}>
4844
<Resizer
4945
viewport={resizeStackBranches}
5046
direction="right"
@@ -53,40 +49,31 @@
5349
$stackBranchWidth = value / (16 * $userSettings.zoom);
5450
}}
5551
/>
56-
<div
57-
class="stack__branches"
58-
bind:this={resizeStackBranches}
59-
style:width={$stackBranchWidth + 'rem'}
60-
>
61-
<ReduxResult result={result.current}>
62-
{#snippet children(result)}
63-
{#if stackId && result.length > 0}
64-
{#each result as branch, i (branch.name)}
65-
{@const first = i === 0}
66-
{@const last = i === result.length - 1}
67-
<Branch {branch} {first} {last} />
68-
{/each}
69-
{/if}
70-
{/snippet}
71-
</ReduxResult>
72-
</div>
52+
<ReduxResult result={result.current}>
53+
{#snippet children(result)}
54+
{#if stackId && result.length > 0}
55+
{#each result as branch, i (branch.name)}
56+
{@const first = i === 0}
57+
{@const last = i === result.length - 1}
58+
<Branch {branch} {first} {last} />
59+
{/each}
60+
{/if}
61+
{/snippet}
62+
</ReduxResult>
7363
</div>
7464

75-
<div class="stack__branch-content">
76-
<StackContentIllustration mode={stackContentMode} />
77-
</div>
65+
<StackContentIllustration mode={stackContentMode} />
7866
</div>
7967

8068
<style>
81-
.stack__wrapper,
82-
.stack {
69+
.wrapper {
8370
position: relative;
8471
height: 100%;
8572
display: flex;
8673
border-radius: 0 var(--radius-ml) var(--radius-ml);
8774
}
8875
89-
.stack__branches {
76+
.branches {
9077
position: relative;
9178
display: flex;
9279
width: 22.5rem;
@@ -103,10 +90,4 @@
10390
background-size: 6px 6px;
10491
border-right: 1px solid var(--clr-border-2);
10592
}
106-
107-
.stack__branch-content {
108-
display: flex;
109-
flex: 1;
110-
flex-direction: column;
111-
}
11293
</style>

0 commit comments

Comments
 (0)