π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline
Manav Rathi73e0a1dec2fc
diff --git a/web/apps/photos/src/components/CaptionedText.tsx b/web/apps/photos/src/components/CaptionedText.tsxdeleted file mode 100644index 5cc07a88e2..0000000000--- a/web/apps/photos/src/components/CaptionedText.tsx+++ /dev/null@@ -1,44 +0,0 @@-import { VerticallyCenteredFlex } from "@ente/shared/components/Container";-import { Typography, type ButtonProps } from "@mui/material";--interface Iprops {- mainText: string;- subText?: string;- subIcon?: React.ReactNode;- color?: ButtonProps["color"];-}--const getSubTextColor = (color: ButtonProps["color"]) => {- switch (color) {- case "critical":- return "critical.main";- default:- return "text.faint";- }-};--export const CaptionedText = (props: Iprops) => {- return (- <VerticallyCenteredFlex gap={"4px"}>- <Typography> {props.mainText}</Typography>- <Typography variant="small" color={getSubTextColor(props.color)}>- {"β’"}- </Typography>- {props.subText ? (- <Typography- variant="small"- color={getSubTextColor(props.color)}- >- {props.subText}- </Typography>- ) : (- <Typography- variant="small"- color={getSubTextColor(props.color)}- >- {props.subIcon}- </Typography>- )}- </VerticallyCenteredFlex>- );-};diff --git a/web/packages/shared/components/CaptionedText.tsx b/web/packages/shared/components/CaptionedText.tsxdeleted file mode 100644index 5cc07a88e2..0000000000--- a/web/packages/shared/components/CaptionedText.tsx+++ /dev/null@@ -1,44 +0,0 @@-import { VerticallyCenteredFlex } from "@ente/shared/components/Container";-import { Typography, type ButtonProps } from "@mui/material";--interface Iprops {- mainText: string;- subText?: string;- subIcon?: React.ReactNode;- color?: ButtonProps["color"];-}--const getSubTextColor = (color: ButtonProps["color"]) => {- switch (color) {- case "critical":- return "critical.main";- default:- return "text.faint";- }-};--export const CaptionedText = (props: Iprops) => {- return (- <VerticallyCenteredFlex gap={"4px"}>- <Typography> {props.mainText}</Typography>- <Typography variant="small" color={getSubTextColor(props.color)}>- {"β’"}- </Typography>- {props.subText ? (- <Typography- variant="small"- color={getSubTextColor(props.color)}- >- {props.subText}- </Typography>- ) : (- <Typography- variant="small"- color={getSubTextColor(props.color)}- >- {props.subIcon}- </Typography>- )}- </VerticallyCenteredFlex>- );-};diff --git a/web/packages/shared/components/Menu/EnteMenuItem.tsx b/web/packages/shared/components/Menu/EnteMenuItem.tsxindex 8d0c3eb388..f3c15c24f9 100644--- a/web/packages/shared/components/Menu/EnteMenuItem.tsx+++ b/web/packages/shared/components/Menu/EnteMenuItem.tsx@@ -1,5 +1,4 @@import { EnteSwitch } from "@/base/components/EnteSwitch";-import { CaptionedText } from "@ente/shared/components/CaptionedText";import {SpaceBetweenFlex,VerticallyCenteredFlex,@@ -124,3 +123,45 @@ export const EnteMenuItem: React.FC<EnteMenuItemProps> = ({</MenuItem>);};++interface CaptionedTextProps {+ mainText: string;+ subText?: string;+ subIcon?: React.ReactNode;+ color?: ButtonProps["color"];+}++const CaptionedText = (props: CaptionedTextProps) => {+ return (+ <VerticallyCenteredFlex gap={"4px"}>+ <Typography> {props.mainText}</Typography>+ <Typography variant="small" color={getSubTextColor(props.color)}>+ {"β’"}+ </Typography>+ {props.subText ? (+ <Typography+ variant="small"+ color={getSubTextColor(props.color)}+ >+ {props.subText}+ </Typography>+ ) : (+ <Typography+ variant="small"+ color={getSubTextColor(props.color)}+ >+ {props.subIcon}+ </Typography>+ )}+ </VerticallyCenteredFlex>+ );+};++const getSubTextColor = (color: ButtonProps["color"]) => {+ switch (color) {+ case "critical":+ return "critical.main";+ default:+ return "text.faint";+ }+};