Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: image preview controls not being accessible on mobile (#6401)
Mohammad Kanaanc621d03ae44d
diff --git a/web/src/components/PreviewImageDialog.tsx b/web/src/components/PreviewImageDialog.tsxindex e87a9821b..111d339bf 100644--- a/web/src/components/PreviewImageDialog.tsx+++ b/web/src/components/PreviewImageDialog.tsx@@ -117,7 +117,7 @@ function PreviewImageDialog({ open, onOpenChange, imgUrls = [], items, initialIn><DialogContentshowCloseButton={false}- className="!h-[100vh] !w-[100vw] !max-h-[100vh] !max-w-[100vw] overflow-hidden border-0 bg-black/92 p-0 shadow-none"+ className="!h-dvh !w-[100vw] !max-h-dvh !max-w-[100vw] overflow-hidden border-0 bg-black/92 p-0 shadow-none"><VisuallyHidden><DialogTitle>{currentItem.filename || "Attachment preview"}</DialogTitle>@@ -195,7 +195,7 @@ function PreviewImageDialog({ open, onOpenChange, imgUrls = [], items, initialInsrc={currentItem.sourceUrl}poster={currentItem.posterUrl}className={cn(- "max-h-[calc(100vh-8rem)] max-w-[calc(100vw-1.5rem)] rounded-md object-contain sm:max-h-[calc(100vh-7rem)] sm:max-w-[calc(100vw-8rem)]",+ "max-h-[calc(100dvh-8rem)] max-w-[calc(100vw-1.5rem)] rounded-md object-contain sm:max-h-[calc(100dvh-7rem)] sm:max-w-[calc(100vw-8rem)]",showDetails && "lg:max-w-[calc(100vw-30rem)]",)}controls@@ -211,7 +211,7 @@ function PreviewImageDialog({ open, onOpenChange, imgUrls = [], items, initialInpresentationTimestampUs={currentItem.presentationTimestampUs}badgeClassName="left-3 top-3 sm:left-4 sm:top-4"mediaClassName={cn(- "max-h-[calc(100vh-8rem)] max-w-[calc(100vw-1.5rem)] rounded-md object-contain sm:max-h-[calc(100vh-7rem)] sm:max-w-[calc(100vw-8rem)]",+ "max-h-[calc(100dvh-8rem)] max-w-[calc(100vw-1.5rem)] rounded-md object-contain sm:max-h-[calc(100dvh-7rem)] sm:max-w-[calc(100vw-8rem)]",showDetails && "lg:max-w-[calc(100vw-30rem)]",)}/>@@ -220,7 +220,7 @@ function PreviewImageDialog({ open, onOpenChange, imgUrls = [], items, initialInsrc={currentItem.sourceUrl}alt={`Preview image ${safeIndex + 1} of ${itemCount}`}className={cn(- "max-h-[calc(100vh-8rem)] max-w-[calc(100vw-1.5rem)] rounded-md object-contain select-none sm:max-h-[calc(100vh-7rem)] sm:max-w-[calc(100vw-8rem)]",+ "max-h-[calc(100dvh-8rem)] max-w-[calc(100vw-1.5rem)] rounded-md object-contain select-none sm:max-h-[calc(100dvh-7rem)] sm:max-w-[calc(100vw-8rem)]",showDetails && "lg:max-w-[calc(100vw-30rem)]",)}style={{