@@ -138,6 +138,20 @@ function getMobileSectionHintKey(section: SettingsSection) {
138138 }
139139}
140140
141+ const MOBILE_SETTINGS_GROUPS = [
142+ {
143+ titleKey : "settings.mobile_groups.workspace_runtime" ,
144+ sections : [ "general" , "providers" ] ,
145+ } ,
146+ {
147+ titleKey : "settings.mobile_groups.interface_interaction" ,
148+ sections : [ "appearance" , "shortcuts" ] ,
149+ } ,
150+ ] as const satisfies readonly {
151+ titleKey : string ;
152+ sections : readonly SettingsSection [ ] ;
153+ } [ ] ;
154+
141155/**
142156 * Settings Page
143157 *
@@ -449,30 +463,42 @@ export function SettingsPage() {
449463
450464 const renderMobileRoot = ( ) => (
451465 < main className = "settings-content settings-content--mobile-root" >
452- < section className = "settings-mobile-root-hero" >
453- < div className = "settings-mobile-root-hero__eyebrow" > { t ( "settings.title" ) } </ div >
454- < p className = "settings-mobile-root-hero__body" > { t ( "settings.autosave_hint" ) } </ p >
455- </ section >
456- < div className = "settings-mobile-list" >
457- { availableSections . map ( ( { id, labelKey, iconSemantic } ) => (
458- < button
459- key = { id }
460- type = "button"
461- className = "settings-mobile-item"
462- aria-label = { t ( labelKey ) }
463- onClick = { ( ) => setNavigationState ( { kind : "detail" , section : id } ) }
464- >
465- < span className = "settings-mobile-item__icon-shell" aria-hidden = "true" >
466- < span className = "settings-mobile-item__icon" >
467- < ThemedIcon semantic = { iconSemantic } size = { 18 } />
468- </ span >
469- </ span >
470- < span className = "settings-mobile-item__copy" >
471- < span className = "settings-mobile-item__label" > { t ( labelKey ) } </ span >
472- < span className = "settings-mobile-item__hint" > { t ( getMobileSectionHintKey ( id ) ) } </ span >
473- </ span >
474- < ChevronRight size = { 16 } className = "settings-mobile-item__arrow" />
475- </ button >
466+ < div className = "settings-mobile-root" data-testid = "settings-mobile-root" >
467+ { MOBILE_SETTINGS_GROUPS . map ( ( group ) => (
468+ < section key = { group . titleKey } className = "settings-mobile-group" >
469+ < h2 className = "settings-mobile-group__title" > { t ( group . titleKey ) } </ h2 >
470+ < div className = "settings-mobile-group__list" >
471+ { group . sections . map ( ( sectionId ) => {
472+ const section = availableSections . find ( ( entry ) => entry . id === sectionId ) ;
473+ if ( ! section ) {
474+ return null ;
475+ }
476+
477+ return (
478+ < button
479+ key = { section . id }
480+ type = "button"
481+ className = "settings-mobile-item"
482+ aria-label = { t ( section . labelKey ) }
483+ onClick = { ( ) => setNavigationState ( { kind : "detail" , section : section . id } ) }
484+ >
485+ < span className = "settings-mobile-item__icon-shell" aria-hidden = "true" >
486+ < span className = "settings-mobile-item__icon" >
487+ < ThemedIcon semantic = { section . iconSemantic } size = { 18 } />
488+ </ span >
489+ </ span >
490+ < span className = "settings-mobile-item__copy" >
491+ < span className = "settings-mobile-item__label" > { t ( section . labelKey ) } </ span >
492+ < span className = "settings-mobile-item__hint" >
493+ { t ( getMobileSectionHintKey ( section . id ) ) }
494+ </ span >
495+ </ span >
496+ < ChevronRight size = { 16 } className = "settings-mobile-item__arrow" />
497+ </ button >
498+ ) ;
499+ } ) }
500+ </ div >
501+ </ section >
476502 ) ) }
477503 </ div >
478504 </ main >
0 commit comments