@@ -8,7 +8,7 @@ import { getAgentPosition, getFormationBounds, type ConnectorPositions } from ".
88import {
99 COMMANDS , ROLE_SPRITES , ROLE_COLORS ,
1010 MOMENTUM_NAMES , MOMENTUM_COLORS , MOMENTUM_UNLOCKS , TIER_CAPABILITIES ,
11- NODE_SPRITES , seeded ,
11+ NODE_SPRITES , NODE_SIZES , seeded ,
1212} from "./types" ;
1313
1414export interface BottomPanelProps {
@@ -533,25 +533,30 @@ const ConnectorsListView: Component<{
533533 } >
534534 < div class = "colony-card-strip mb-3" >
535535 < For each = { props . nodes } >
536- { ( tree ) => {
537- const spriteClass = NODE_SPRITES [ tree . type ] ?? "sprite-tree-deciduous" ;
536+ { ( node ) => {
537+ const spriteClass = NODE_SPRITES [ node . type ] ?? "sprite-tree-deciduous" ;
538+ const size = NODE_SIZES [ node . type ] ?? { width : 36 , height : 44 } ;
538539 const statusClass = ( ) =>
539- tree . status === "active" ? "is-active" : tree . status === "paused" ? "is-warn" : "" ;
540+ node . status === "active" ? "is-active" : node . status === "paused" ? "is-warn" : "" ;
540541 return (
541- < button
542+ < div
542543 class = { `colony-card ${ statusClass ( ) } ` }
543- onClick = { ( ) => props . onSelect ?.( tree . id ) }
544+ role = "button"
545+ tabindex = "0"
546+ onClick = { ( ) => props . onSelect ?.( node . id ) }
544547 >
545- < div class = { `pixel-sprite ${ spriteClass } ` } style = { { transform : "scale(2)" } } />
548+ < div style = { { width : `${ size . width / 2 } px` , height : "26px" , position : "relative" , "flex-shrink" : "0" } } >
549+ < div class = { `pixel-sprite ${ spriteClass } ` } style = { { transform : "scale(2)" } } />
550+ </ div >
546551 < div class = "colony-text-3xs font-bold text-text-primary truncate w-full" >
547- { tree . label . replace ( "connector-" , "" ) }
552+ { node . label . replace ( "connector-" , "" ) }
548553 </ div >
549554 < div class = { `colony-text-5xs uppercase ${
550- tree . status === "active" ? "text-status-ok" : tree . status === "paused" ? "text-status-warn" : "text-text-dim"
555+ node . status === "active" ? "text-status-ok" : node . status === "paused" ? "text-status-warn" : "text-text-dim"
551556 } `} >
552- { tree . status }
557+ { node . status }
553558 </ div >
554- </ button >
559+ </ div >
555560 ) ;
556561 } }
557562 </ For >
@@ -564,21 +569,26 @@ const ConnectorsListView: Component<{
564569 < div class = "colony-card-strip" >
565570 < For each = { notLoaded ( ) } >
566571 { ( connector ) => {
567- const treeType = [ "conifer" , "deciduous" , "shrub" ] [ seeded ( connector . name + "type" , 0 , 3 ) ] ?? "deciduous" ;
568- const spriteClass = NODE_SPRITES [ treeType as keyof typeof NODE_SPRITES ] ?? "sprite-tree-deciduous" ;
572+ const nodeType = [ "conifer" , "deciduous" , "shrub" ] [ seeded ( connector . name + "type" , 0 , 3 ) ] ?? "deciduous" ;
573+ const spriteClass = NODE_SPRITES [ nodeType as keyof typeof NODE_SPRITES ] ?? "sprite-tree-deciduous" ;
574+ const size = NODE_SIZES [ nodeType ] ?? { width : 36 , height : 44 } ;
569575 return (
570- < button
576+ < div
571577 class = "colony-card is-available"
578+ role = "button"
579+ tabindex = "0"
572580 onClick = { ( ) => props . onSetup ?.( connector . name ) }
573581 >
574- < div class = { `pixel-sprite ${ spriteClass } ` } style = { { transform : "scale(2)" , opacity : 0.5 } } />
582+ < div style = { { width : `${ size . width / 2 } px` , height : "26px" , position : "relative" , "flex-shrink" : "0" } } >
583+ < div class = { `pixel-sprite ${ spriteClass } ` } style = { { transform : "scale(2)" , opacity : 0.5 } } />
584+ </ div >
575585 < div class = "colony-text-3xs text-text-secondary truncate w-full" >
576586 { connector . name . replace ( "connector-" , "" ) }
577587 </ div >
578588 < div class = "colony-text-5xs text-status-ok" >
579589 { connector . requires_config ? "Configure" : "Enable" }
580590 </ div >
581- </ button >
591+ </ div >
582592 ) ;
583593 } }
584594 </ For >
0 commit comments