Skip to content

armgit / ente

Public Imported from GitHub
0

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

Swap

Manav Rathi6fe62336642f
diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
index ba5cc736b7..c10f02e1d4 100644
--- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
+++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx
@@ -1,5 +1,6 @@
import { TitledMiniDialog } from "@/base/components/MiniDialog";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import log from "@/base/log";
import type { Collection } from "@/media/collection";
import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot";
@@ -13,7 +14,7 @@ import { loadCast } from "@/new/photos/utils/chromecast-sender";
import SingleInputForm, {
type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm";
-import { Button, Link, Stack, Typography } from "@mui/material";
+import { Link, Stack, Typography } from "@mui/material";
import { t } from "i18next";
import { useEffect, useState } from "react";
import { Trans } from "react-i18next";
@@ -143,18 +144,18 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
{t("cast_auto_pair_description")}
</Typography>
- <Button onClick={() => setView("auto")}>
+ <FocusVisibleButton onClick={() => setView("auto")}>
{t("cast_auto_pair")}
- </Button>
+ </FocusVisibleButton>
</Stack>
)}
<Stack sx={{ gap: 2 }}>
<Typography sx={{ color: "text.muted" }}>
{t("pair_with_pin_description")}
</Typography>
- <Button onClick={() => setView("pin")}>
+ <FocusVisibleButton onClick={() => setView("pin")}>
{t("pair_with_pin")}
- </Button>
+ </FocusVisibleButton>
</Stack>
</Stack>
)}
@@ -164,17 +165,23 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
<ActivityIndicator />
</div>
<Typography>{t("choose_device_from_browser")}</Typography>
- <Button color="secondary" onClick={() => setView("choose")}>
+ <FocusVisibleButton
+ color="secondary"
+ onClick={() => setView("choose")}
+ >
{t("go_back")}
- </Button>
+ </FocusVisibleButton>
</Stack>
)}
{view == "auto-cast-error" && (
<Stack sx={{ pt: 1, gap: 3, textAlign: "center" }}>
<Typography>{t("cast_auto_pair_failed")}</Typography>
- <Button color="secondary" onClick={() => setView("choose")}>
+ <FocusVisibleButton
+ color="secondary"
+ onClick={() => setView("choose")}
+ >
{t("go_back")}
- </Button>
+ </FocusVisibleButton>
</Stack>
)}
{view == "pin" && (
@@ -199,13 +206,13 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
buttonText={t("pair_device_to_tv")}
submitButtonProps={{ sx: { mt: 1, mb: 2 } }}
/>
- <Button
+ <FocusVisibleButton
variant="text"
fullWidth
onClick={() => setView("choose")}
>
{t("go_back")}
- </Button>
+ </FocusVisibleButton>
</>
)}
</TitledMiniDialog>
diff --git a/web/packages/accounts/pages/two-factor/setup.tsx b/web/packages/accounts/pages/two-factor/setup.tsx
index bd7fef9c16..de3aebcb7e 100644
--- a/web/packages/accounts/pages/two-factor/setup.tsx
+++ b/web/packages/accounts/pages/two-factor/setup.tsx
@@ -6,8 +6,8 @@ import { appHomeRoute } from "@/accounts/services/redirect";
import type { TwoFactorSecret } from "@/accounts/services/user";
import { enableTwoFactor, setupTwoFactor } from "@/accounts/services/user";
import { CenteredFill } from "@/base/components/containers";
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import log from "@/base/log";
-import LinkButton from "@ente/shared/components/LinkButton";
import { encryptWithRecoveryKey } from "@ente/shared/crypto/helpers";
import { getData, LS_KEYS, setLSUser } from "@ente/shared/storage/localStorage";
import { Paper, Stack, styled, Typography } from "@mui/material";
@@ -69,9 +69,14 @@ const Page: React.FC = () => {
onSubmit={onSubmit}
buttonText={t("enable")}
/>
- <LinkButton onClick={router.back}>
- {t("go_back")}
- </LinkButton>
+ <Stack sx={{ alignItems: "center" }}>
+ <FocusVisibleButton
+ variant="text"
+ onClick={router.back}
+ >
+ {t("go_back")}
+ </FocusVisibleButton>
+ </Stack>
</Stack>
</ContentsPaper>
</CenteredFill>