Merge branch 'release/v2.6.0' into feature/invite-link

This commit is contained in:
Ilya Oleshko 2024-07-03 14:40:53 +03:00
commit 12349ec12a
13 changed files with 28 additions and 17 deletions

View File

@ -173,7 +173,7 @@ const CreateRoomDialog = ({
>
<ModalDialog.Header>
<DialogHeader
disabledIcon={Boolean(startRoomParams)}
disabledIcon={Boolean(startRoomType)}
isChooseRoomType={!roomParams.type}
onArrowClick={goBack}
/>
@ -185,7 +185,7 @@ const CreateRoomDialog = ({
) : (
<SetRoomParams
t={t}
disabledChangeRoomType={Boolean(startRoomParams)}
disabledChangeRoomType={Boolean(startRoomType)}
setIsOauthWindowOpen={setIsOauthWindowOpen}
tagHandler={tagHandler}
roomParams={roomParams}

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,
@ -643,9 +644,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}
@ -683,6 +682,7 @@ const CreateUserForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAllowedCharacters={`${t("Common:AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
/>
</FieldContainer>

View File

@ -25,7 +25,7 @@
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { cookies, headers } from "next/headers";
import { redirect } from "next/navigation";
import { Toast } from "@docspace/shared/components/toast";
import { getBaseUrl } from "@docspace/shared/utils/next-ssr-helper";
import { TenantStatus, ThemeKeys } from "@docspace/shared/enums";
@ -83,7 +83,7 @@ export default async function RootLayout({
}
if (typeof settings !== "string" && settings?.wizardToken) {
redirectUrl = `wizard`;
redirect(`wizard`);
}
if (

View File

@ -134,7 +134,7 @@ export async function getCapabilities() {
}
export async function getSSO() {
const [getSSO] = createRequest([`/capabilities`], [["", ""]], "GET");
const [getSSO] = createRequest([`/settings/ssov2`], [["", ""]], "GET");
const res = await fetch(getSSO);

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

@ -402,9 +402,9 @@ const useFilesHelper = ({
if (onSetBaseFolderPath) {
onSetBaseFolderPath([]);
toastr.error(e as TData);
}
setIsFirstLoad(false);
toastr.error(e as TData);
}
},
[

View File

@ -49,7 +49,7 @@ import CatalogSettingsGiftReactSvgUrl from "PUBLIC_DIR/images/gift.react.svg?url
import CatalogSettingsStorageManagementReactSvgUrl from "PUBLIC_DIR/images/icons/16/catalog-settings-storage-management.svg?url";
import CatalogFolder20ReactSvgUrl from "PUBLIC_DIR/images/icons/20/catalog.folder.react.svg?url";
import CatalogUser20ReactSvgUrl from "PUBLIC_DIR/images/icons/20/catalog.user.react.svg?url";
import CatalogDocuments20ReactSvgUrl from "PUBLIC_DIR/images/icons/20/catalog.documents.react.svg?url";
import CatalogRooms20ReactSvgUrl from "PUBLIC_DIR/images/icons/20/catalog.rooms.react.svg?url";
import CatalogArchive20ReactSvgUrl from "PUBLIC_DIR/images/icons/20/catalog.archive.react.svg?url";
import CatalogShared20ReactSvgUrl from "PUBLIC_DIR/images/icons/20/catalog.shared.react.svg?url";
@ -114,7 +114,7 @@ const icons: Record<SizeType, Partial<Record<PageUnionType, string>>> = {
[PageType.storageManagement]: CatalogSettingsStorageManagementReactSvgUrl,
},
20: {
[FolderType.USER]: CatalogUser20ReactSvgUrl,
[FolderType.USER]: CatalogDocuments20ReactSvgUrl,
[FolderType.Rooms]: CatalogRooms20ReactSvgUrl,
[FolderType.Archive]: CatalogArchive20ReactSvgUrl,
[FolderType.SHARE]: CatalogShared20ReactSvgUrl,

View File

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.28571 0C3.02335 0 2 1.11929 2 2.5V17.5C2 18.8807 3.02335 20 4.28571 20H15.7143C16.9767 20 18 18.8807 18 17.5V5.13889C18 4.81524 17.8852 4.5042 17.6798 4.27122L14.2513 0.382331C14.0359 0.138014 13.7389 0 13.4286 0H4.28571ZM4 2H13L16 5.38929V18H4V2ZM6 7H12V5H6V7ZM6 11H14V9H6V11ZM6 15H14V13H6V15Z" fill="#657077"/>
</svg>

After

Width:  |  Height:  |  Size: 468 B

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",