π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
minor-ux-updations
Aswin Asok8b5df486c198
diff --git a/web/apps/memories/src/components/LaneMemoryViewer.tsx b/web/apps/memories/src/components/LaneMemoryViewer.tsxindex 827635448f..8ee918cc0e 100644--- a/web/apps/memories/src/components/LaneMemoryViewer.tsx+++ b/web/apps/memories/src/components/LaneMemoryViewer.tsx@@ -4,7 +4,7 @@* playback timing, scrubbing, captions, and decorative backgrounds. It is* rendered by `pages/index.tsx` for the `"lane"` variant.*/-import { styled, Typography } from "@mui/material";+import { styled } from "@mui/material";import log from "ente-base/log";import { downloadManager } from "ente-gallery/services/download";import { FileType } from "ente-media/file-type";@@ -588,6 +588,17 @@ export function LaneMemoryViewer({[memoryMetadata?.personName, memoryName],);+ const laneTitleLines = useMemo(() => {+ const memoryLaneMatch = /^(.*?)(?:\s+)?memory lane$/i.exec(laneTitle);+ const primaryLine = memoryLaneMatch?.[1]?.trim();++ if (primaryLine) {+ return { primary: primaryLine, secondary: "memory lane" };+ }++ return { primary: laneTitle, secondary: undefined };+ }, [laneTitle]);+const laneSlices = useMemo(() => getLaneStackSlices(files.length, stackProgress),[files.length, stackProgress],@@ -687,8 +698,19 @@ export function LaneMemoryViewer({<LaneCenterSection><LaneMediaSection>- <LaneSliderTitle variant="h6">- {laneTitle}+ <LaneSliderTitle+ role="heading"+ aria-level={2}+ aria-label={laneTitle}+ >+ <LaneSliderTitlePrimary>+ {laneTitleLines.primary}+ </LaneSliderTitlePrimary>+ {laneTitleLines.secondary && (+ <LaneSliderTitleSecondary>+ {laneTitleLines.secondary}+ </LaneSliderTitleSecondary>+ )}</LaneSliderTitle><PhotoContainerstyle={{ flex: "0 0 auto", minHeight: "auto" }}@@ -1170,27 +1192,53 @@ const laneHeaderJoinNowButtonSx = {},} as const;-const LaneSliderTitle = styled(Typography)({- color: "rgba(255, 255, 255, 0.42)",- fontWeight: 600,- fontSize: "24px",- lineHeight: 1.15,- letterSpacing: "-0.01em",+const LaneSliderTitle = styled("div")({+ display: "flex",+ flexDirection: "column",+ alignItems: "center",+ gap: "4px",textAlign: "center",- paddingBottom: "10px",+ paddingBottom: "12px",whiteSpace: "normal",overflowWrap: "anywhere",- maxWidth: "min(42vw, 420px)",+ maxWidth: "min(52vw, 520px)",+ textShadow: "0 12px 28px rgba(0, 0, 0, 0.32)","@media (max-width: 900px)": {- fontSize: "21px",+ gap: "3px",+ paddingBottom: "10px",+ maxWidth: "min(64vw, 420px)",+ },+ [`@media (max-width: ${MOBILE_LAYOUT_BREAKPOINT_PX}px)`]: {+ gap: "2px",paddingBottom: "8px",- maxWidth: "min(56vw, 360px)",+ maxWidth: "min(100%, 320px)",},+});++const LaneSliderTitlePrimary = styled("span")({+ color: "rgba(255, 255, 255, 0.82)",+ fontWeight: 600,+ fontSize: "44px",+ lineHeight: 0.98,+ letterSpacing: "-0.04em",+ "@media (max-width: 900px)": { fontSize: "37px" },[`@media (max-width: ${MOBILE_LAYOUT_BREAKPOINT_PX}px)`]: {- fontSize: "18px",- lineHeight: 1.2,- paddingBottom: "6px",- maxWidth: "min(100%, 280px)",+ fontSize: "31px",+ lineHeight: 1,+ },+});++const LaneSliderTitleSecondary = styled("span")({+ color: "rgba(255, 255, 255, 0.5)",+ fontWeight: 500,+ fontSize: "29px",+ lineHeight: 1.02,+ letterSpacing: "-0.02em",+ textTransform: "lowercase",+ "@media (max-width: 900px)": { fontSize: "25px" },+ [`@media (max-width: ${MOBILE_LAYOUT_BREAKPOINT_PX}px)`]: {+ fontSize: "21px",+ lineHeight: 1.08,},});diff --git a/web/apps/memories/src/components/PublicMemoryControls.tsx b/web/apps/memories/src/components/PublicMemoryControls.tsxindex 0c490fbd1d..16e394d8d2 100644--- a/web/apps/memories/src/components/PublicMemoryControls.tsx+++ b/web/apps/memories/src/components/PublicMemoryControls.tsx@@ -49,6 +49,8 @@ const LaneProgressTrack = styled("div")({borderRadius: "999px",backgroundColor: "rgba(193, 246, 235, 0.32)",cursor: "pointer",+ touchAction: "none",+ WebkitTapHighlightColor: "transparent","@media (max-width: 900px)": { maxWidth: "320px" },[`@media (max-width: ${MOBILE_LAYOUT_BREAKPOINT_PX}px)`]: {maxWidth: "min(calc(100vw - 48px), 304px)",@@ -263,6 +265,9 @@ export const LaneProgressSlider: React.FC<LaneProgressSliderProps> = ({if (event.pointerType === "mouse" && event.button !== 0) {return;}+ if (event.pointerType !== "mouse") {+ event.preventDefault();+ }const value = getScrubValue(event);draggingPointerIdRef.current = event.pointerId;event.currentTarget.setPointerCapture(event.pointerId);@@ -284,6 +289,9 @@ export const LaneProgressSlider: React.FC<LaneProgressSliderProps> = ({}event.stopPropagation();+ if (event.pointerType !== "mouse") {+ event.preventDefault();+ }lastScrubValueRef.current = value;draggingPointerIdRef.current = null;@@ -315,6 +323,9 @@ export const LaneProgressSlider: React.FC<LaneProgressSliderProps> = ({}event.stopPropagation();+ if (event.pointerType !== "mouse") {+ event.preventDefault();+ }lastScrubValueRef.current = value;onScrub?.(value);},diff --git a/web/apps/memories/src/components/PublicMemoryMedia.tsx b/web/apps/memories/src/components/PublicMemoryMedia.tsxindex 8758c961df..cd514cdd5e 100644--- a/web/apps/memories/src/components/PublicMemoryMedia.tsx+++ b/web/apps/memories/src/components/PublicMemoryMedia.tsx@@ -251,13 +251,13 @@ export function PhotoImage({return;}- const loadState = { cancelled: false };+ let cancelled = false;const loadFullImage = async () => {try {const sourceURLs =await downloadManager.renderableSourceURLs(file);- if (loadState.cancelled) {+ if (cancelled) {return;}if (sourceURLs.type === "video") {@@ -265,18 +265,20 @@ export function PhotoImage({return;}- const nextFullImageURL =- sourceURLs.type === "livePhoto"- ? await sourceURLs.imageURL()- : sourceURLs.imageURL;- if (loadState.cancelled) {- return;+ let nextFullImageURL: string;+ if (sourceURLs.type === "livePhoto") {+ nextFullImageURL = await sourceURLs.imageURL();+ if (cancelled) {+ return;+ }+ } else {+ nextFullImageURL = sourceURLs.imageURL;}setFullImageURL(nextFullImageURL);} catch (error) {log.error("Failed to load full image", error);- if (!loadState.cancelled) {+ if (!cancelled) {signalReady();}}@@ -285,7 +287,7 @@ export function PhotoImage({void loadFullImage();return () => {- loadState.cancelled = true;+ cancelled = true;};}, [enableFullLoad, file, signalReady, thumbnailOnly]);