a tool for shared writing and social publishing

fixed sidebar rendered even in read only mode on leaflet

+23 -28
+10 -13
app/[leaflet_id]/Sidebar.tsx
··· 27 27 > 28 28 <Media 29 29 mobile={false} 30 - className="sidebarContainer relative flex flex-col justify-end h-full w-16 bg-bg-page/50 border-bg-page" 30 + className="sidebarContainer relative flex flex-col justify-end h-full w-16" 31 31 > 32 - <Sidebar> 33 - {entity_set.permissions.write ? ( 34 - pub?.publications ? ( 32 + {entity_set.permissions.write && ( 33 + <Sidebar> 34 + {pub?.publications ? ( 35 35 <> 36 36 <PublishButton /> 37 37 <ShareOptions /> ··· 47 47 <hr className="text-border" /> 48 48 <HomeButton /> 49 49 </> 50 - ) 51 - ) : ( 52 - <div> 53 - <HomeButton /> 54 - </div> 55 - )} 56 - </Sidebar> 57 - <div className="h-full pointer-events-none" /> 58 - <Watermark /> 50 + )} 51 + </Sidebar> 52 + )} 53 + <div className="h-full flex items-end"> 54 + <Watermark /> 55 + </div> 59 56 </Media> 60 57 </div> 61 58 );
+13 -15
components/HomeButton.tsx
··· 15 15 let { permissions } = useEntitySetContext(); 16 16 let searchParams = useSearchParams(); 17 17 18 - if (permissions.write) 19 - return ( 20 - <> 21 - <Link 22 - href="/home" 23 - prefetch 24 - className="hover:no-underline" 25 - style={{ textDecorationLine: "none !important" }} 26 - > 27 - <ActionButton icon={<HomeSmall />} label="Go Home" /> 28 - </Link> 29 - {<AddToHomeButton />} 30 - </> 31 - ); 32 - return null; 18 + return ( 19 + <> 20 + <Link 21 + href="/home" 22 + prefetch 23 + className="hover:no-underline" 24 + style={{ textDecorationLine: "none !important" }} 25 + > 26 + <ActionButton icon={<HomeSmall />} label="Go Home" /> 27 + </Link> 28 + {<AddToHomeButton />} 29 + </> 30 + ); 33 31 } 34 32 35 33 const AddToHomeButton = (props: {}) => {