@@ -145,6 +145,7 @@ const DocsPageContentComponent = ({
145145 const [ publishModalOpen , setPublishModalOpen ] = useState ( false ) ;
146146 const [ publishDocumentId , setPublishDocumentId ] = useState < string > ( '' ) ;
147147 const [ publishDocumentName , setPublishDocumentName ] = useState < string > ( '' ) ;
148+ const [ isMobileProjectInfoOpen , setIsMobileProjectInfoOpen ] = useState ( false ) ;
148149
149150 // Project members state
150151 interface ProjectMember {
@@ -310,14 +311,14 @@ const DocsPageContentComponent = ({
310311
311312 { /* Documents Grid */ }
312313 < div className = "mt-8" >
313- < div className = "flex items-center justify-between mb-6" >
314+ < div className = "flex flex-col sm:flex-row sm: items-center sm: justify-between gap-3 mb-6" >
314315 < h2 className = "text-2xl font-bold text-gray-900" > Documents</ h2 >
315316 < button
316317 onClick = { ( ) => {
317318 // Get project ID from pageToRender (which is a ProcessedProject)
318319 handleCreateDoc ( pageToRender . id , pageToRender . title ) ;
319320 } }
320- className = "flex items-center gap-2 px-4 py-2 bg-[#CC561E] hover:bg-[#B84A17] text-white rounded-md transition-colors text-sm font-medium shadow-sm hover:shadow-md"
321+ className = "w-full sm:w-auto inline- flex items-center justify -center gap-2 px-4 py-2 bg-[#CC561E] hover:bg-[#B84A17] text-white rounded-md transition-colors text-sm font-medium shadow-sm hover:shadow-md"
321322 aria-label = "Create new document"
322323 title = "Create new document"
323324 >
@@ -419,7 +420,7 @@ const DocsPageContentComponent = ({
419420 </ div >
420421 </ DocContent >
421422 { /* Right Sidebar for Project Overview */ }
422- < aside className = "w-64 border-l border-gray-200 bg-gray-50 fixed right-0 top-16 h-[calc(100vh-4rem)] flex flex-col" >
423+ < aside className = "hidden lg:flex w-64 border-l border-gray-200 bg-gray-50 fixed right-0 top-16 h-[calc(100vh-4rem)] flex-col" >
423424 < div className = "p-6 flex-1 overflow-y-auto modern-scrollbar" >
424425 < h2 className = "text-sm font-semibold text-gray-900 mb-6" > Project Info</ h2 >
425426 < div className = "space-y-6" >
@@ -493,6 +494,107 @@ const DocsPageContentComponent = ({
493494 </ button >
494495 </ div >
495496 </ aside >
497+ < button
498+ type = "button"
499+ onClick = { ( ) => setIsMobileProjectInfoOpen ( ( prev ) => ! prev ) }
500+ className = "fixed right-4 bottom-4 z-30 rounded-full border border-gray-200 bg-white p-3 text-gray-700 shadow-md hover:bg-gray-50 lg:hidden"
501+ aria-label = { isMobileProjectInfoOpen ? 'Close project info' : 'Open project info' }
502+ title = { isMobileProjectInfoOpen ? 'Close project info' : 'Open project info' }
503+ >
504+ { isMobileProjectInfoOpen ? (
505+ < svg className = "h-5 w-5" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
506+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M6 18L18 6M6 6l12 12" />
507+ </ svg >
508+ ) : (
509+ < svg className = "h-5 w-5" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
510+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M12 8h.01M11 12h1v4h1m-9-4a8 8 0 1116 0 8 8 0 01-16 0z" />
511+ </ svg >
512+ ) }
513+ </ button >
514+ { isMobileProjectInfoOpen && (
515+ < >
516+ < div
517+ className = "fixed inset-0 z-30 bg-black/40 lg:hidden"
518+ onClick = { ( ) => setIsMobileProjectInfoOpen ( false ) }
519+ aria-hidden
520+ />
521+ < aside className = "fixed right-0 top-0 z-40 flex h-screen w-[82vw] max-w-[320px] flex-col border-l border-gray-200 bg-gray-50 shadow-xl lg:hidden" >
522+ < div className = "p-6 flex-1 overflow-y-auto modern-scrollbar" >
523+ < h2 className = "text-sm font-semibold text-gray-900 mb-6" > Project Info</ h2 >
524+ < div className = "space-y-6" >
525+ < div >
526+ < p className = "text-xs text-gray-500 mb-2 uppercase tracking-wide font-medium" > Members</ p >
527+ { isLoadingMembers ? (
528+ < div className = "text-xs text-gray-500" > Loading...</ div >
529+ ) : projectMembers . length > 0 ? (
530+ < div className = "space-y-2" >
531+ { projectMembers . map ( ( member ) => (
532+ < div key = { member . id } className = "flex items-center gap-2" >
533+ { member . imageUrl ? (
534+ < img
535+ src = { member . imageUrl }
536+ alt = { member . email }
537+ className = "w-6 h-6 rounded-full flex-shrink-0"
538+ />
539+ ) : (
540+ < div className = "w-6 h-6 rounded-full bg-gray-300 flex items-center justify-center flex-shrink-0" >
541+ < span className = "text-[10px] text-gray-600 font-medium" >
542+ { member . email . charAt ( 0 ) . toUpperCase ( ) }
543+ </ span >
544+ </ div >
545+ ) }
546+ < div className = "flex-1 min-w-0" >
547+ < p className = "text-xs text-gray-700 truncate" > { member . email } </ p >
548+ < p className = "text-[10px] text-gray-500 capitalize" > { member . role } </ p >
549+ </ div >
550+ </ div >
551+ ) ) }
552+ </ div >
553+ ) : (
554+ < div className = "text-xs text-gray-500" > No members</ div >
555+ ) }
556+ </ div >
557+ < div >
558+ < p className = "text-xs text-gray-500 mb-2 uppercase tracking-wide font-medium" > Documents</ p >
559+ < p className = "text-2xl font-bold text-gray-900" >
560+ { pageToRender . documents ?. length || 0 }
561+ </ p >
562+ </ div >
563+ { pageToRender . lastUpdated && (
564+ < div >
565+ < p className = "text-xs text-gray-500 mb-2 uppercase tracking-wide font-medium" > Last Updated</ p >
566+ < p className = "text-sm text-gray-700" > { pageToRender . lastUpdated } </ p >
567+ </ div >
568+ ) }
569+ </ div >
570+ </ div >
571+ < div className = "mt-auto p-6 pt-8 border-t border-gray-200 flex-shrink-0 bg-gray-50" >
572+ < button
573+ onClick = { ( ) => {
574+ handleShareProject ( pageToRender . id , pageToRender . title ) ;
575+ setIsMobileProjectInfoOpen ( false ) ;
576+ } }
577+ className = "w-full flex items-center justify-center gap-2 px-4 py-2 bg-[#CC561E] hover:bg-[#B84A17] text-white rounded-md transition-colors text-sm font-medium shadow-sm hover:shadow-md"
578+ >
579+ < svg
580+ className = "w-4 h-4"
581+ fill = "none"
582+ stroke = "currentColor"
583+ viewBox = "0 0 24 24"
584+ >
585+ < path
586+ strokeLinecap = "round"
587+ strokeLinejoin = "round"
588+ strokeWidth = { 2 }
589+ d = "M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"
590+ />
591+ </ svg >
592+ Manage Access
593+ </ button >
594+ </ div >
595+ </ aside >
596+ </ >
597+ ) }
496598 < CreateDocModal />
497599 < ShareModal
498600 isOpen = { shareModalOpen }
0 commit comments