Fix after merge

This commit is contained in:
Timofey Boyko 2024-02-09 15:15:33 +03:00
parent 71e1ed6a77
commit 9e981c09da
6 changed files with 111 additions and 140 deletions

View File

@ -2,10 +2,8 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { useTranslation, Trans } from "react-i18next";
import {
ModalDialog,
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { ModalDialogType } from "@docspace/shared/components/modal-dialog/ModalDialog.enums";
import { Button, ButtonSize } from "@docspace/shared/components/button";
import { toastr } from "@docspace/shared/components/toast";
import { TData } from "@docspace/shared/components/toast/Toast.type";

View File

@ -2,10 +2,8 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { useTranslation, Trans } from "react-i18next";
import {
ModalDialog,
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { ModalDialogType } from "@docspace/shared/components/modal-dialog/ModalDialog.enums";
import { Button, ButtonSize } from "@docspace/shared/components/button";
import { toastr } from "@docspace/shared/components/toast";
import { TData } from "@docspace/shared/components/toast/Toast.type";

View File

@ -10,24 +10,26 @@ import getCorrectDate from "@docspace/shared/utils/getCorrectDate";
import { getCookie } from "@docspace/shared/utils/cookie";
import {
ModalDialog,
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { ModalDialogType } from "@docspace/shared/components/modal-dialog/ModalDialog.enums";
import { Text } from "@docspace/shared/components/text";
import {
ContextMenuButton,
ContextMenuButtonDisplayType,
} from "@docspace/shared/components/context-menu-button";
//@ts-ignore
// @ts-ignore
import { OAuthStoreProps } from "SRC_DIR/store/OAuthStore";
import {
Avatar,
AvatarRole,
AvatarSize,
} from "@docspace/shared/components/avatar";
import { Link, LinkTarget, LinkType } from "@docspace/shared/components/link";
import {
LinkTarget,
LinkType,
} from "@docspace/shared/components/link/Link.enums";
import { Link } from "@docspace/shared/components/link";
import { Base } from "@docspace/shared/themes";
import { TTranslation } from "@docspace/shared/types";
import { ContextMenuModel } from "@docspace/shared/components/context-menu";
@ -137,7 +139,7 @@ interface InfoDialogProps {
t: TTranslation,
item: IClientProps,
isInfo?: boolean,
isSettings?: boolean
isSettings?: boolean,
) => ContextMenuModel[];
client?: IClientProps;
@ -203,12 +205,16 @@ const InfoDialog = ({
>
<div className="client-block">
<div className="client-block__info">
<img className="client-block__info-logo" src={client?.logo} />
<img
className="client-block__info-logo"
alt="client-logo"
src={client?.logo}
/>
<Text
fontSize={"16px"}
lineHeight={"22px"}
fontWeight={"700"}
fontSize="16px"
lineHeight="22px"
fontWeight="700"
noSelect
truncate
>
@ -224,10 +230,10 @@ const InfoDialog = ({
{!isProfile && (
<>
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -241,9 +247,9 @@ const InfoDialog = ({
/>
<Text
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -255,10 +261,10 @@ const InfoDialog = ({
{!isProfile && (
<>
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -266,38 +272,36 @@ const InfoDialog = ({
</Text>
<Text
id={"client-info-description-text"}
className={"description"}
fontSize={"13px"}
lineHeight={"20px"}
fontWeight={"400"}
id="client-info-description-text"
className="description"
fontSize="13px"
lineHeight="20px"
fontWeight="400"
noSelect
>
{client?.description}
</Text>
{withShowText && (
<>
<Link
className={"desc-link"}
fontSize={"13px"}
lineHeight={"15px"}
fontWeight={"600"}
isHovered
onClick={() => setShowDescription((val) => !val)}
type={LinkType.action}
>
{showDescription ? "Hide" : "Show more"}
</Link>
</>
<Link
className="desc-link"
fontSize="13px"
lineHeight="15px"
fontWeight="600"
isHovered
onClick={() => setShowDescription((val) => !val)}
type={"action"}
>
{showDescription ? "Hide" : "Show more"}
</Link>
)}
</>
)}
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -305,22 +309,22 @@ const InfoDialog = ({
</Text>
<Link
fontSize={"13px"}
lineHeight={"15px"}
fontWeight={"600"}
fontSize="13px"
lineHeight="15px"
fontWeight="600"
isHovered
href={client?.websiteUrl}
type={LinkType.action}
target={LinkTarget.blank}
type={"action"}
target={"_blank"}
>
{client?.websiteUrl}
</Link>
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -334,10 +338,10 @@ const InfoDialog = ({
{isProfile && (
<>
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -345,9 +349,9 @@ const InfoDialog = ({
</Text>
<Text
fontSize={"13px"}
lineHeight={"20px"}
fontWeight={"600"}
fontSize="13px"
lineHeight="20px"
fontWeight="600"
noSelect
truncate
>
@ -357,10 +361,10 @@ const InfoDialog = ({
)}
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"20px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="20px"
fontWeight="600"
noSelect
truncate
>
@ -368,34 +372,34 @@ const InfoDialog = ({
</Text>
<Text
className={"privacy-block"}
fontSize={"13px"}
lineHeight={"15px"}
fontWeight={"600"}
className="privacy-block"
fontSize="13px"
lineHeight="15px"
fontWeight="600"
noSelect
truncate
>
<Link
fontSize={"13px"}
lineHeight={"15px"}
fontWeight={"600"}
fontSize="13px"
lineHeight="15px"
fontWeight="600"
isHovered
href={client?.policyUrl}
type={LinkType.action}
target={LinkTarget.blank}
type={"action"}
target={"_blank"}
>
{t("PrivacyPolicy")}
</Link>
<span className="separator"></span>
<span className="separator" />
<Link
fontSize={"13px"}
lineHeight={"15px"}
fontWeight={"600"}
fontSize="13px"
lineHeight="15px"
fontWeight="600"
isHovered
href={client?.termsUrl}
type={LinkType.action}
target={LinkTarget.blank}
type={"action"}
target={"_blank"}
>
{t("Terms of Service")}
</Link>
@ -403,10 +407,10 @@ const InfoDialog = ({
{!isProfile && (
<>
<Text
className={"block-header"}
fontSize={"14px"}
lineHeight={"16px"}
fontWeight={"600"}
className="block-header"
fontSize="14px"
lineHeight="16px"
fontWeight="600"
noSelect
truncate
>
@ -414,9 +418,9 @@ const InfoDialog = ({
</Text>
<Text
fontSize={"13px"}
lineHeight={"20px"}
fontWeight={"600"}
fontSize="13px"
lineHeight="20px"
fontWeight="600"
noSelect
truncate
>

View File

@ -5,10 +5,8 @@ import { useTranslation } from "react-i18next";
import { IClientProps } from "@docspace/shared/utils/oauth/interfaces";
import {
ModalDialog,
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { ModalDialogType } from "@docspace/shared/components/modal-dialog/ModalDialog.enums";
import { SocialButton } from "@docspace/shared/components/social-button";
import { Text } from "@docspace/shared/components/text";
import { Textarea } from "@docspace/shared/components/textarea";
@ -16,7 +14,7 @@ import { Textarea } from "@docspace/shared/components/textarea";
import OnlyofficeLight from "PUBLIC_DIR/images/onlyoffice.light.react.svg";
import OnlyofficeDark from "PUBLIC_DIR/images/onlyoffice.dark.react.svg";
//@ts-ignore
// @ts-ignore
import { OAuthStoreProps } from "SRC_DIR/store/OAuthStore";
import { Button, ButtonSize } from "@docspace/shared/components/button";
import { Base } from "@docspace/shared/themes";
@ -177,7 +175,7 @@ const PreviewDialog = ({
const scopesString = client?.scopes.join(" ");
const isClientSecretPost = !client?.authenticationMethods.includes(
AuthenticationMethod.none
AuthenticationMethod.none,
);
const encodingScopes = encodeURI(scopesString || "");
@ -234,7 +232,7 @@ const PreviewDialog = ({
<StyledContainer>
<StyledPreviewContainer>
<SocialButton
className={"social-button"}
className="social-button"
label={t("SignIn")}
IconComponent={icon}
onClick={() => {
@ -244,12 +242,7 @@ const PreviewDialog = ({
</StyledPreviewContainer>
<StyledBlocksContainer>
<div className="block-container">
<Text
fontWeight={600}
lineHeight={"20px"}
fontSize={"13px"}
noSelect
>
<Text fontWeight={600} lineHeight="20px" fontSize="13px" noSelect>
HTML
</Text>
<Textarea
@ -261,12 +254,7 @@ const PreviewDialog = ({
/>
</div>
<div className="block-container">
<Text
fontWeight={600}
lineHeight={"20px"}
fontSize={"13px"}
noSelect
>
<Text fontWeight={600} lineHeight="20px" fontSize="13px" noSelect>
CSS
</Text>
<Textarea
@ -278,12 +266,7 @@ const PreviewDialog = ({
/>
</div>
<div className="block-container">
<Text
fontWeight={600}
lineHeight={"20px"}
fontSize={"13px"}
noSelect
>
<Text fontWeight={600} lineHeight="20px" fontSize="13px" noSelect>
JavaScript
</Text>
<Textarea
@ -295,12 +278,7 @@ const PreviewDialog = ({
/>
</div>
<div className="block-container">
<Text
fontWeight={600}
lineHeight={"20px"}
fontSize={"13px"}
noSelect
>
<Text fontWeight={600} lineHeight="20px" fontSize="13px" noSelect>
{t("AuthorizeLink")}
</Text>
<Textarea
@ -313,12 +291,7 @@ const PreviewDialog = ({
</div>
<div className="block-container">
<Text
fontWeight={600}
lineHeight={"20px"}
fontSize={"13px"}
noSelect
>
<Text fontWeight={600} lineHeight="20px" fontSize="13px" noSelect>
{t("Webhooks:State")}
</Text>
<Textarea
@ -334,8 +307,8 @@ const PreviewDialog = ({
<div className="block-container">
<Text
fontWeight={600}
lineHeight={"20px"}
fontSize={"13px"}
lineHeight="20px"
fontSize="13px"
noSelect
>
{t("CodeVerifier")}
@ -381,5 +354,5 @@ export default inject(
client: bufferSelection,
theme,
};
}
},
)(observer(PreviewDialog));

View File

@ -3,10 +3,8 @@ import { useParams } from "react-router-dom";
import { inject, observer } from "mobx-react";
import { useTranslation, Trans } from "react-i18next";
import {
ModalDialog,
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { ModalDialogType } from "@docspace/shared/components/modal-dialog/ModalDialog.enums";
import { Button, ButtonSize } from "@docspace/shared/components/button";
import { toastr } from "@docspace/shared/components/toast";
@ -60,7 +58,7 @@ const ResetDialog = (props: ResetDialogProps) => {
label={t("Common:OkButton")}
size={ButtonSize.normal}
scale
primary={true}
primary
isLoading={isRequestRunning}
onClick={onResetClick}
/>

View File

@ -1,5 +1,5 @@
{
"date": "202429_13537",
"date": "202429_151253",
"checksums": {
"api.js": "cdccad9c117fa172ed7ea7f392a6c702",
"api.poly.js": "586ce6831fa68f6bc33486e2cebc856e",