Merge branch 'develop' into bugfix/login
This commit is contained in:
commit
680679e480
@ -60,6 +60,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
isAdmin,
|
||||
sectionWidth,
|
||||
viewAs,
|
||||
isArchiveFolderRoot,
|
||||
} = this.props;
|
||||
|
||||
const { access, id, fileExst } = item;
|
||||
@ -82,6 +83,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
isCanWebEdit={isCanWebEdit}
|
||||
onClickLock={this.onClickLock}
|
||||
onClickFavorite={this.onClickFavorite}
|
||||
isArchiveFolderRoot={isArchiveFolderRoot}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -103,7 +105,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
dialogsStore,
|
||||
settingsStore,
|
||||
}) => {
|
||||
const { isRecycleBinFolder } = treeFoldersStore;
|
||||
const { isRecycleBinFolder, isArchiveFolderRoot } = treeFoldersStore;
|
||||
const {
|
||||
lockFileAction,
|
||||
setFavoriteAction,
|
||||
@ -121,6 +123,7 @@ export default function withQuickButtons(WrappedComponent) {
|
||||
onSelectItem,
|
||||
setSharingPanelVisible,
|
||||
canWebEdit,
|
||||
isArchiveFolderRoot,
|
||||
};
|
||||
}
|
||||
)(observer(WithQuickButtons));
|
||||
|
@ -34,13 +34,13 @@ const PureAccountsItem = ({
|
||||
|
||||
return (
|
||||
<CatalogItem
|
||||
id="accounts"
|
||||
key="accounts"
|
||||
text={t("Accounts")}
|
||||
icon={iconUrl}
|
||||
showText={showText}
|
||||
onClick={onClick}
|
||||
isActive={isActive}
|
||||
folderId="document_catalog-accounts"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -3,7 +3,11 @@ import styled from "styled-components";
|
||||
import PropTypes from "prop-types";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import CatalogItem from "@docspace/components/catalog-item";
|
||||
import { FolderType, ShareAccessRights } from "@docspace/common/constants";
|
||||
import {
|
||||
FolderType,
|
||||
ShareAccessRights,
|
||||
FolderNames,
|
||||
} from "@docspace/common/constants";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import DragAndDrop from "@docspace/components/drag-and-drop";
|
||||
import { isMobile } from "react-device-detect";
|
||||
@ -30,6 +34,7 @@ const Item = ({
|
||||
showBadge,
|
||||
labelBadge,
|
||||
iconBadge,
|
||||
folderId,
|
||||
}) => {
|
||||
const [isDragActive, setIsDragActive] = useState(false);
|
||||
|
||||
@ -96,6 +101,7 @@ const Item = ({
|
||||
<CatalogItem
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
folderId={folderId}
|
||||
className={`tree-drag ${item.folderClassName}`}
|
||||
icon={getFolderIcon(item)}
|
||||
showText={showText}
|
||||
@ -318,6 +324,7 @@ const Items = ({
|
||||
showBadge={showBadge}
|
||||
labelBadge={labelBadge}
|
||||
iconBadge={iconBadge}
|
||||
folderId={`document_catalog-${FolderNames[item.rootFolderType]}`}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
@ -57,13 +57,13 @@ const PureSettingsItem = ({
|
||||
|
||||
return (
|
||||
<CatalogItem
|
||||
id="settings"
|
||||
key="settings"
|
||||
text={t("Common:Settings")}
|
||||
icon={iconUrl}
|
||||
showText={showText}
|
||||
onClick={onClick}
|
||||
isActive={isActive}
|
||||
folderId="document_catalog-settings"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -220,7 +220,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
const folderUpload = !isMobile
|
||||
? [
|
||||
{
|
||||
id: "main-button_upload-folders",
|
||||
id: "actions_upload-folders",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/actions.upload.react.svg",
|
||||
label: t("UploadFolder"),
|
||||
@ -233,12 +233,14 @@ const ArticleMainButtonContent = (props) => {
|
||||
|
||||
const formActions = [
|
||||
{
|
||||
id: "actions_template",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/form.react.svg",
|
||||
label: t("Translations:NewForm"),
|
||||
key: "new-form",
|
||||
items: [
|
||||
{
|
||||
id: "actions_template_blank",
|
||||
className: "main-button_drop-down_sub",
|
||||
icon: "images/form.blank.react.svg",
|
||||
label: t("Translations:SubNewForm"),
|
||||
@ -247,6 +249,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
key: "docxf",
|
||||
},
|
||||
{
|
||||
id: "actions_template_from-file",
|
||||
className: "main-button_drop-down_sub",
|
||||
icon: "images/form.file.react.svg",
|
||||
label: t("Translations:SubNewFormFile"),
|
||||
@ -255,6 +258,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
key: "form-file",
|
||||
},
|
||||
{
|
||||
id: "actions_template_oforms-gallery",
|
||||
className: "main-button_drop-down_sub",
|
||||
icon: "images/form.gallery.react.svg",
|
||||
label: t("Common:OFORMsGallery"),
|
||||
@ -269,7 +273,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
const actions = isAccountsPage
|
||||
? [
|
||||
isOwner && {
|
||||
id: "main-button_administrator",
|
||||
id: "invite_doc-space-administrator",
|
||||
className: "main-button_drop-down",
|
||||
icon: "/static/images/person.admin.react.svg",
|
||||
label: t("Common:DocSpaceAdmin"),
|
||||
@ -278,7 +282,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
key: "administrator",
|
||||
},
|
||||
{
|
||||
id: "main-button_manager",
|
||||
id: "invite_room-admin",
|
||||
className: "main-button_drop-down",
|
||||
icon: "/static/images/person.manager.react.svg",
|
||||
label: t("Common:RoomAdmin"),
|
||||
@ -287,7 +291,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
key: "manager",
|
||||
},
|
||||
{
|
||||
id: "main-button_user",
|
||||
id: "invite_user",
|
||||
className: "main-button_drop-down",
|
||||
icon: "/static/images/person.user.react.svg",
|
||||
label: t("Common:User"),
|
||||
@ -298,7 +302,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
]
|
||||
: [
|
||||
{
|
||||
id: "main-button_new-document",
|
||||
id: "actions_new-document",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/actions.documents.react.svg",
|
||||
label: t("NewDocument"),
|
||||
@ -307,7 +311,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
key: "docx",
|
||||
},
|
||||
{
|
||||
id: "main-button_new-spreadsheet",
|
||||
id: "actions_new-spreadsheet",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/spreadsheet.react.svg",
|
||||
label: t("NewSpreadsheet"),
|
||||
@ -316,7 +320,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
key: "xlsx",
|
||||
},
|
||||
{
|
||||
id: "main-button_new-presentation",
|
||||
id: "actions_new-presentation",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/actions.presentation.react.svg",
|
||||
label: t("NewPresentation"),
|
||||
@ -326,7 +330,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
},
|
||||
...formActions,
|
||||
{
|
||||
id: "main-button_new-folder",
|
||||
id: "actions_new-folder",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/catalog.folder.react.svg",
|
||||
label: t("NewFolder"),
|
||||
@ -338,7 +342,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
const uploadActions = isAccountsPage
|
||||
? [
|
||||
{
|
||||
id: "main-button_invite-again",
|
||||
id: "invite_again",
|
||||
className: "main-button_drop-down",
|
||||
icon: "/static/images/invite.again.react.svg",
|
||||
label: t("People:LblInviteAgain"),
|
||||
@ -349,7 +353,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
]
|
||||
: [
|
||||
{
|
||||
id: "main-button_upload-files",
|
||||
id: "actions_upload-files",
|
||||
className: "main-button_drop-down",
|
||||
icon: "images/actions.upload.react.svg",
|
||||
label: t("UploadFiles"),
|
||||
@ -441,6 +445,7 @@ const ArticleMainButtonContent = (props) => {
|
||||
) : isRoomsFolder ? (
|
||||
<StyledButton
|
||||
className="create-room-button"
|
||||
id="rooms-shared_create-room-button"
|
||||
label={t("Files:NewRoom")}
|
||||
onClick={onCreateRoom}
|
||||
currentColorScheme={currentColorScheme}
|
||||
@ -451,7 +456,11 @@ const ArticleMainButtonContent = (props) => {
|
||||
/>
|
||||
) : (
|
||||
<MainButton
|
||||
id="files_main-button"
|
||||
id={
|
||||
isAccountsPage
|
||||
? "accounts_invite-main-button"
|
||||
: "actions-main-button"
|
||||
}
|
||||
isDisabled={isDisabled}
|
||||
isDropdown={isDropdownMainButton}
|
||||
text={mainButtonText}
|
||||
|
@ -143,7 +143,7 @@ const Badges = ({
|
||||
};
|
||||
|
||||
return fileExst ? (
|
||||
<div className="badges additional-badges">
|
||||
<div className="badges additional-badges temp-badges">
|
||||
{isEditing && (
|
||||
<ColorTheme
|
||||
themeId={ThemeType.IconButton}
|
||||
|
@ -23,6 +23,7 @@ const QuickButtons = (props) => {
|
||||
onClickFavorite,
|
||||
viewAs,
|
||||
isCanWebEdit,
|
||||
isArchiveFolderRoot,
|
||||
} = props;
|
||||
|
||||
const { id, locked, fileStatus, title, fileExst } = item;
|
||||
@ -57,27 +58,31 @@ const QuickButtons = (props) => {
|
||||
|
||||
const setFavorite = () => onClickFavorite(isFavorite);
|
||||
|
||||
const isAvailableLockFile =
|
||||
!isArchiveFolderRoot &&
|
||||
fileExst &&
|
||||
accessToEdit &&
|
||||
!isTrashFolder &&
|
||||
displayBadges &&
|
||||
isCanWebEdit;
|
||||
|
||||
return (
|
||||
<div className="badges additional-badges">
|
||||
{fileExst &&
|
||||
accessToEdit &&
|
||||
!isTrashFolder &&
|
||||
displayBadges &&
|
||||
isCanWebEdit && (
|
||||
<ColorTheme
|
||||
themeId={ThemeType.IconButton}
|
||||
iconName={iconLock}
|
||||
locked={locked}
|
||||
className="badge lock-file icons-group"
|
||||
size={sizeQuickButton}
|
||||
data-id={id}
|
||||
data-locked={locked ? true : false}
|
||||
onClick={onClickLock}
|
||||
color={colorLock}
|
||||
isDisabled={isDisabled}
|
||||
hoverColor={theme.filesQuickButtons.sharedColor}
|
||||
/>
|
||||
)}
|
||||
{isAvailableLockFile && (
|
||||
<ColorTheme
|
||||
themeId={ThemeType.IconButton}
|
||||
iconName={iconLock}
|
||||
locked={locked}
|
||||
className="badge lock-file icons-group"
|
||||
size={sizeQuickButton}
|
||||
data-id={id}
|
||||
data-locked={locked ? true : false}
|
||||
onClick={onClickLock}
|
||||
color={colorLock}
|
||||
isDisabled={isDisabled}
|
||||
hoverColor={theme.filesQuickButtons.sharedColor}
|
||||
/>
|
||||
)}
|
||||
{fileExst && !isTrashFolder && displayBadges && (
|
||||
<ColorTheme
|
||||
themeId={ThemeType.IconButton}
|
||||
|
@ -12,6 +12,7 @@ const CommentEditor = ({
|
||||
|
||||
setSelection,
|
||||
isRecycleBinFolder,
|
||||
isArchiveFolderRoot,
|
||||
fetchFileVersions,
|
||||
updateCommentVersion,
|
||||
}) => {
|
||||
@ -60,7 +61,7 @@ const CommentEditor = ({
|
||||
{comment}
|
||||
</Text>
|
||||
)}
|
||||
{!isRecycleBinFolder && (
|
||||
{!isRecycleBinFolder && !isArchiveFolderRoot && (
|
||||
<div className="edit_toggle" onClick={onOpenEditor}>
|
||||
<ReactSVG
|
||||
className="edit_toggle-icon"
|
||||
@ -107,10 +108,12 @@ export default inject(({ auth, versionHistoryStore, treeFoldersStore }) => {
|
||||
const { setSelection } = auth.infoPanelStore;
|
||||
|
||||
const { fetchFileVersions, updateCommentVersion } = versionHistoryStore;
|
||||
const { isRecycleBinFolder } = treeFoldersStore;
|
||||
const { isRecycleBinFolder, isArchiveFolderRoot } = treeFoldersStore;
|
||||
|
||||
return {
|
||||
setSelection,
|
||||
isRecycleBinFolder,
|
||||
isArchiveFolderRoot,
|
||||
fetchFileVersions,
|
||||
updateCommentVersion,
|
||||
};
|
||||
|
@ -15,6 +15,7 @@ const User = ({
|
||||
currCanEditUsers,
|
||||
selectionParentRoom,
|
||||
setSelectionParentRoom,
|
||||
isArchiveRoot,
|
||||
}) => {
|
||||
if (!selectionParentRoom) return null;
|
||||
if (!user.displayName && !user.email) return null;
|
||||
@ -65,6 +66,12 @@ const User = ({
|
||||
}
|
||||
};
|
||||
|
||||
const isAvailable =
|
||||
!isArchiveRoot &&
|
||||
currCanEditUsers &&
|
||||
currentMember?.id !== user.id &&
|
||||
userRole.access !== ShareAccessRights.FullAccess;
|
||||
|
||||
return (
|
||||
<StyledUser isExpect={isExpect} key={user.id}>
|
||||
<Avatar
|
||||
@ -84,9 +91,7 @@ const User = ({
|
||||
|
||||
{userRole && userRoleOptions && (
|
||||
<div className="role-wrapper">
|
||||
{currCanEditUsers &&
|
||||
currentMember?.id !== user.id &&
|
||||
userRole.access !== ShareAccessRights.FullAccess ? (
|
||||
{isAvailable ? (
|
||||
<ComboBox
|
||||
className="role-combobox"
|
||||
selectedOption={userRole}
|
||||
|
@ -156,6 +156,7 @@ const Members = ({
|
||||
roomType={selectionParentRoom.roomType}
|
||||
selectionParentRoom={selectionParentRoom}
|
||||
setSelectionParentRoom={setSelectionParentRoom}
|
||||
isArchiveRoot={isArchiveRoot}
|
||||
/>
|
||||
))}
|
||||
</StyledUserList>
|
||||
@ -190,6 +191,7 @@ const Members = ({
|
||||
roomType={selectionParentRoom.roomType}
|
||||
selectionParentRoom={selectionParentRoom}
|
||||
setSelectionParentRoom={setSelectionParentRoom}
|
||||
isArchiveRoot={isArchiveRoot}
|
||||
/>
|
||||
))}
|
||||
</StyledUserList>
|
||||
@ -204,7 +206,7 @@ export default inject(
|
||||
peopleStore,
|
||||
dialogsStore,
|
||||
accessRightsStore,
|
||||
selectedFolderStore,
|
||||
treeFoldersStore,
|
||||
}) => {
|
||||
const { selectionParentRoom, setSelectionParentRoom } = auth.infoPanelStore;
|
||||
const {
|
||||
@ -216,9 +218,8 @@ export default inject(
|
||||
const { setInvitePanelOptions } = dialogsStore;
|
||||
const { changeType: changeUserType } = peopleStore;
|
||||
const { canInviteUserInRoom } = accessRightsStore;
|
||||
const { rootFolderType } = selectedFolderStore;
|
||||
|
||||
const isArchiveRoot = rootFolderType === FolderType.Archive;
|
||||
const { isArchiveFolderRoot } = treeFoldersStore;
|
||||
|
||||
return {
|
||||
selectionParentRoom,
|
||||
@ -236,7 +237,7 @@ export default inject(
|
||||
|
||||
changeUserType,
|
||||
canInviteUserInRoom,
|
||||
isArchiveRoot,
|
||||
isArchiveRoot: isArchiveFolderRoot,
|
||||
};
|
||||
}
|
||||
)(
|
||||
|
@ -76,7 +76,7 @@ const SimpleFilesRowContent = styled(RowContent)`
|
||||
|
||||
.new-items {
|
||||
min-width: 16px;
|
||||
margin: 7px 22px 0 0;
|
||||
margin: 5px 24px 0 0;
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
@ -158,11 +158,25 @@ const StyledSimpleFilesRow = styled(Row)`
|
||||
}
|
||||
|
||||
.badges {
|
||||
margin-top: ${(props) =>
|
||||
props.isSmallContainer ? "1px" : props.isRooms ? "4px" : "2px"};
|
||||
margin-bottom: 0px;
|
||||
|
||||
${(props) =>
|
||||
props.isSmallContainer &&
|
||||
css`
|
||||
.tablet-pinned {
|
||||
margin-top: 2px;
|
||||
}
|
||||
`}
|
||||
}
|
||||
|
||||
.temp-badges {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
margin-right: 24px;
|
||||
margin-right: ${(props) => (props.isSmallContainer ? "8px" : "24px")};
|
||||
}
|
||||
|
||||
.lock-file {
|
||||
@ -281,6 +295,8 @@ const SimpleFilesRow = (props) => {
|
||||
showHotkeyBorder={showHotkeyBorder}
|
||||
isRoom={item.isRoom}
|
||||
isDragOver={isDragOver}
|
||||
isSmallContainer={isSmallContainer}
|
||||
isRooms={isRooms}
|
||||
>
|
||||
<FilesRowContent
|
||||
item={item}
|
||||
|
@ -198,6 +198,15 @@ const StyledDragAndDrop = styled(DragAndDrop)`
|
||||
const StyledBadgesContainer = styled.div`
|
||||
margin-left: 8px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
${(props) =>
|
||||
props.showHotkeyBorder &&
|
||||
css`
|
||||
margin-top: 1px;
|
||||
`}
|
||||
|
||||
.badges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -216,7 +225,7 @@ const StyledBadgesContainer = styled.div`
|
||||
.new-items {
|
||||
min-width: 12px;
|
||||
width: max-content;
|
||||
margin: 1px -2px -2px -2px;
|
||||
margin: 0 -2px -2px -2px;
|
||||
}
|
||||
|
||||
.badge-version {
|
||||
@ -446,7 +455,9 @@ const FilesTableRow = (props) => {
|
||||
inProgress={inProgress}
|
||||
{...props}
|
||||
/>
|
||||
<StyledBadgesContainer>{badgesComponent}</StyledBadgesContainer>
|
||||
<StyledBadgesContainer showHotkeyBorder={showHotkeyBorder}>
|
||||
{badgesComponent}
|
||||
</StyledBadgesContainer>
|
||||
</TableCell>
|
||||
|
||||
{(item.isRoom || isRooms) && (
|
||||
|
@ -265,6 +265,10 @@ const StyledContent = styled.div`
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.new-items {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
@ -248,6 +248,7 @@ class ArticleBodyContent extends React.Component {
|
||||
value={item.link}
|
||||
isActive={item.key === selectedKeys[0][0]}
|
||||
onClick={() => this.onSelect(item.key)}
|
||||
folderId={item.id}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
export const settingsTree = [
|
||||
{
|
||||
id: "portal-settings_catalog-common",
|
||||
key: "0",
|
||||
icon: "/static/images/common-settings.svg",
|
||||
link: "common",
|
||||
@ -11,6 +12,7 @@ export const settingsTree = [
|
||||
isHeader: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-customization",
|
||||
key: "0-0",
|
||||
icon: "",
|
||||
link: "customization",
|
||||
@ -18,24 +20,28 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-language-and-time-zone",
|
||||
key: "0-0-0",
|
||||
icon: "",
|
||||
link: "language-and-time-zone",
|
||||
tKey: "StudioTimeLanguageSettings",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-welcome-page-settings",
|
||||
key: "0-0-1",
|
||||
icon: "",
|
||||
link: "welcome-page-settings",
|
||||
tKey: "CustomTitlesWelcome",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-dns-settings",
|
||||
key: "0-0-2",
|
||||
icon: "",
|
||||
link: "dns-settings",
|
||||
tKey: "DNSSettings",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-portal-renaming",
|
||||
key: "0-0-3",
|
||||
icon: "",
|
||||
link: "portal-renaming",
|
||||
@ -44,6 +50,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-branding",
|
||||
key: "0-1",
|
||||
icon: "",
|
||||
link: "branding",
|
||||
@ -51,18 +58,21 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-white-label",
|
||||
key: "0-1-0",
|
||||
icon: "",
|
||||
link: "white-label",
|
||||
tKey: "WhiteLabel",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-company-info-settings",
|
||||
key: "0-1-1",
|
||||
icon: "",
|
||||
link: "company-info-settings",
|
||||
tKey: "CompanyInfoSettings",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-additional-resources",
|
||||
key: "0-1-2",
|
||||
icon: "",
|
||||
link: "additional-resources",
|
||||
@ -71,6 +81,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-appearance",
|
||||
key: "0-2",
|
||||
icon: "",
|
||||
link: "appearance",
|
||||
@ -78,6 +89,7 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-appearance_subLink",
|
||||
key: "0-2-0",
|
||||
icon: "",
|
||||
link: "appearance",
|
||||
@ -88,6 +100,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-security",
|
||||
key: "1",
|
||||
icon: "/images/security-settings.svg",
|
||||
link: "security",
|
||||
@ -95,6 +108,7 @@ export const settingsTree = [
|
||||
isHeader: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-access-portal",
|
||||
key: "1-0",
|
||||
icon: "",
|
||||
link: "access-portal",
|
||||
@ -102,36 +116,42 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-password",
|
||||
key: "1-0-0",
|
||||
icon: "",
|
||||
link: "password",
|
||||
tKey: "SettingPasswordStrength",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-two-factor-auth",
|
||||
key: "1-0-1",
|
||||
icon: "",
|
||||
link: "tfa",
|
||||
tKey: "TwoFactorAuth",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-trusted-mail",
|
||||
key: "1-0-2",
|
||||
icon: "",
|
||||
link: "trusted-mail",
|
||||
tKey: "TrustedMail",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-ip-security",
|
||||
key: "1-0-3",
|
||||
icon: "",
|
||||
link: "ip",
|
||||
tKey: "IPSecurity",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-admin-message",
|
||||
key: "1-0-4",
|
||||
icon: "",
|
||||
link: "admin-message",
|
||||
tKey: "AdminsMessage",
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-session-life-time",
|
||||
key: "1-0-5",
|
||||
icon: "",
|
||||
link: "lifetime",
|
||||
@ -140,6 +160,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-access-rights",
|
||||
key: "1-1",
|
||||
icon: "",
|
||||
link: "access-rights",
|
||||
@ -155,6 +176,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-login-history",
|
||||
key: "1-2",
|
||||
icon: "",
|
||||
link: "login-history",
|
||||
@ -162,6 +184,7 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-audit-trail",
|
||||
key: "1-3",
|
||||
icon: "",
|
||||
link: "audit-trail",
|
||||
@ -171,6 +194,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-integration",
|
||||
key: "3",
|
||||
icon: "/images/integration-settings.svg",
|
||||
link: "integration",
|
||||
@ -178,6 +202,7 @@ export const settingsTree = [
|
||||
isHeader: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-single-sign-on",
|
||||
key: "3-0",
|
||||
icon: "",
|
||||
link: "single-sign-on",
|
||||
@ -185,6 +210,7 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-third-party-services",
|
||||
key: "3-1",
|
||||
icon: "",
|
||||
link: "third-party-services",
|
||||
@ -192,6 +218,7 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-portal-integration",
|
||||
key: "3-2",
|
||||
icon: "",
|
||||
link: "portal-integration",
|
||||
@ -199,6 +226,7 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-plugins",
|
||||
key: "3-3",
|
||||
icon: "",
|
||||
link: "plugins",
|
||||
@ -208,6 +236,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-payments",
|
||||
key: "4",
|
||||
icon: "/images/payment.react.svg",
|
||||
link: "payments",
|
||||
@ -215,6 +244,7 @@ export const settingsTree = [
|
||||
isHeader: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-portal-payments",
|
||||
key: "4-0",
|
||||
icon: "",
|
||||
link: "portal-payments",
|
||||
@ -224,6 +254,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-backup",
|
||||
key: "5",
|
||||
icon: "/images/data-management.react.svg",
|
||||
link: "backup",
|
||||
@ -231,6 +262,7 @@ export const settingsTree = [
|
||||
isHeader: true,
|
||||
children: [
|
||||
{
|
||||
id: "portal-settings_catalog-data-backup",
|
||||
key: "5-0",
|
||||
icon: "",
|
||||
link: "data-backup",
|
||||
@ -238,6 +270,7 @@ export const settingsTree = [
|
||||
isCategory: true,
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-auto-backup",
|
||||
key: "5-1",
|
||||
icon: "",
|
||||
link: "auto-backup",
|
||||
@ -248,6 +281,7 @@ export const settingsTree = [
|
||||
},
|
||||
|
||||
{
|
||||
id: "portal-settings_catalog-restore",
|
||||
key: "6",
|
||||
icon: "/images/restore.react.svg",
|
||||
link: "restore",
|
||||
@ -264,6 +298,7 @@ export const settingsTree = [
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "portal-settings_catalog-delete",
|
||||
key: "7",
|
||||
icon: "/images/trash.react.svg",
|
||||
link: "delete-data",
|
||||
|
@ -42,6 +42,7 @@ const VersionRow = (props) => {
|
||||
versionsListLength,
|
||||
isEditing,
|
||||
theme,
|
||||
isArchiveFolderRoot,
|
||||
} = props;
|
||||
const [showEditPanel, setShowEditPanel] = useState(false);
|
||||
const [commentValue, setCommentValue] = useState(info.comment);
|
||||
@ -94,9 +95,15 @@ const VersionRow = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const isAvailableEdit = canEdit && !isArchiveFolderRoot;
|
||||
|
||||
const contextOptions = [
|
||||
canEdit && { key: "edit", label: t("EditComment"), onClick: onEditComment },
|
||||
canEdit && {
|
||||
isAvailableEdit && {
|
||||
key: "edit",
|
||||
label: t("EditComment"),
|
||||
onClick: onEditComment,
|
||||
},
|
||||
isAvailableEdit && {
|
||||
key: "restore",
|
||||
label: t("Common:Restore"),
|
||||
onClick: onRestoreClick,
|
||||
@ -108,7 +115,7 @@ const VersionRow = (props) => {
|
||||
},
|
||||
];
|
||||
|
||||
const onClickProp = canEdit ? { onClick: onVersionClick } : {};
|
||||
const onClickProp = isAvailableEdit ? { onClick: onVersionClick } : {};
|
||||
|
||||
useEffect(() => {
|
||||
const newRowHeight = document.getElementsByClassName(
|
||||
@ -122,7 +129,7 @@ const VersionRow = (props) => {
|
||||
<StyledVersionRow
|
||||
showEditPanel={showEditPanel}
|
||||
contextOptions={contextOptions}
|
||||
canEdit={canEdit}
|
||||
canEdit={isAvailableEdit}
|
||||
isTabletView={isTabletView}
|
||||
isSavingComment={isSavingComment}
|
||||
isEditing={isEditing}
|
||||
@ -218,7 +225,7 @@ const VersionRow = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ auth, versionHistoryStore }) => {
|
||||
export default inject(({ auth, versionHistoryStore, treeFoldersStore }) => {
|
||||
const { user } = auth.userStore;
|
||||
const { culture, isTabletView } = auth.settingsStore;
|
||||
const language = (user && user.cultureName) || culture || "en";
|
||||
@ -231,6 +238,8 @@ export default inject(({ auth, versionHistoryStore }) => {
|
||||
isEditingVersion,
|
||||
} = versionHistoryStore;
|
||||
|
||||
const { isArchiveFolderRoot } = treeFoldersStore;
|
||||
|
||||
return {
|
||||
theme: auth.settingsStore.theme,
|
||||
culture: language,
|
||||
@ -239,6 +248,7 @@ export default inject(({ auth, versionHistoryStore }) => {
|
||||
restoreVersion,
|
||||
updateCommentVersion,
|
||||
isEditing: isEditingVersion || isEditing,
|
||||
isArchiveFolderRoot,
|
||||
};
|
||||
})(
|
||||
withRouter(
|
||||
|
@ -1142,6 +1142,7 @@ class FilesStore {
|
||||
|
||||
if (item.rootFolderType === FolderType.Archive) {
|
||||
fileOptions = this.removeOptions(fileOptions, [
|
||||
"make-form",
|
||||
"mark-read",
|
||||
"mark-as-favorite",
|
||||
"remove-from-favorites",
|
||||
@ -1153,9 +1154,7 @@ class FilesStore {
|
||||
"rename",
|
||||
"separator2",
|
||||
"delete",
|
||||
"version",
|
||||
"finalize-version",
|
||||
"show-version-history",
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ class ProfileActionsStore {
|
||||
|
||||
const settings = isAdmin
|
||||
? {
|
||||
key: "SettingsBtn",
|
||||
key: "user-menu-settings",
|
||||
icon: "/static/images/catalog.settings.react.svg",
|
||||
label: t("Common:Settings"),
|
||||
onClick: () => this.onSettingsClick(settingsUrl),
|
||||
@ -152,7 +152,7 @@ class ProfileActionsStore {
|
||||
!isMobile
|
||||
) {
|
||||
hotkeys = {
|
||||
key: "HotkeysBtn",
|
||||
key: "user-menu-hotkeys",
|
||||
icon: "/static/images/hotkeys.react.svg",
|
||||
label: t("Common:Hotkeys"),
|
||||
onClick: this.onHotkeysClick,
|
||||
@ -161,39 +161,39 @@ class ProfileActionsStore {
|
||||
// }
|
||||
const actions = [
|
||||
{
|
||||
key: "ProfileBtn",
|
||||
key: "user-menu-profile",
|
||||
icon: "/static/images/profile.react.svg",
|
||||
label: t("Common:Profile"),
|
||||
onClick: this.onProfileClick,
|
||||
},
|
||||
settings,
|
||||
isAdmin && {
|
||||
key: "PaymentsBtn",
|
||||
key: "user-menu-payments",
|
||||
icon: "/static/images/payments.react.svg",
|
||||
label: t("Common:PaymentsTitle"),
|
||||
onClick: this.onPaymentsClick,
|
||||
},
|
||||
{
|
||||
key: "HelpCenterBtn",
|
||||
key: "user-menu-help-center",
|
||||
icon: "/static/images/help.center.react.svg",
|
||||
label: t("Common:HelpCenter"),
|
||||
onClick: this.onHelpCenterClick,
|
||||
},
|
||||
{
|
||||
key: "SupportBtn",
|
||||
key: "user-menu-support",
|
||||
icon: "/static/images/support.react.svg",
|
||||
label: t("Common:FeedbackAndSupport"),
|
||||
onClick: this.onSupportClick,
|
||||
},
|
||||
{
|
||||
key: "VideoBtn",
|
||||
key: "user-menu-video",
|
||||
icon: "/static/images/video.guides.react.svg",
|
||||
label: t("Common:VideoGuides"),
|
||||
onClick: this.onVideoGuidesClick,
|
||||
},
|
||||
hotkeys,
|
||||
{
|
||||
key: "AboutBtn",
|
||||
key: "user-menu-about",
|
||||
icon: "/static/images/info.outline.react.svg",
|
||||
label: t("Common:AboutCompanyTitle"),
|
||||
onClick: this.onAboutClick,
|
||||
@ -203,7 +203,7 @@ class ProfileActionsStore {
|
||||
key: "separator",
|
||||
},
|
||||
{
|
||||
key: "LogoutBtn",
|
||||
key: "user-menu-logout",
|
||||
icon: "/static/images/logout.react.svg",
|
||||
label: t("Common:LogoutButton"),
|
||||
onClick: this.onLogoutClick,
|
||||
@ -213,7 +213,7 @@ class ProfileActionsStore {
|
||||
|
||||
if (debugInfo) {
|
||||
actions.splice(3, 0, {
|
||||
key: "DebugBtn",
|
||||
key: "user-menu-debug",
|
||||
icon: "/static/images/info.outline.react.svg",
|
||||
label: "Debug Info",
|
||||
onClick: this.onDebugClick,
|
||||
|
@ -198,6 +198,10 @@ class TreeFoldersStore {
|
||||
);
|
||||
}
|
||||
|
||||
get isArchiveFolderRoot() {
|
||||
return FolderType.Archive === this.selectedFolderStore.rootFolderType;
|
||||
}
|
||||
|
||||
get selectedKeys() {
|
||||
const selectedKeys =
|
||||
this.selectedTreeNode.length > 0 &&
|
||||
|
@ -95,7 +95,10 @@ const HideArticleMenuButton = ({
|
||||
currentColorScheme={currentColorScheme}
|
||||
>
|
||||
{showText ? (
|
||||
<div className="article-hide-menu-container">
|
||||
<div
|
||||
className="article-hide-menu-container"
|
||||
id="document_catalog-hide-menu"
|
||||
>
|
||||
<ReactSVG
|
||||
className="article-hide-menu-icon_svg"
|
||||
src="/static/images/article-hide-menu.react.svg"
|
||||
@ -111,7 +114,10 @@ const HideArticleMenuButton = ({
|
||||
</Text>
|
||||
</div>
|
||||
) : (
|
||||
<div className="article-show-menu-container">
|
||||
<div
|
||||
className="article-show-menu-container"
|
||||
id="document_catalog-show-menu"
|
||||
>
|
||||
<ReactSVG
|
||||
className="article-show-menu-icon_svg"
|
||||
src="/static/images/article-show-menu.react.svg"
|
||||
|
@ -51,6 +51,7 @@ const ArticlePaymentAlert = ({
|
||||
onClick={onClick}
|
||||
isFreeTariff={isFreeTariff}
|
||||
theme={theme}
|
||||
id="document_catalog-payment-alert"
|
||||
>
|
||||
<div>
|
||||
<Text className="article-payment_border">
|
||||
|
@ -51,6 +51,7 @@ const ArticleProfile = (props) => {
|
||||
<div ref={ref}>
|
||||
<Avatar
|
||||
className={"profile-avatar"}
|
||||
id="user-avatar"
|
||||
size={avatarSize}
|
||||
role={"user"}
|
||||
source={user.avatar}
|
||||
@ -78,6 +79,7 @@ const ArticleProfile = (props) => {
|
||||
</Text>
|
||||
</StyledUserName>
|
||||
<ContextMenuButton
|
||||
id="user-option-button"
|
||||
className="option-button"
|
||||
iconClassName="option-button-icon"
|
||||
zIndex={402}
|
||||
|
@ -6,6 +6,7 @@ import Base from "@docspace/components/themes/base";
|
||||
const getDefaultStyles = ({ $currentColorScheme, theme }) =>
|
||||
$currentColorScheme &&
|
||||
css`
|
||||
margin-top: 2px;
|
||||
${commonIconsStyles}
|
||||
svg {
|
||||
path {
|
||||
|
@ -16,6 +16,7 @@ interface IRecoverAccessModalDialogProps {
|
||||
onClose: () => void;
|
||||
textBody: string;
|
||||
emailPlaceholderText: string;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
const ModalDialogContainer = styled(ModalDialog)`
|
||||
@ -45,6 +46,7 @@ const RecoverAccessModalDialog: React.FC<IRecoverAccessModalDialogProps> = ({
|
||||
onClose,
|
||||
textBody,
|
||||
emailPlaceholderText,
|
||||
id,
|
||||
}) => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@ -100,6 +102,7 @@ const RecoverAccessModalDialog: React.FC<IRecoverAccessModalDialogProps> = ({
|
||||
visible={visible}
|
||||
onClose={onRecoverModalClose}
|
||||
isLarge
|
||||
id={id}
|
||||
>
|
||||
<ModalDialog.Header>
|
||||
<Text isBold={true} fontSize="21px">
|
||||
@ -124,7 +127,7 @@ const RecoverAccessModalDialog: React.FC<IRecoverAccessModalDialogProps> = ({
|
||||
>
|
||||
<TextInput
|
||||
hasError={emailErr}
|
||||
id="e-mail"
|
||||
id="recover-access-modal_email"
|
||||
name="e-mail"
|
||||
type="text"
|
||||
size="base"
|
||||
@ -146,6 +149,7 @@ const RecoverAccessModalDialog: React.FC<IRecoverAccessModalDialogProps> = ({
|
||||
errorMessage={t("Common:RequiredField")}
|
||||
>
|
||||
<Textarea
|
||||
id="recover-access-modal_description"
|
||||
heightScale={false}
|
||||
hasError={descErr}
|
||||
placeholder={t("Common:RecoverDescribeYourProblemPlaceholder")}
|
||||
@ -158,6 +162,7 @@ const RecoverAccessModalDialog: React.FC<IRecoverAccessModalDialogProps> = ({
|
||||
</ModalDialog.Body>
|
||||
<ModalDialog.Footer>
|
||||
<Button
|
||||
id="recover-access-modal_send"
|
||||
className="recover-button-dialog"
|
||||
key="RecoverySendBtn"
|
||||
label={loading ? t("Common:Sending") : t("Common:SendButton")}
|
||||
@ -169,6 +174,7 @@ const RecoverAccessModalDialog: React.FC<IRecoverAccessModalDialogProps> = ({
|
||||
tabIndex={3}
|
||||
/>
|
||||
<Button
|
||||
id="recover-access-modal_cancel"
|
||||
className="recover-button-dialog"
|
||||
key="SendBtn-recover-close"
|
||||
label={t("Common:CancelButton")}
|
||||
|
@ -150,6 +150,24 @@ export const FolderType = Object.freeze({
|
||||
Rooms: 14,
|
||||
Archive: 20,
|
||||
});
|
||||
|
||||
// extends FolderType keys
|
||||
export const FolderNames = Object.freeze({
|
||||
0: "default",
|
||||
1: "common",
|
||||
2: "bunch",
|
||||
3: "trash",
|
||||
5: "personal",
|
||||
6: "share",
|
||||
8: "projects",
|
||||
10: "favorites",
|
||||
11: "recent",
|
||||
12: "templates",
|
||||
13: "privacy",
|
||||
14: "shared",
|
||||
20: "archive",
|
||||
});
|
||||
|
||||
export const ShareAccessRights = Object.freeze({
|
||||
None: 0,
|
||||
FullAccess: 1,
|
||||
|
@ -40,6 +40,7 @@ const CatalogItem = (props) => {
|
||||
onClickBadge,
|
||||
isHeader,
|
||||
isFirstHeader,
|
||||
folderId,
|
||||
} = props;
|
||||
|
||||
const onClickAction = () => {
|
||||
@ -73,7 +74,6 @@ const CatalogItem = (props) => {
|
||||
return (
|
||||
<ColorTheme
|
||||
className={className}
|
||||
id={id}
|
||||
style={style}
|
||||
showText={showText}
|
||||
isEndOfBlock={isEndOfBlock}
|
||||
@ -81,6 +81,7 @@ const CatalogItem = (props) => {
|
||||
themeId={ThemeType.CatalogItem}
|
||||
>
|
||||
<StyledCatalogItemSibling
|
||||
id={folderId}
|
||||
isActive={isActive}
|
||||
isDragging={isDragging}
|
||||
isDragActive={isDragActive}
|
||||
@ -171,6 +172,7 @@ CatalogItem.propTypes = {
|
||||
isHeader: PropTypes.bool,
|
||||
/** Disable margin top for catalog item header */
|
||||
isFirstHeader: PropTypes.bool,
|
||||
folderId: PropTypes.string,
|
||||
};
|
||||
|
||||
CatalogItem.defaultProps = {
|
||||
|
@ -222,6 +222,7 @@ class ContextMenuButton extends React.Component {
|
||||
(item.label || item.icon || item.key) && (
|
||||
<DropDownItem
|
||||
{...item}
|
||||
id={item.key}
|
||||
key={item.key || index}
|
||||
onClick={this.onDropDownItemClick.bind(this, item)}
|
||||
/>
|
||||
|
@ -158,6 +158,7 @@ class IconButton extends React.PureComponent {
|
||||
data-tip={dataTip}
|
||||
data-event="click focus"
|
||||
data-for={id}
|
||||
id={id}
|
||||
style={style}
|
||||
color={this.state.currentIconColor}
|
||||
{...rest}
|
||||
|
@ -63,6 +63,10 @@ class InputBlock extends React.Component {
|
||||
forwardedRef,
|
||||
} = this.props;
|
||||
|
||||
const classNamePassword = `password_eye--${
|
||||
type === "password" ? "close" : "open"
|
||||
}`;
|
||||
|
||||
if (typeof iconSize == "number" && iconSize > 0) {
|
||||
iconButtonSize = iconSize;
|
||||
} else {
|
||||
@ -129,7 +133,7 @@ class InputBlock extends React.Component {
|
||||
//iconNames.includes(iconName) && (
|
||||
<div className="append">
|
||||
<StyledIconBlock
|
||||
className="input-block-icon"
|
||||
className={`input-block-icon ${classNamePassword}`}
|
||||
//isDisabled={isDisabled}
|
||||
onClick={this.onIconClick}
|
||||
isClickable={typeof onIconClick === "function"}
|
||||
|
@ -8,6 +8,7 @@ import { ColorTheme, ThemeType } from "@docspace/common/components/ColorTheme";
|
||||
|
||||
const MainButton = (props) => {
|
||||
const { text, model, isDropdown, isDisabled, clickAction } = props;
|
||||
const { id, ...rest } = props;
|
||||
|
||||
const ref = useRef();
|
||||
const menuRef = useRef(null);
|
||||
@ -39,9 +40,10 @@ const MainButton = (props) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<GroupMainButton {...props} ref={ref}>
|
||||
<GroupMainButton {...rest} ref={ref}>
|
||||
<ColorTheme
|
||||
{...props}
|
||||
{...rest}
|
||||
id={id}
|
||||
onClick={onMainButtonClick}
|
||||
themeId={ThemeType.MainButton}
|
||||
>
|
||||
|
@ -48,12 +48,13 @@ const StyledCloseButtonWrapper = styled.div`
|
||||
|
||||
StyledCloseButtonWrapper.defaultProps = { theme: Base };
|
||||
|
||||
const CloseButton = ({ currentDisplayType, zIndex, onClick }) => {
|
||||
const CloseButton = ({ id, currentDisplayType, zIndex, onClick }) => {
|
||||
return (
|
||||
<StyledCloseButtonWrapper
|
||||
zIndex={zIndex}
|
||||
onClick={onClick}
|
||||
currentDisplayType={currentDisplayType}
|
||||
className="modal-close"
|
||||
>
|
||||
<IconButton
|
||||
size="17px"
|
||||
|
@ -78,6 +78,7 @@ const Modal = ({
|
||||
<CloseButton
|
||||
currentDisplayType={currentDisplayType}
|
||||
onClick={onClose}
|
||||
id={id}
|
||||
/>
|
||||
{isLoading ? (
|
||||
currentDisplayType === "modal" ? (
|
||||
|
@ -367,6 +367,7 @@ class PasswordInput extends React.Component {
|
||||
return (
|
||||
<>
|
||||
<InputBlock
|
||||
id={id}
|
||||
className="input-relative"
|
||||
name={inputName}
|
||||
hasError={hasError}
|
||||
@ -411,12 +412,10 @@ class PasswordInput extends React.Component {
|
||||
style,
|
||||
simpleView,
|
||||
isDisabled,
|
||||
id,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<StyledInput
|
||||
id={id}
|
||||
onValidateInput={onValidateInput}
|
||||
className={className}
|
||||
style={style}
|
||||
|
@ -64,6 +64,7 @@ let newConfig;
|
||||
let documentserverUrl =
|
||||
typeof window !== "undefined" && window?.location?.origin;
|
||||
let userAccessRights = {};
|
||||
let isArchiveFolderRoot = true;
|
||||
|
||||
function Editor({
|
||||
config,
|
||||
@ -93,6 +94,8 @@ function Editor({
|
||||
filesSettings,
|
||||
}) {
|
||||
const fileInfo = config?.file;
|
||||
isArchiveFolderRoot = fileInfo.rootFolderType === FolderType.Archive;
|
||||
|
||||
const { t } = useTranslation(["Editor", "Common"]);
|
||||
|
||||
if (fileInfo) {
|
||||
@ -528,7 +531,7 @@ function Editor({
|
||||
// onRequestSharingSettings = onSDKRequestSharingSettings;
|
||||
// }
|
||||
|
||||
if (userAccessRights.rename) {
|
||||
if (userAccessRights.rename && !isArchiveFolderRoot) {
|
||||
onRequestRename = onSDKRequestRename;
|
||||
}
|
||||
|
||||
@ -542,7 +545,7 @@ function Editor({
|
||||
onRequestCompareFile = onSDKRequestCompareFile;
|
||||
}
|
||||
|
||||
if (userAccessRights.changeVersionHistory) {
|
||||
if (userAccessRights.changeVersionHistory && !isArchiveFolderRoot) {
|
||||
onRequestRestore = onSDKRequestRestore;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ const Login: React.FC<ILoginProps> = ({
|
||||
useEffect(() => {
|
||||
const theme =
|
||||
window.matchMedia &&
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
? Dark
|
||||
: Base;
|
||||
setTheme(theme);
|
||||
@ -108,10 +108,10 @@ const Login: React.FC<ILoginProps> = ({
|
||||
const tokenGetterWin = isDesktopEditor
|
||||
? (window.location.href = url)
|
||||
: window.open(
|
||||
url,
|
||||
"login",
|
||||
"width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no"
|
||||
);
|
||||
url,
|
||||
"login",
|
||||
"width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no"
|
||||
);
|
||||
|
||||
getOAuthToken(tokenGetterWin).then((code: string) => {
|
||||
const token = window.btoa(
|
||||
@ -253,10 +253,12 @@ const Login: React.FC<ILoginProps> = ({
|
||||
onClose={onRecoverDialogVisible}
|
||||
textBody={t("RecoverTextBody")}
|
||||
emailPlaceholderText={t("RecoverContactEmailPlaceholder")}
|
||||
id="recover-access-modal"
|
||||
/>
|
||||
</ColorTheme>
|
||||
{!checkIsSSR() && enabledJoin && (
|
||||
<Register
|
||||
id="login_register"
|
||||
enabledJoin={enabledJoin}
|
||||
currentColorScheme={currentColorScheme}
|
||||
/>
|
||||
|
@ -228,7 +228,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
} //TODO: Add wrong login server error
|
||||
>
|
||||
<EmailInput
|
||||
id="login"
|
||||
id="login_username"
|
||||
name="login"
|
||||
type="email"
|
||||
hasError={isEmailErrorShow}
|
||||
@ -258,7 +258,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
className="password-input"
|
||||
simpleView={true}
|
||||
passwordSettings={settings}
|
||||
id="password"
|
||||
id="login_password"
|
||||
inputName="password"
|
||||
placeholder={t("Common:Password")}
|
||||
type="password"
|
||||
@ -278,7 +278,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
<div className="login-checkbox-wrapper">
|
||||
<div className="remember-wrapper">
|
||||
<Checkbox
|
||||
id="login-checkbox"
|
||||
id="login_remember"
|
||||
className="login-checkbox"
|
||||
isChecked={isChecked}
|
||||
onChange={onChangeCheckbox}
|
||||
@ -286,6 +286,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
helpButton={
|
||||
!checkIsSSR() && (
|
||||
<HelpButton
|
||||
id="login_remember-hint"
|
||||
className="help-button"
|
||||
helpButtonHeaderContent={t("CookieSettingsTitle")}
|
||||
tooltipContent={
|
||||
@ -304,6 +305,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
type="page"
|
||||
isHovered={false}
|
||||
onClick={onClick}
|
||||
id="login_forgot-password-link"
|
||||
>
|
||||
{t("ForgotPassword")}
|
||||
</Link>
|
||||
@ -321,7 +323,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
)}
|
||||
|
||||
<Button
|
||||
id="submit"
|
||||
id="login_submit"
|
||||
className="login-button"
|
||||
primary
|
||||
size="medium"
|
||||
@ -353,6 +355,7 @@ const LoginForm: React.FC<ILoginFormProps> = ({
|
||||
{t("Or")}
|
||||
</Text>
|
||||
<Link
|
||||
id="login_recover-link"
|
||||
fontWeight="600"
|
||||
fontSize="13px"
|
||||
color="#316DAA"
|
||||
|
@ -75,6 +75,7 @@ const ForgotPasswordModalDialog: React.FC<IForgotPasswordDialogProps> = ({
|
||||
modalBodyPadding="12px 0 0 0"
|
||||
asideBodyPadding="16px 0 0 0"
|
||||
onClose={onDialogClose}
|
||||
id="forgot-password-modal"
|
||||
>
|
||||
<ModalDialog.Header>
|
||||
<Text isBold={true} fontSize="21px">
|
||||
@ -105,7 +106,7 @@ const ForgotPasswordModalDialog: React.FC<IForgotPasswordDialogProps> = ({
|
||||
hasError={isShowError && emailError}
|
||||
placeholder={t("Common:RegistrationEmail")}
|
||||
isAutoFocussed={true}
|
||||
id="e-mail"
|
||||
id="forgot-password-modal_email"
|
||||
name="e-mail"
|
||||
type="text"
|
||||
size="base"
|
||||
@ -122,6 +123,7 @@ const ForgotPasswordModalDialog: React.FC<IForgotPasswordDialogProps> = ({
|
||||
</ModalDialog.Body>
|
||||
<ModalDialog.Footer>
|
||||
<Button
|
||||
id="forgot-password-modal_send"
|
||||
className="modal-dialog-button"
|
||||
key="ForgotSendBtn"
|
||||
label={
|
||||
@ -136,6 +138,7 @@ const ForgotPasswordModalDialog: React.FC<IForgotPasswordDialogProps> = ({
|
||||
tabIndex={2}
|
||||
/>
|
||||
<Button
|
||||
id="forgot-password-modal_cancel"
|
||||
className="modal-dialog-button"
|
||||
key="CancelBtn"
|
||||
label={t("Common:CancelButton")}
|
||||
|
@ -17,6 +17,7 @@ interface IRegisterProps {
|
||||
trustedDomains?: string[];
|
||||
theme?: any;
|
||||
currentColorScheme: ITheme;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
const StyledRegister = styled(Box)`
|
||||
@ -43,6 +44,7 @@ const Register: React.FC<IRegisterProps> = (props) => {
|
||||
trustedDomains,
|
||||
theme,
|
||||
currentColorScheme,
|
||||
id,
|
||||
} = props;
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@ -109,7 +111,7 @@ const Register: React.FC<IRegisterProps> = (props) => {
|
||||
|
||||
return enabledJoin && !isAuthenticated ? (
|
||||
<>
|
||||
<StyledRegister onClick={onRegisterClick}>
|
||||
<StyledRegister id={id} onClick={onRegisterClick}>
|
||||
<Text as="span" color={currentColorScheme.accentColor}>
|
||||
{t("Register")}
|
||||
</Text>
|
||||
|
@ -67,6 +67,7 @@ const RegisterModalDialog: React.FC<IRegisterModalDialogProps> = ({
|
||||
|
||||
return (
|
||||
<ModalDialogContainer
|
||||
id="registration-modal"
|
||||
displayType="modal"
|
||||
visible={visible}
|
||||
onClose={onRegisterModalClose}
|
||||
@ -97,7 +98,7 @@ const RegisterModalDialog: React.FC<IRegisterModalDialogProps> = ({
|
||||
hasError={isShowError && emailErr}
|
||||
placeholder={t("Common:RegistrationEmail")}
|
||||
isAutoFocussed={true}
|
||||
id="e-mail"
|
||||
id="registration-modal_email"
|
||||
name="e-mail"
|
||||
type="email"
|
||||
size="base"
|
||||
@ -115,6 +116,7 @@ const RegisterModalDialog: React.FC<IRegisterModalDialogProps> = ({
|
||||
</ModalDialog.Body>
|
||||
<ModalDialog.Footer>
|
||||
<Button
|
||||
id="registration-modal_send"
|
||||
className="modal-dialog-button"
|
||||
key="RegisterSendBtn"
|
||||
label={loading ? t("Common:Sending") : t("RegisterSendButton")}
|
||||
@ -128,6 +130,7 @@ const RegisterModalDialog: React.FC<IRegisterModalDialogProps> = ({
|
||||
/>
|
||||
|
||||
<Button
|
||||
id="registration-modal_cancel"
|
||||
className="modal-dialog-button"
|
||||
key="CancelBtn"
|
||||
label={t("Common:CancelButton")}
|
||||
|
Loading…
Reference in New Issue
Block a user