mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
fix: correct scroll positioning and spinner layout in chat plan area
- Calculate step position relative to scroll container for accurate centering - Add flex-shrink: 0 to spinner to prevent unwanted shrinking - Pass alternateBackground prop to active step spinner
This commit is contained in:
parent
9b40f397c4
commit
13e9030b4b
2 changed files with 4 additions and 2 deletions
|
|
@ -96,7 +96,8 @@
|
|||
const stepElement = stepElements[activeStepIndex];
|
||||
if (!stepElement) return;
|
||||
|
||||
const stepTop = stepElement.offsetTop;
|
||||
// Calculate position relative to the scroll container (wrapperDiv)
|
||||
const stepTop = stepElement.offsetTop - contentDiv.offsetTop;
|
||||
const stepHeight = stepElement.offsetHeight;
|
||||
const wrapperHeight = wrapperDiv.clientHeight;
|
||||
const scrollTo = stepTop - (wrapperHeight / 2) + (stepHeight / 2);
|
||||
|
|
@ -135,7 +136,7 @@
|
|||
{/if}
|
||||
{#if index === activeStepIndex}
|
||||
<div class="chat-plan-step-icon">
|
||||
<Spinner {editModeActive}/>
|
||||
<Spinner {editModeActive} alternateBackground={true}/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if index > activeStepIndex}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
--color: var(--interactive-accent);
|
||||
background: var(--color);
|
||||
background: linear-gradient(
|
||||
|
|
|
|||
Loading…
Reference in a new issue