Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit d1ad694

Browse files
committed
refactor(layout): extract first panel border to SplitPanel component
Made-with: Cursor
1 parent 8edca0e commit d1ad694

5 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/components/draft/draft-recovery-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ export const DraftRecoveryModal = defineComponent({
472472
max={0.4}
473473
class="h-full"
474474
>
475-
<div class="flex h-full flex-col border-r border-neutral-200 dark:border-neutral-800">
475+
<div class="flex h-full flex-col">
476476
{/* Version list header */}
477477
<div class="flex items-center gap-2 border-b border-neutral-200 px-4 py-2.5 dark:border-neutral-800">
478478
<GitCompare class="size-4 text-neutral-500" />

src/components/layout/master-detail-layout.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,7 @@ export const MasterDetailLayout = defineComponent({
7474
max={props.max}
7575
class="h-full"
7676
>
77-
<div
78-
class={[
79-
'h-full overflow-hidden border-r border-neutral-200 dark:border-neutral-800',
80-
props.listBgClass,
81-
]}
82-
>
77+
<div class={['h-full overflow-hidden', props.listBgClass]}>
8378
{slots.list?.()}
8479
</div>
8580
<div

src/components/layout/split-panel-layout.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ export const SplitPanelLayout = defineComponent({
8484
max={props.max}
8585
class="h-full"
8686
>
87-
<div class="h-full overflow-hidden border-r border-neutral-200 dark:border-neutral-800">
88-
{slots.list?.()}
89-
</div>
87+
<div class="h-full overflow-hidden">{slots.list?.()}</div>
9088
<div class="h-full min-w-0 flex-1 overflow-hidden">
9189
{props.showPanel ? slots.panel?.() : slots.empty?.()}
9290
</div>

src/components/layout/split-panel.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,18 @@ export const SplitPanel = defineComponent({
7474
onDragEnd={props.onDragEnd}
7575
>
7676
{{
77-
1: () => renderPanel(panels[0]),
77+
1: () => (
78+
<div
79+
class={[
80+
'h-full overflow-hidden',
81+
props.direction === 'vertical'
82+
? 'border-b border-neutral-200 dark:border-neutral-800'
83+
: 'border-r border-neutral-200 dark:border-neutral-800',
84+
]}
85+
>
86+
{renderPanel(panels[0])}
87+
</div>
88+
),
7889
2: () => renderPanel(panels[1]),
7990
'resize-trigger': () => (
8091
<SplitResizeTrigger triggerClass={props.resizeTriggerClass} />

src/views/drafts/components/draft-detail-base.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ export const DraftDetailBase = defineComponent({
600600
resizeTriggerClass="z-[10]"
601601
class="h-full"
602602
>
603-
<div class="flex h-full flex-col border-r border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900">
603+
<div class="flex h-full flex-col bg-white dark:bg-neutral-900">
604604
{renderVersionList()}
605605
</div>
606606
<div class="flex h-full flex-col bg-neutral-50 dark:bg-neutral-950">

0 commit comments

Comments
 (0)