mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
Move
This commit is contained in:
parent
0fa7da8bb6
commit
6e6c4ee72b
@ -1,8 +1,8 @@
|
||||
import { estimatePasswordStrength } from "@/accounts/utils";
|
||||
import { FlexWrapper } from "@ente/shared/components/Container";
|
||||
import { Typography } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import React, { useMemo } from "react";
|
||||
import { estimatePasswordStrength } from "../utils/password";
|
||||
|
||||
interface PasswordStrengthHintProps {
|
||||
password: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { isWeakPassword } from "@/accounts/utils";
|
||||
import { isWeakPassword } from "@/accounts/utils/password";
|
||||
import { LoadingButton } from "@/base/components/mui/LoadingButton";
|
||||
import ShowHidePassword from "@ente/shared/components/Form/ShowHidePassword";
|
||||
import { Box, Input, TextField, Typography } from "@mui/material";
|
||||
|
@ -2,7 +2,7 @@ import { sendOtt } from "@/accounts/api/user";
|
||||
import { PasswordStrengthHint } from "@/accounts/components/PasswordStrength";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { generateKeyAndSRPAttributes } from "@/accounts/services/srp";
|
||||
import { isWeakPassword } from "@/accounts/utils";
|
||||
import { isWeakPassword } from "@/accounts/utils/password";
|
||||
import { FormPaperFooter, FormPaperTitle } from "@/base/components/FormPaper";
|
||||
import { LoadingButton } from "@/base/components/mui/LoadingButton";
|
||||
import log from "@/base/log";
|
||||
|
@ -2,8 +2,9 @@ import zxcvbn from "zxcvbn";
|
||||
|
||||
export type PasswordStrength = "weak" | "moderate" | "strong";
|
||||
|
||||
|
||||
export function estimatePasswordStrength(password: string): PasswordStrength {
|
||||
export const estimatePasswordStrength = (
|
||||
password: string,
|
||||
): PasswordStrength => {
|
||||
if (!password) {
|
||||
return "weak";
|
||||
}
|
||||
@ -16,8 +17,7 @@ export function estimatePasswordStrength(password: string): PasswordStrength {
|
||||
} else {
|
||||
return "strong";
|
||||
}
|
||||
}
|
||||
|
||||
export const isWeakPassword = (password: string) => {
|
||||
return estimatePasswordStrength(password) == "weak";
|
||||
};
|
||||
|
||||
export const isWeakPassword = (password: string) =>
|
||||
estimatePasswordStrength(password) == "weak";
|
Loading…
x
Reference in New Issue
Block a user