@@ -400,18 +400,37 @@ const OpeningsPage: NextPage = () => {
400400 />
401401 </ div >
402402
403- { /* Moves Container at the very bottom */ }
404- < div className = "flex h-[25vh ] flex-col overflow-hidden" >
403+ { /* Moves Container with Board Controller */ }
404+ < div className = "flex h-[30vh ] flex-col overflow-hidden" >
405405 { controller . currentDrillGame && (
406- < MovesContainer
407- game = { {
408- id : controller . currentDrillGame . id ,
409- tree : controller . gameTree ,
410- moves : movesForContainer ,
411- } }
412- type = "analysis"
413- showAnnotations = { false }
414- />
406+ < div className = "flex h-full flex-col" >
407+ < div className = "flex-1 overflow-hidden" >
408+ < MovesContainer
409+ game = { {
410+ id : controller . currentDrillGame . id ,
411+ tree : controller . gameTree ,
412+ moves : movesForContainer ,
413+ } }
414+ type = "analysis"
415+ showAnnotations = { false }
416+ />
417+ </ div >
418+ < div className = "border-t border-white/10" >
419+ < BoardController
420+ gameTree = { controller . gameTree }
421+ orientation = { controller . orientation }
422+ setOrientation = { noOpSetOrientation }
423+ currentNode = { controller . currentNode }
424+ plyCount = { controller . plyCount }
425+ goToNode = { controller . goToNode }
426+ goToNextNode = { controller . goToNextNode }
427+ goToPreviousNode = { customGoToPreviousNode }
428+ goToRootNode = { customGoToRootNode }
429+ disableFlip = { true }
430+ disablePrevious = { controller . isAtOpeningEnd }
431+ />
432+ </ div >
433+ </ div >
415434 ) }
416435 </ div >
417436 </ div >
@@ -440,31 +459,34 @@ const OpeningsPage: NextPage = () => {
440459 < PlayerInfo name = { bottomPlayer . name } color = { bottomPlayer . color } />
441460 </ div >
442461
443- { /* Controls under board */ }
444- < div className = "flex w-full flex-col gap-2" >
445- < BoardController
446- gameTree = { controller . gameTree }
447- orientation = { controller . orientation }
448- setOrientation = { noOpSetOrientation }
449- currentNode = { controller . currentNode }
450- plyCount = { controller . plyCount }
451- goToNode = { controller . goToNode }
452- goToNextNode = { controller . goToNextNode }
453- goToPreviousNode = { customGoToPreviousNode }
454- goToRootNode = { customGoToRootNode }
455- disableFlip = { true }
456- disablePrevious = { controller . isAtOpeningEnd }
457- />
458-
459- { /* Drill controls */ }
460- < div className = "flex gap-2" >
461- < button
462- onClick = { handleChangeSelections }
463- className = "flex-1 rounded bg-background-2 py-2 text-sm transition-colors hover:bg-background-3"
464- >
465- Change Selected Openings
466- </ button >
467- { controller . remainingDrills . length > 0 && (
462+ { /* Drill progress with next drill button */ }
463+ { controller . currentDrillGame && controller . currentDrill && (
464+ < div className = "flex w-full items-center gap-3 rounded bg-background-1 p-3" >
465+ < div className = "flex-1" >
466+ < div className = "mb-1 flex justify-between text-xs" >
467+ < span className = "text-secondary" > Move Progress</ span >
468+ < span className = "font-medium text-primary" >
469+ { controller . currentDrillGame . playerMoveCount } /
470+ { controller . currentDrill . targetMoveNumber }
471+ </ span >
472+ </ div >
473+ < div className = "h-2 w-full rounded bg-background-3" >
474+ < div
475+ className = "h-full rounded bg-human-3 transition-all duration-300"
476+ style = { {
477+ width : `${
478+ controller . currentDrill . targetMoveNumber > 0
479+ ? ( controller . currentDrillGame . playerMoveCount /
480+ controller . currentDrill . targetMoveNumber ) *
481+ 100
482+ : 0
483+ } %`,
484+ maxWidth : '100%' ,
485+ } }
486+ />
487+ </ div >
488+ </ div >
489+ { controller . remainingDrills . length > 1 && (
468490 < button
469491 onClick = { controller . moveToNextDrill }
470492 className = "rounded bg-human-4 px-4 py-2 text-sm font-medium transition-colors hover:bg-human-4/80"
@@ -473,18 +495,7 @@ const OpeningsPage: NextPage = () => {
473495 </ button >
474496 ) }
475497 </ div >
476-
477- { /* Current drill progress only */ }
478- { controller . currentDrillGame && controller . currentDrill && (
479- < div className = "rounded bg-background-2 p-2 text-center text-sm" >
480- < span className = "text-secondary" > Progress: </ span >
481- < span className = "font-medium text-primary" >
482- { controller . currentDrillGame . playerMoveCount } /
483- { controller . currentDrill . targetMoveNumber } moves
484- </ span >
485- </ div >
486- ) }
487- </ div >
498+ ) }
488499 </ div >
489500
490501 { /* Right Panel - Analysis */ }
@@ -560,7 +571,7 @@ const OpeningsPage: NextPage = () => {
560571 >
561572 Change Openings
562573 </ button >
563- { controller . remainingDrills . length > 0 && (
574+ { controller . remainingDrills . length > 1 && (
564575 < button
565576 onClick = { controller . moveToNextDrill }
566577 className = "rounded bg-human-4 px-4 py-2 text-sm font-medium"
@@ -621,7 +632,7 @@ const OpeningsPage: NextPage = () => {
621632 performanceData = { controller . currentPerformanceData }
622633 onContinueAnalyzing = { controller . continueAnalyzing }
623634 onNextDrill = { controller . moveToNextDrill }
624- isLastDrill = { controller . remainingDrills . length === 0 }
635+ isLastDrill = { controller . remainingDrills . length <= 1 }
625636 />
626637 ) }
627638 </ AnimatePresence >
@@ -631,7 +642,7 @@ const OpeningsPage: NextPage = () => {
631642 { controller . showFinalModal && (
632643 < FinalCompletionModal
633644 performanceData = { controller . overallPerformanceData }
634- onContinueAnalyzing = { ( ) => controller . setShowFinalModal ( false ) }
645+ onContinueAnalyzing = { controller . continueAnalyzingFromFinal }
635646 onSelectNewOpenings = { ( ) => {
636647 controller . setShowFinalModal ( false )
637648 setShowSelectionModal ( true )
0 commit comments