π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fin apps/accounts
Manav Rathi79eb912a420d
diff --git a/web/apps/accounts/src/pages/_app.tsx b/web/apps/accounts/src/pages/_app.tsxindex 36bbcd39ab..49e9739ea1 100644--- a/web/apps/accounts/src/pages/_app.tsx+++ b/web/apps/accounts/src/pages/_app.tsx@@ -3,7 +3,7 @@ import { CustomHead } from "@/base/components/Head";import { AttributedMiniDialog } from "@/base/components/MiniDialog";import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";import { AppNavbar } from "@/base/components/Navbar";-import { useAttributedMiniDialog } from "@/base/hooks/use-mini-dialog";+import { useAttributedMiniDialog } from "@/base/components/utils/mini-dialog";import { setupI18n } from "@/base/i18n";import { disableDiskLogs } from "@/base/log";import { logUnhandledErrorsAndRejections } from "@/base/log-web";diff --git a/web/apps/accounts/src/pages/passkeys/index.tsx b/web/apps/accounts/src/pages/passkeys/index.tsxindex c909602910..3b6f6af2d2 100644--- a/web/apps/accounts/src/pages/passkeys/index.tsx+++ b/web/apps/accounts/src/pages/passkeys/index.tsx@@ -1,6 +1,7 @@import { EnteDrawer } from "@/base/components/EnteDrawer";import { MenuItemDivider, MenuItemGroup } from "@/base/components/Menu";import { Titlebar } from "@/base/components/Titlebar";+import { mdErrorAttributes } from "@/base/components/utils/mini-dialog";import log from "@/base/log";import { ensure } from "@/utils/ensure";import { CenteredFlex } from "@ente/shared/components/Container";@@ -44,11 +45,7 @@ const Page: React.FC = () => {>();const showPasskeyFetchFailedErrorDialog = useCallback(() => {- showMiniDialog({- title: t("error"),- message: t("passkey_fetch_failed"),- cancel: false,- });+ showMiniDialog(mdErrorAttributes(t("passkey_fetch_failed")));}, [showMiniDialog]);useEffect(() => {@@ -263,11 +260,12 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({passkey,onUpdateOrDeletePasskey,}) => {- const { setDialogBoxAttributesV2 } = useAppContext();+ const { showMiniDialog } = useAppContext();const [showRenameDialog, setShowRenameDialog] = useState(false);const showDeleteConfirmationDialog = useCallback(() => {+ /* mark: uses-loading */const handleDelete = async (setLoading: (value: boolean) => void) => {setLoading(true);try {@@ -280,17 +278,16 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({}};- setDialogBoxAttributesV2({+ showMiniDialog({title: t("delete_passkey"),message: t("delete_passkey_confirmation"),- proceed: {+ continue: {text: t("delete"),+ color: "critical",action: handleDelete,- variant: "critical",},- close: { text: t("cancel") },});- }, [token, passkey, onUpdateOrDeletePasskey, setDialogBoxAttributesV2]);+ }, [showMiniDialog, token, passkey, onUpdateOrDeletePasskey]);return (<>diff --git a/web/packages/base/components/utils/use-mini-dialog.tsx b/web/packages/base/components/utils/mini-dialog.tsxsimilarity index 98%rename from web/packages/base/components/utils/use-mini-dialog.tsxrename to web/packages/base/components/utils/mini-dialog.tsxindex cad7a557f2..0b81aea53b 100644--- a/web/packages/base/components/utils/use-mini-dialog.tsx+++ b/web/packages/base/components/utils/mini-dialog.tsx@@ -43,7 +43,7 @@ export const useAttributedMiniDialog = () => {** - Otherwise it sets a default title and use the only argument as the message.*/-export const errorAttributes = (+export const mdErrorAttributes = (messageOrTitle: string,optionalMessage?: string,): MiniDialogAttributes => {