Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use primary guest CTA when join is disabled

Anand Baburajan5309bc90fa3e
diff --git a/web/packages/gallery/components/viewer/PublicCommentModal.tsx b/web/packages/gallery/components/viewer/PublicCommentModal.tsx
index b1c13cfbf2..b3590af12b 100644
--- a/web/packages/gallery/components/viewer/PublicCommentModal.tsx
+++ b/web/packages/gallery/components/viewer/PublicCommentModal.tsx
@@ -141,13 +141,23 @@ export const PublicCommentModal: React.FC<PublicCommentModalProps> = ({
</TitleSection>
<ButtonsSection sx={!enableJoin ? { mt: 4 } : undefined}>
- <AnonymousButton
- variant="outlined"
- fullWidth
- onClick={onCommentAnonymously}
- >
- {t("comment_anonymously")}
- </AnonymousButton>
+ {enableJoin ? (
+ <AnonymousButton
+ variant="outlined"
+ fullWidth
+ onClick={onCommentAnonymously}
+ >
+ {t("comment_anonymously")}
+ </AnonymousButton>
+ ) : (
+ <SignInButton
+ variant="contained"
+ fullWidth
+ onClick={onCommentAnonymously}
+ >
+ {t("comment_anonymously")}
+ </SignInButton>
+ )}
{enableJoin && (
<SignInButton
variant="contained"
diff --git a/web/packages/gallery/components/viewer/PublicLikeModal.tsx b/web/packages/gallery/components/viewer/PublicLikeModal.tsx
index 3b71baf58c..9ac5430118 100644
--- a/web/packages/gallery/components/viewer/PublicLikeModal.tsx
+++ b/web/packages/gallery/components/viewer/PublicLikeModal.tsx
@@ -129,13 +129,23 @@ export const PublicLikeModal: React.FC<PublicLikeModalProps> = ({
</TitleSection>
<ButtonsSection sx={!enableJoin ? { mt: 4 } : undefined}>
- <AnonymousButton
- variant="outlined"
- fullWidth
- onClick={onLikeAnonymously}
- >
- {t("like_anonymously")}
- </AnonymousButton>
+ {enableJoin ? (
+ <AnonymousButton
+ variant="outlined"
+ fullWidth
+ onClick={onLikeAnonymously}
+ >
+ {t("like_anonymously")}
+ </AnonymousButton>
+ ) : (
+ <SignInButton
+ variant="contained"
+ fullWidth
+ onClick={onLikeAnonymously}
+ >
+ {t("like_anonymously")}
+ </SignInButton>
+ )}
{enableJoin && (
<SignInButton
variant="contained"