π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Tweaks
Manav Rathi54936303c841
diff --git a/web/apps/photos/src/components/Sidebar/Preferences.tsx b/web/apps/photos/src/components/Sidebar/Preferences.tsxindex 0889af6ecc..5975059af9 100644--- a/web/apps/photos/src/components/Sidebar/Preferences.tsx+++ b/web/apps/photos/src/components/Sidebar/Preferences.tsx@@ -26,10 +26,7 @@ export default function Preferences({ open, onClose, onRootClose }) {const [advancedSettingsView, setAdvancedSettingsView] = useState(false);const [mapSettingsView, setMapSettingsView] = useState(false);- const [mlSearchSettingsView, setMlSearchSettingsView] = useState(false);-- const openMlSearchSettings = () => setMlSearchSettingsView(true);- const closeMlSearchSettings = () => setMlSearchSettingsView(false);+ const [openMLSettings, setOpenMLSettings] = useState(false);const openAdvancedSettings = () => setAdvancedSettingsView(true);const closeAdvancedSettings = () => setAdvancedSettingsView(false);@@ -87,7 +84,7 @@ export default function Preferences({ open, onClose, onRootClose }) {<MenuItemGroup><EnteMenuItemendIcon={<ChevronRight />}- onClick={openMlSearchSettings}+ onClick={() => setOpenMLSettings(true)}label={pt("ML search")}/></MenuItemGroup>@@ -102,8 +99,8 @@ export default function Preferences({ open, onClose, onRootClose }) {</Box></Stack><MLSettings- open={mlSearchSettingsView}- onClose={closeMlSearchSettings}+ open={openMLSettings}+ onClose={() => setOpenMLSettings(false)}onRootClose={handleRootClose}appContext={appContext}/>diff --git a/web/packages/new/photos/components/MLSettings.tsx b/web/packages/new/photos/components/MLSettings.tsxindex 07db162c1a..a74fe48460 100644--- a/web/packages/new/photos/components/MLSettings.tsx+++ b/web/packages/new/photos/components/MLSettings.tsx@@ -28,7 +28,7 @@ import { Trans } from "react-i18next";import type { NewAppContextPhotos } from "../types/context";interface MLSettingsProps {- /** If `true`, then the drawer page is shown. */+ /** If `true`, then this drawer page is shown. */open: boolean;/** Called when the user wants to go back from this drawer page. */onClose: () => void;@@ -53,6 +53,19 @@ export const MLSettings: React.FC<MLSettingsProps> = ({const [enableFaceSearchView, setEnableFaceSearchView] = useState(false);+ const handleRootClose = () => {+ onClose();+ onRootClose();+ };++ const handleDrawerClose: DialogProps["onClose"] = (_, reason) => {+ if (reason === "backdropClick") {+ handleRootClose();+ } else {+ onClose();+ }+ };+const openEnableFaceSearch = () => {setEnableFaceSearchView(true);};@@ -125,19 +138,6 @@ export const MLSettings: React.FC<MLSettingsProps> = ({});};- const handleRootClose = () => {- onClose();- onRootClose();- };-- const handleDrawerClose: DialogProps["onClose"] = (_, reason) => {- if (reason === "backdropClick") {- handleRootClose();- } else {- onClose();- }- };-// TODO-ML:// const [indexingStatus, setIndexingStatus] = useState<CLIPIndexingStatus>({// indexed: 0,