π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[web] Centralize notification timeout defaults
AswinAsokaf412347262d
diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsxindex 66a8fbc4db..4caa47ee35 100644--- a/web/apps/photos/src/pages/_app.tsx+++ b/web/apps/photos/src/pages/_app.tsx@@ -179,12 +179,7 @@ const App: React.FC<PhotosAppProps> = ({ Component, pageProps }) => {<ThemedLoadingBar ref={loadingBarRef} /><AttributedMiniDialog {...miniDialogProps} appearance="centered" />- <Notification- {...notificationProps}- autoHideDuration={- notificationProps.attributes?.onClick ? null : undefined- }- />+ <Notification {...notificationProps} />{isDesktop && (<WindowTitlebar {...{ isFileViewerOpen }}>diff --git a/web/packages/base/components/Notification.tsx b/web/packages/base/components/Notification.tsxindex d443130ab2..f3b6823236 100644--- a/web/packages/base/components/Notification.tsx+++ b/web/packages/base/components/Notification.tsx@@ -61,7 +61,7 @@ export const Notification: React.FC<NotificationProps> = ({open,onClose,horizontal = "right",- autoHideDuration = 3000,+ autoHideDuration,sx,attributes,keepOpenOnClick,@@ -79,6 +79,12 @@ export const Notification: React.FC<NotificationProps> = ({onClick,onEndIconClick,} = attributes;+ const resolvedAutoHideDuration =+ autoHideDuration === undefined+ ? onClick+ ? null+ : 3000+ : autoHideDuration;const neutral = !color || color === "inherit";const buttonSx = {...actionButtonSx,@@ -157,7 +163,7 @@ export const Notification: React.FC<NotificationProps> = ({return (<Snackbaropen={open}- autoHideDuration={autoHideDuration}+ autoHideDuration={resolvedAutoHideDuration}onClose={(_, reason) => {if (reason === "timeout") onClose();}}