Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix + accounts app

Manav Rathi4a47305a542f
diff --git a/web/apps/accounts/src/pages/passkeys/index.tsx b/web/apps/accounts/src/pages/passkeys/index.tsx
index 5e5b78dfff..0f9bc5575d 100644
--- a/web/apps/accounts/src/pages/passkeys/index.tsx
+++ b/web/apps/accounts/src/pages/passkeys/index.tsx
@@ -123,8 +123,8 @@ const Page: React.FC = () => {
return (
<>
<CenteredFlex>
- <Box maxWidth="20rem">
- <Box marginBottom="1rem">
+ <Box sx={{ maxWidth: "20rem" }}>
+ <Box sx={{ marginBottom: "1rem" }}>
<Typography>{t("passkeys_description")}</Typography>
</Box>
<FormPaper style={{ padding: "1rem" }}>
@@ -137,7 +137,7 @@ const Page: React.FC = () => {
submitButtonProps={{ sx: { marginBottom: 1 } }}
/>
</FormPaper>
- <Box marginTop="1rem">
+ <Box sx={{ marginTop: "1rem" }}>
<PasskeysList
passkeys={passkeys}
onSelectPasskey={handleSelectPasskey}
@@ -206,7 +206,9 @@ const PasskeyListItem: React.FC<PasskeyListItemProps> = ({
}) => {
const labelComponent = (
<PasskeyLabel>
- <Typography fontWeight="bold">{passkey.friendlyName}</Typography>
+ <Typography sx={{ fontWeight: "bold" }}>
+ {passkey.friendlyName}
+ </Typography>
</PasskeyLabel>
);
return (
@@ -284,7 +286,7 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({
<>
<SidebarDrawer anchor="right" {...{ open, onClose }}>
{token && passkey && (
- <Stack spacing={"4px"} py={"12px"}>
+ <Stack sx={{ gap: "4px", py: "12px" }}>
<Titlebar
onClose={onClose}
title={t("manage_passkey")}
@@ -312,7 +314,6 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({
</Stack>
)}
</SidebarDrawer>
-
{token && passkey && (
<RenamePasskeyDialog
open={showRenameDialog}
@@ -332,9 +333,9 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({
const CreatedAtEntry: React.FC<React.PropsWithChildren> = ({ children }) => (
<Box sx={{ display: "flex", alignItems: "center", gap: 0.5, pb: 1 }}>
<CalendarTodayIcon color="secondary" sx={{ m: "16px" }} />
- <Box py={0.5}>
+ <Box sx={{ py: 0.5 }}>
<Typography>{t("created_at")}</Typography>
- <Typography variant="small" color="text.muted">
+ <Typography variant="small" sx={{ color: "text.muted" }}>
{children}
</Typography>
</Box>
@@ -377,8 +378,8 @@ const RenamePasskeyDialog: React.FC<RenamePasskeyDialogProps> = ({
{...{ open, onClose, fullScreen }}
PaperProps={{ sx: { width: { sm: "360px" } } }}
>
- <Stack gap={3} p={3}>
- <Typography variant="large" fontWeight={"bold"}>
+ <Stack sx={{ gap: 3, p: 3 }}>
+ <Typography variant="large" sx={{ fontWeight: "bold" }}>
{t("rename_passkey")}
</Typography>
<SingleInputForm
diff --git a/web/apps/accounts/src/pages/passkeys/verify.tsx b/web/apps/accounts/src/pages/passkeys/verify.tsx
index 9fcefb689e..03fdbb87f9 100644
--- a/web/apps/accounts/src/pages/passkeys/verify.tsx
+++ b/web/apps/accounts/src/pages/passkeys/verify.tsx
@@ -317,7 +317,7 @@ const Failed: React.FC<FailedProps> = ({ message }) => {
<Content>
<InfoIcon color="secondary" />
<Typography variant="h3">{t("passkey_login_failed")}</Typography>
- <Typography color="text.muted">{message}</Typography>
+ <Typography sx={{ color: "text.muted" }}>{message}</Typography>
</Content>
);
};
@@ -361,7 +361,7 @@ const Verify: React.FC<VerifyProps> = ({ onVerify }) => {
<Content>
<KeyIcon color="secondary" fontSize="large" />
<Typography variant="h3">{t("passkey")}</Typography>
- <Typography color="text.muted">
+ <Typography sx={{ color: "text.muted" }}>
{t("passkey_verify_description")}
</Typography>
<ButtonStack>
@@ -403,7 +403,7 @@ const RetriableFailed: React.FC<RetriableFailedProps> = ({
<Content>
<InfoIcon color="secondary" fontSize="large" />
<Typography variant="h3">{t("passkey_login_failed")}</Typography>
- <Typography color="text.muted">
+ <Typography sx={{ color: "text.muted" }}>
{duringSignChallenge
? t("passkey_login_credential_hint")
: t("passkey_login_generic_error")}
@@ -441,10 +441,10 @@ const ButtonStack = styled("div")`
const WaitingForUser: React.FC = () => {
return (
<Content>
- <Typography fontWeight="bold" variant="h2">
+ <Typography variant="h2" sx={{ fontWeight: "bold" }}>
{t("passkey_login")}
</Typography>
- <Typography color="text.muted">
+ <Typography sx={{ color: "text.muted" }}>
{t("passkey_login_instructions")}
</Typography>
<WaitingImgContainer>
@@ -470,7 +470,7 @@ const RedirectingWeb: React.FC = () => {
<Content>
<InfoIcon color="accent" fontSize="large" />
<Typography variant="h3">{t("passkey_verified")}</Typography>
- <Typography color="text.muted">
+ <Typography sx={{ color: "text.muted" }}>
{t("redirecting_back_to_app")}
</Typography>
</Content>
@@ -487,10 +487,10 @@ const RedirectingApp: React.FC<RedirectingAppProps> = ({ onRetry }) => {
<Content>
<InfoIcon color="accent" fontSize="large" />
<Typography variant="h3">{t("passkey_verified")}</Typography>
- <Typography color="text.muted">
+ <Typography sx={{ color: "text.muted" }}>
{t("redirecting_back_to_app")}
</Typography>
- <Typography color="text.muted">
+ <Typography sx={{ color: "text.muted" }}>
{t("redirect_close_instructions")}
</Typography>
<ButtonStack>
diff --git a/web/packages/new/photos/components/utils/use-loading-bar.ts b/web/packages/new/photos/components/utils/use-loading-bar.ts
index 4c83a42349..6297443e73 100644
--- a/web/packages/new/photos/components/utils/use-loading-bar.ts
+++ b/web/packages/new/photos/components/utils/use-loading-bar.ts
@@ -12,7 +12,7 @@ import { type LoadingBarRef } from "react-top-loading-bar";
* loading bar. This hook returns these functions (and the ref).
*/
export const useLoadingBar = () => {
- const loadingBarRef = useRef<LoadingBarRef>();
+ const loadingBarRef = useRef<LoadingBarRef | undefined>(undefined);
const showLoadingBar = useCallback(() => {
loadingBarRef.current?.continuousStart();
diff --git a/web/packages/shared/hooks/useFileInput.tsx b/web/packages/shared/hooks/useFileInput.tsx
index 88c247ecc1..0ff8b11b79 100644
--- a/web/packages/shared/hooks/useFileInput.tsx
+++ b/web/packages/shared/hooks/useFileInput.tsx
@@ -52,7 +52,7 @@ export const useFileInput = ({
accept,
}: UseFileInputParams): UseFileInputResult => {
const [selectedFiles, setSelectedFiles] = useState<File[]>([]);
- const inputRef = useRef<HTMLInputElement>();
+ const inputRef = useRef<HTMLInputElement | undefined>(undefined);
const openSelector = useCallback(() => {
if (inputRef.current) {