π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prioritize uploads on public album links
Anand Baburajand40a41e2ce53
diff --git a/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsx b/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsxindex 4cb0fd7233..8e6e0aba3a 100644--- a/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsx+++ b/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsx@@ -28,8 +28,6 @@ export const MobileNavBar: React.FC<MobileNavBarProps> = ({enableDownload,onShowFeed,collectionTitle,- enableJoin,- onJoinAlbum,}) => {const iconStrokeWidth = 1.8;const [showCopiedMessage, setShowCopiedMessage] = useState(false);@@ -92,15 +90,9 @@ export const MobileNavBar: React.FC<MobileNavBarProps> = ({)}<MobileSignUpButton- onClick={() => {- if (enableJoin) {- onJoinAlbum?.();- } else {- window.location.href = getEnteURL();- }- }}+ onClick={() => (window.location.href = getEnteURL())}>- {enableJoin ? t("join_album") : t("get_ente_photos")}+ {t("join_ente")}</MobileSignUpButton></ButtonGroup></MobileNavContainer>diff --git a/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsx b/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsxindex 5441c83923..7be2e6f73e 100644--- a/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsx+++ b/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsx@@ -25,8 +25,6 @@ export const TopNavButtons: React.FC<TopNavButtonsProps> = ({downloadAllFiles,enableDownload,onShowFeed,- enableJoin,- onJoinAlbum,}) => {const iconStrokeWidth = 1.8;const [showCopiedMessage, setShowCopiedMessage] = useState(false);@@ -68,15 +66,9 @@ export const TopNavButtons: React.FC<TopNavButtonsProps> = ({)}<SignUpButton- onClick={() => {- if (enableJoin) {- onJoinAlbum?.();- } else {- window.location.href = getEnteURL();- }- }}+ onClick={() => (window.location.href = getEnteURL())}>- {enableJoin ? t("join_album") : t("get_ente_photos")}+ {t("join_ente")}</SignUpButton></ButtonContainer>diff --git a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsxindex 0d87f7b8a1..f334a6c42d 100644--- a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx+++ b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx@@ -52,6 +52,7 @@ import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton"import { NavbarBase } from "ente-base/components/Navbar";import { useModalVisibility } from "ente-base/components/utils/modal";import { useBaseContext } from "ente-base/context";+import { isDevBuild } from "ente-base/env";import {isHTTP401Error,isHTTPErrorWithStatus,@@ -623,7 +624,7 @@ export default function PublicAlbumPage() {const commentsEnabled =publicCollection?.publicURLs[0]?.enableComment ?? false;const joinEnabled =- !isCustomAPIOrigin &&+ (isDevBuild || !isCustomAPIOrigin) &&(publicCollection?.publicURLs[0]?.enableJoin ?? false);const handleDrop = useCallback((files: FileWithPath[]) => {setShouldRenderUpload(true);@@ -799,6 +800,8 @@ export default function PublicAlbumPage() {</EnteLogoLink><Stack direction="row" spacing={2}><SecondaryActionButton+ onAddPhotos={onAddPhotos}+ addPhotosDisabled={isUploadInProgress}enableJoin={joinEnabled}onJoinAlbum={handleJoinAlbum}/>@@ -1042,20 +1045,37 @@ const PrimaryActionButton: React.FC = () => {return (<GreenButton color="accent" onClick={handleGetEnte}>- {t("get_ente_photos")}+ {t("join_ente")}</GreenButton>);};interface SecondaryActionButtonProps {+ onAddPhotos?: () => void;+ addPhotosDisabled?: boolean;enableJoin?: boolean;onJoinAlbum?: () => void;}const SecondaryActionButton: React.FC<SecondaryActionButtonProps> = ({+ onAddPhotos,+ addPhotosDisabled,enableJoin,onJoinAlbum,}) => {+ if (onAddPhotos) {+ return (+ <FocusVisibleButton+ color="secondary"+ sx={navbarActionButtonSx}+ onClick={onAddPhotos}+ disabled={addPhotosDisabled}+ >+ {t("upload")}+ </FocusVisibleButton>+ );+ }+if (enableJoin) {return (<FocusVisibleButtondiff --git a/web/apps/albums/src/public-album/viewer/components/PublicAlbumSingleFileViewer.tsx b/web/apps/albums/src/public-album/viewer/components/PublicAlbumSingleFileViewer.tsxindex 9498a5eac1..801c7ab7e3 100644--- a/web/apps/albums/src/public-album/viewer/components/PublicAlbumSingleFileViewer.tsx+++ b/web/apps/albums/src/public-album/viewer/components/PublicAlbumSingleFileViewer.tsx@@ -728,7 +728,7 @@ export const PublicAlbumSingleFileViewer: React.FC<},}}>- {t("get_ente_photos")}+ {t("join_ente")}</Button><IconButtononClick={(event) =>diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.jsonindex 78556034f0..1b3a68b2e9 100644--- a/web/packages/base/locales/en-US/translation.json+++ b/web/packages/base/locales/en-US/translation.json@@ -9,6 +9,7 @@"login_to_join_album": "Login to join album","sign_up": "Signup","get_ente_photos": "Get Ente Photos",+ "join_ente": "Join Ente","signup_to_join_album": "Signup to join album","new_to_ente": "New to Ente","existing_user": "Existing user",