Merge branch 'release/v2.6.0' of https://github.com/ONLYOFFICE/DocSpace-client into release/v2.6.0

This commit is contained in:
Timofey Boyko 2024-07-02 17:17:41 +03:00
commit e86320e24b
7 changed files with 17 additions and 9 deletions

View File

@ -225,9 +225,7 @@ const ActivateUserForm = (props) => {
isVertical={true}
labelVisible={false}
hasError={isPasswordErrorShow && !passwordValid}
errorMessage={`${t(
"Common:PasswordLimitMessage",
)}: ${getPasswordErrorMessage(t, settings)}`}
errorMessage={t("Common:IncorrectPassword")}
>
<PasswordInput
className="confirm-input"
@ -257,6 +255,7 @@ const ActivateUserForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAllowedCharacters={`${t("Common:AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
// If need copy credentials use t("EmailAndPasswordCopiedToClipboard")
/>
</FieldContainer>

View File

@ -42,6 +42,7 @@ import { getPasswordErrorMessage } from "@docspace/shared/utils/getPasswordError
import PortalLogo from "@docspace/shared/components/portal-logo/PortalLogo";
import withLoader from "../withLoader";
import { StyledPage, StyledBody, StyledContent } from "./StyledConfirm";
import { ALLOWED_PASSWORD_CHARACTERS } from "@docspace/shared/constants";
const ChangePasswordForm = (props) => {
const {
@ -154,9 +155,7 @@ const ChangePasswordForm = (props) => {
isVertical={true}
labelVisible={false}
hasError={isPasswordErrorShow && !passwordValid}
errorMessage={`${t(
"Common:PasswordLimitMessage",
)}: ${getPasswordErrorMessage(t, settings)}`}
errorMessage={t("Common:IncorrectPassword")}
>
<PasswordInput
simpleView={false}
@ -187,6 +186,7 @@ const ChangePasswordForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAllowedCharacters={`${t("Common:AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
/>
</FieldContainer>
</div>

View File

@ -52,6 +52,7 @@ import {
} from "@docspace/shared/utils/common";
import { login } from "@docspace/shared/utils/loginUtils";
import {
ALLOWED_PASSWORD_CHARACTERS,
COOKIE_EXPIRATION_YEAR,
LANGUAGE,
PRODUCT_NAME,
@ -633,9 +634,7 @@ const CreateUserForm = (props) => {
isVertical={true}
labelVisible={false}
hasError={isPasswordErrorShow && !passwordValid}
errorMessage={`${t(
"Common:PasswordLimitMessage",
)}: ${getPasswordErrorMessage(t, settings)}`}
errorMessage={t("Common:IncorrectPassword")}
>
<PasswordInput
simpleView={false}
@ -673,6 +672,7 @@ const CreateUserForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAllowedCharacters={`${t("Common:AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
/>
</FieldContainer>

View File

@ -102,6 +102,7 @@ const PasswordInput = React.forwardRef(
tooltipOffsetLeft,
tooltipOffsetTop,
isAutoFocussed,
tooltipAllowedCharacters,
}: PasswordInputProps,
ref,
) => {
@ -473,6 +474,8 @@ const PasswordInput = React.forwardRef(
</StyledTooltipItem>
)}
{tooltipAllowedCharacters}
{generatePasswordTitle && (
<div className="generate-btn-container">
<Link

View File

@ -129,6 +129,8 @@ export interface PasswordInputProps {
simpleView?: boolean;
/** Sets a title of the password generation button */
generatePasswordTitle?: string;
/** Title that indicates that the tooltip must contain allowed characters */
tooltipAllowedCharacters?: string;
/** Setting display block to set element to full width */
isFullWidth?: boolean;
/** Focus the input field on initial render */

View File

@ -187,3 +187,6 @@ export const SDK_SCRIPT_URL =
typeof window !== "undefined"
? `${window.location.origin}/static/scripts/sdk/${SDK_VERSION}/api.js`
: "";
export const ALLOWED_PASSWORD_CHARACTERS =
"a-z, A-Z, 0-9, !\"#%&'()*+,-./:;<=>?@[]^_`{|}";

View File

@ -14,6 +14,7 @@
"AddUsers": "Add users",
"AdvancedFilter": "Search options",
"Alert": "Alert",
"AllowedCharacters": "Allowed characters",
"Anonymous": "Anonymous",
"AnyoneWithLink": "Anyone with the link",
"ApplyButton": "Apply",