Merge branch 'develop' of github.com:ONLYOFFICE/DocSpace into feature/new-profile

# Conflicts:
#	packages/client/src/pages/PortalSettings/categories/common/settingsAppearance/preview.js
This commit is contained in:
Viktor Fomin 2022-09-14 01:15:03 +03:00
commit 033259116f
37 changed files with 1174 additions and 651 deletions

View File

@ -70,7 +70,6 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0>: είναι ένας τρόπος για να αλλάξετε τη γλώσσα ολόκληρης της πύλης για όλους τους χρήστες της πύλης και να ρυθμίσετε τη ζώνη ώρας, ώστε όλα τα γεγονότα της πύλης ONLYOFFICE να εμφανίζονται με τη σωστή ημερομηνία και ώρα",
"LanguageTimeSettingsTooltipDescription": "Για να τεθούν σε ισχύ οι παράμετροι που ορίσατε κάντε κλικ στο κουμπί <1>{{save}}</1> στο κάτω μέρος της ενότητας.<3>{{{learnMore}}</3>",
"LocalFile": "Τοπικό αρχείο",
"LogoDark": "Λογότυπο για τη σελίδα Σχετικά/Σύνδεση",
"LogoDocsEditor": "Λογότυπο για την επικεφαλίδα των προγραμμάτων επεξεργασίας",
"LogoFavicon": "Favicon",
"LogoLightSmall": "Λογότυπο για την επικεφαλίδα της πύλης",

View File

@ -9,9 +9,10 @@
"AccessSettings": "Access settings",
"AddAdmins": "Add admins",
"AddAllowedIP": "Add allowed IP address",
"AdditionalResources": "Additional resources",
"AdditionalResourcesDescription": "Choose whether you want to display links to additional resources in DocSpace menu.",
"AddName": "Add Name",
"AddTrustedDomain": "Add trusted domain",
"AdditionalResources": "Additional resources",
"AdminInModules": "Admin in modules",
"AdministratorsAddedSuccessfully": "Administrators added successfully",
"AdministratorsRemovedSuccessfully": "Administrators removed successfully",
@ -44,9 +45,10 @@
"BackupList": "Backup List",
"BackupListWarningText": "If you delete any items from the list, their corresponding files will also be deleted. This action cannot be undone. To delete all the files use the link:",
"Branding": "Branding",
"BrandingSubtitle": "Use this option to provide on-brand experience to your users. These settings will be effective for all of your portals.",
"BrowserNoCanvasSupport": "Your browser does not support the HTML5 canvas tag.",
"BreakpointWarningText": "This section is only available in desktop version",
"BreakpointWarningTextPrompt": "Please use the desktop site to access",
"BrowserNoCanvasSupport": "Your browser does not support the HTML5 canvas tag.",
"ByApp": "By authenticator app",
"BySms": "By sms",
"ChangeLogoButton": "Change Logo",
@ -74,6 +76,7 @@
"DataBackup": "Data backup",
"DeactivateOrDeletePortal": "Deactivate or delete portal.",
"Disabled": "Disabled",
"DocSpaceMenu": "DocSpace menu",
"DocumentsAdministratorsCan": "Documents administrators can link Dropbox, Box, and other accounts to Common Documents and set up access rights in this section",
"DownloadCopy": "Download the copy",
"DownloadReportBtn": "Download and open report",
@ -86,12 +89,15 @@
"EveryDay": "Every day",
"EveryMonth": "Every month",
"EveryWeek": "Every week",
"ForbiddenPageDescription": "To make changes to this section, go to the desktop version.",
"ForbiddenPageHeader": "Section unavailable.",
"ForcePathStyle": "Force Path Style",
"FullAccessTooltip": "Have the same access rights as the portal owner, except the right to:",
"Group": "Group",
"GroupLead": "Group Lead",
"Groups": "Groups",
"Guests": "Guests",
"ImageSizeError": "Image size exceed the allowed parameters",
"IPSecurity": "IP Security",
"IPSecurityDescription": "IP Security is used to restrict login to the portal from all IP addresses except certain addresses.",
"IPSecurityHelper": "You can set the allowed IP addresses using either exact IP addresses in the IPv4 format (#.#.#.#, where # is a numeric value from 0 to 255) or IP range (in the #.#.#.#-#.#.#.# format).",
@ -106,10 +112,13 @@
"LoginHistoryTitle": "Login History",
"LoginLatestText": "Only the latest activity is shown on this page. The data itself is stored during the period specified in the field below (max 180 days).",
"LoginSubheaderTitle": "This subsection is used to monitor the latest user login activity including successful logins and failed attempts with an indication of reasons.",
"LogoDark": "Logo for the About/Login page",
"LogoAbout": "Logo for the About page",
"LogoCompact": "Logo for the compact left menu",
"LogoDocsEditor": "Logo for the editors header",
"LogoDocsEditorEmbedded": "Logo for the editors header - embedded mode",
"LogoFavicon": "Favicon",
"LogoLightSmall": "Logo for the portal header",
"LogoLogin": "Logo for the Login page",
"LogoSettings": "Portal Logo Settings",
"LogoUploadRecommendation": "We recommended that you use images in <1>PNG</1> format with transparent background",
"ManagementCategoryDataManagement": "Data Management",
@ -165,6 +174,10 @@
"SettingPasswordStrength": "Setting password strength",
"SettingPasswordStrengthDescription": "Password Strength Settings is a way to determine the effectiveness of a password in resisting guessing and brute-force attacks.",
"SettingPasswordStrengthHelper": "Use the Minimum Password Length bar to determine how long the password should be. Check the appropriate boxes below to determine the character set that must be used in the password.",
"ShowFeedbackAndSupport": "Show Feedback & Support link",
"ShowSampleDocuments": "Show sample documents in new rooms",
"ShowVideoGuides": "Show link to Video Guides",
"ShowHelpCenter": "Show link to Help Center",
"SingleSignOn": "Single Sign-On",
"StoragePeriod": "Storage period",
"StudioTimeLanguageSettings": "Language and Time Zone Settings",
@ -204,6 +217,9 @@
"UserAgreement": "I confirm and want to proceed",
"Users": "Users",
"WhiteLabel": "White label",
"WhiteLabelSubtitle": "Enter your company name, upload the logo, and customize the styling to match your branding.",
"WhiteLabelHelper": "Use PNG images with a transparent background",
"WhiteLabelTooltip": "The sizes are shown for the Retina displays. For the displays with standard resolutions the logo width and height will be resized accordingly upon upload.",
"YouHaveUnsavedChanges": "You have unsaved changes",
"YourCurrentDomain": "Your current domain"
}

View File

@ -13,8 +13,6 @@
"EmptyFieldErrorMessage": "The field is empty",
"Encryption": "Encryption",
"FirstName": "First Name",
"ForbiddenPageDescription": "To make changes to this section, go to the desktop version.",
"ForbiddenPageHeader": "Section unavailable.",
"GenerateCertificate": "Generate New Self-Signed Certificate",
"Hide": "Hide",
"HideAdditionalParameters": "Hide advanced settings",

View File

@ -70,7 +70,6 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0>կայքէջի բոլոր օգտագործողների համար ամբողջ կայքէջի լեզուն փոխելու և ժամային գոտին այնպես կարգավորելու միջոց է, որպեսզի ONLYOFFICE կայքէջի բոլոր իրադարձությունները ցուցադրվեն ճիշտ ամսաթվով և ժամով:",
"LanguageTimeSettingsTooltipDescription": "Ձեր սահմանած պարամետրերը ուժի մեջ մտնելու համար սեղմեք կոճակը<1>{{save}}</1> կոճակը հատվածի ներքևում:<3>{{learnMore}}</3>",
"LocalFile": "Տեղական ֆայլ",
"LogoDark": "Մասին/Մուտք էջի լոգոն",
"LogoDocsEditor": "Էջագլխի խմբագրիչների լոգո",
"LogoFavicon": "Favicon",
"LogoLightSmall": "Լոգո կայքէջի էջագլուխի համար",

View File

@ -70,7 +70,6 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0>은 모든 포털 사용자에 대해 전체 포털의 언어를 변경하고 ONLYOFFICE 포털의 모든 이벤트가 올바른 날짜 및 시각으로 표시되도록 시간대를 구성하는 방법입니다.",
"LanguageTimeSettingsTooltipDescription": "설정한 매개변수를 적용하려면, 섹션 하단의 <1>{{save}}</1> 버큰을 클릭하세요.<3>{{learnMore}}</3>",
"LocalFile": "로컬 파일",
"LogoDark": "소개/로그인 페이지 로고",
"LogoDocsEditor": "편집기 헤더 로고",
"LogoFavicon": "파비콘",
"LogoLightSmall": "포털 헤더 로고",

View File

@ -68,7 +68,6 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0> ແມ່ນວິທີທີ່ຈະປ່ຽນພາສາຂອງປະຕູທັງໝົດສຳລັບຜູ້ໃຊ້ປະຕູທັງໝົດ ແລະກຳນົດເຂດເວລາເພື່ອໃຫ້ເຫດການທັງໝົດຂອງ ປະຕູ ONLYOFFICE ຈະຖືກສະແດງດ້ວຍວັນທີທີ່ຖືກຕ້ອງ. ແລະເວລາ.",
"LanguageTimeSettingsTooltipDescription": "ເພື່ອເຮັດໃຫ້ພາລາມິເຕີທີ່ທ່ານຕັ້ງມີຜົນບັງຄັບໃຊ້, ໃຫ້ຄລິກໃສ່ປຸ່ມ <1>{{save}}</1> ຢູ່ລຸ່ມສຸດຂອງພາກສ່ວນ.<3>{{ learnMore }}</3>",
"LocalFile": "ທ້ອງຖິ່ນ ໄຟລ",
"LogoDark": "ໂລໂກກ່ຽວກັບ/ການເຂົ້າສູ່ຫນ້າ",
"LogoDocsEditor": "ໂລໂກສຳລັບແກ້ໄຂສ່ວນຫົວ",
"LogoFavicon": "Favicon",
"LogoLightSmall": "ໂລໂກສຳລັບແກ້ໄຂສ່ວນຫົວຂອງ portal ",

View File

@ -70,7 +70,6 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0> permite alterar o idioma do portal para todos os utilizadores e configurar a zona de tempo, para que todos os eventos do portal ONLYOFFICE sejam mostrados com a data e hora corretas.",
"LanguageTimeSettingsTooltipDescription": "Para confirmar use o botão <1>{{save}}</1> na parte inferior da secção.<3>{{learnMore}}</3>",
"LocalFile": "Ficheiro local",
"LogoDark": "Logotipo para a página Acerca/Acesso",
"LogoDocsEditor": "Logotipo para o cabeçalho dos editores",
"LogoFavicon": "Favicon",
"LogoLightSmall": "Logo para o cabeçalho do Portal",

View File

@ -70,7 +70,6 @@
"LanguageTimeSettingsTooltip": "<0>{{text}}</0> este modul de a schimba limba portalului pentru toți utilizatorii portalului și de a configura fusul orar pentru că ora și data evenimentelor de pe portal ONLYOFFICE este afișată corect.",
"LanguageTimeSettingsTooltipDescription": "Pentru că setările actualizate să intre în vigoare, faceți clic pe butonul <1>{{save}}</1> în partea de jos a secțiunii.<3>{{learnMore}}</3>",
"LocalFile": "Fișierul local",
"LogoDark": "Logo-ul pentru pagina Despre și pagina de Autentificare",
"LogoDocsEditor": "Logo-ul pentru antetul aplicațiilor de editare",
"LogoFavicon": "Favicon",
"LogoLightSmall": "Logo-ul pentru antetul portalului",

View File

@ -76,6 +76,8 @@
"EveryDay": "Каждый день",
"EveryMonth": "Каждый месяц",
"EveryWeek": "Каждую неделю",
"ForbiddenPageDescription": "Для внесения изменений в данный раздел, перейдите в десктопную версию.",
"ForbiddenPageHeader": "Раздел недоступен.",
"ForcePathStyle": "Принудительно использовать стиль пути",
"FullAccessTooltip": "Имеет те же права доступа, что и владелец портала, за исключением права:",
"Group": "Группа",

View File

@ -12,8 +12,6 @@
"EmptyFieldErrorMessage": "Поле не заполнено",
"Encryption": "Шифрование",
"FirstName": "Имя",
"ForbiddenPageDescription": "Для внесения изменений в данный раздел, перейдите в десктопную версию.",
"ForbiddenPageHeader": "Раздел недоступен.",
"GenerateCertificate": "Сгенерировать новый самоподписанный сертификат ",
"Hide": "Скрыть",
"HideAdditionalParameters": "Скрыть дополнительные параметры",

View File

@ -15,6 +15,7 @@ const PureAccountsItem = ({
setSelectedFolder,
selectedTreeNode,
setSelectedNode,
toggleArticleOpen,
history,
t,
}) => {
@ -26,6 +27,7 @@ const PureAccountsItem = ({
history.push(
combineUrl(AppServerConfig.proxyURL, config.homepage, "/accounts")
);
toggleArticleOpen();
}, [setSelectedFolder, setSelectedNode, history]);
const isActive = selectedTreeNode[0] === "accounts";
@ -50,10 +52,13 @@ const AccountsItem = withTranslation(["FilesSettings", "Common"])(
export default inject(({ auth, treeFoldersStore, selectedFolderStore }) => {
const { setSelectedFolder } = selectedFolderStore;
const { selectedTreeNode, setSelectedNode } = treeFoldersStore;
const { toggleArticleOpen, showText } = auth.settingsStore;
return {
showText: auth.settingsStore.showText,
showText,
setSelectedFolder,
selectedTreeNode,
setSelectedNode,
toggleArticleOpen,
};
})(observer(AccountsItem));

View File

@ -52,7 +52,6 @@ const StyledPeopleRow = styled(TableRow)`
.table-container_row-checkbox-wrapper {
padding-right: 0px;
padding-left: 4px;
min-width: 48px;
.table-container_row-checkbox {

View File

@ -1,15 +1,11 @@
import React, { useCallback, useMemo } from "react";
import React, { useCallback } from "react";
import { inject, observer } from "mobx-react";
import { withTranslation } from "react-i18next";
import { isMobile, isMobileOnly } from "react-device-detect";
import styled, { css } from "styled-components";
import { withRouter } from "react-router";
import Headline from "@docspace/common/components/Headline";
import Loaders from "@docspace/common/components/Loaders";
import { AppServerConfig } from "@docspace/common/constants";
import { combineUrl } from "@docspace/common/utils";
import DropDownItem from "@docspace/components/drop-down-item";
import ContextMenuButton from "@docspace/components/context-menu-button";
import {
@ -19,38 +15,14 @@ import {
isMobile as isMobileUtils,
isDesktop,
} from "@docspace/components/utils/device";
import { Consumer } from "@docspace/components/utils/context";
import TableGroupMenu from "@docspace/components/table-container/TableGroupMenu";
import { Base } from "@docspace/components/themes";
import IconButton from "@docspace/components/icon-button";
import toastr from "@docspace/components/toast/toastr";
import withPeopleLoader from "SRC_DIR/HOCs/withPeopleLoader";
import config from "PACKAGE_FILE";
const StyledContainer = styled.div`
width: 100%;
height: 69px;
@media ${tablet} {
height: 61px;
}
${isMobile &&
css`
height: 61px;
`}
@media ${mobile} {
height: 53px;
}
${isMobileOnly &&
css`
height: 53px;
`}
.group-button-menu-container {
margin: 0 0 0 -20px;
@ -110,6 +82,7 @@ const StyledContainer = styled.div`
line-height: 24px;
@media ${tablet} {
font-size: 21px;
line-height: 28px;
}
@ -162,8 +135,6 @@ const StyledInfoPanelToggleWrapper = styled.div`
align-items: center;
justify-content: center;
margin-bottom: 2px;
.info-panel-toggle-bg {
height: 32px;
width: 32px;
@ -176,27 +147,19 @@ const StyledInfoPanelToggleWrapper = styled.div`
const SectionHeaderContent = (props) => {
const {
t,
isHeaderVisible,
isHeaderIndeterminate,
isHeaderChecked,
t,
isLoaded,
isTabletView,
setSelected,
getHeaderMenu,
showText,
cbMenuItems,
getCheckboxItemLabel,
setInfoPanelVisible,
isInfoPanelVisible,
} = props;
//console.log("SectionHeaderContent render", props.isTabletView);
//console.log("SectionHeaderContent render");
const onChange = (checked) => {
setSelected(checked ? "all" : "none");
@ -210,13 +173,6 @@ const SectionHeaderContent = (props) => {
[setSelected]
);
const onSelectorSelect = useCallback(
(item) => {
setSelected(item.key);
},
[onSelect]
);
const getMenuItems = () => {
const checkboxOptions = (
<>
@ -296,100 +252,72 @@ const SectionHeaderContent = (props) => {
};
return (
<Consumer>
{(context) => (
<StyledContainer
isHeaderVisible={isHeaderVisible}
isLoaded={isLoaded}
width={context.sectionWidth}
isTabletView={isTabletView}
showText={showText}
>
{isHeaderVisible ? (
<div className="group-button-menu-container">
<TableGroupMenu
checkboxOptions={getMenuItems()}
onChange={onChange}
isChecked={isHeaderChecked}
isIndeterminate={isHeaderIndeterminate}
headerMenu={headerMenu}
withoutInfoPanelToggler={true}
/>
</div>
) : (
<div className="header-container">
<>
<Headline
className="headline-header"
type="content"
truncate={true}
>
{t("Accounts")}
</Headline>
<ContextMenuButton
className="action-button"
directionX="left"
title={t("Common:Actions")}
iconName="images/plus.svg"
size={17}
getData={getContextOptions}
isDisabled={false}
/>
{!isInfoPanelVisible && (
<StyledInfoPanelToggleWrapper>
{!(
isTablet() ||
isMobile ||
isMobileUtils() ||
!isDesktop()
) && (
<div className="info-panel-toggle-bg">
<IconButton
className="info-panel-toggle"
iconName="images/panel.react.svg"
size="16"
isFill={true}
onClick={setInfoPanelVisible}
/>
</div>
)}
</StyledInfoPanelToggleWrapper>
<StyledContainer>
{isHeaderVisible ? (
<div className="group-button-menu-container">
<TableGroupMenu
checkboxOptions={getMenuItems()}
onChange={onChange}
isChecked={isHeaderChecked}
isIndeterminate={isHeaderIndeterminate}
headerMenu={headerMenu}
withoutInfoPanelToggler={true}
/>
</div>
) : (
<div className="header-container">
<>
<Headline
className="headline-header"
type="content"
truncate={true}
>
{t("Accounts")}
</Headline>
<ContextMenuButton
className="action-button"
directionX="left"
title={t("Common:Actions")}
iconName="images/plus.svg"
size={15}
getData={getContextOptions}
isDisabled={false}
/>
{!isInfoPanelVisible && (
<StyledInfoPanelToggleWrapper>
{!(
isTablet() ||
isMobile ||
isMobileUtils() ||
!isDesktop()
) && (
<div className="info-panel-toggle-bg">
<IconButton
className="info-panel-toggle"
iconName="images/panel.react.svg"
size="16"
isFill={true}
onClick={setInfoPanelVisible}
/>
</div>
)}
</>
</div>
)}
</StyledContainer>
</StyledInfoPanelToggleWrapper>
)}
</>
</div>
)}
</Consumer>
</StyledContainer>
);
};
export default withRouter(
inject(({ auth, peopleStore }) => {
const { settingsStore, isLoaded, isAdmin } = auth;
const { customNames, isTabletView, showText } = settingsStore;
const {
setVisible: setInfoPanelVisible,
isVisible: isInfoPanelVisible,
} = auth.infoPanelStore;
const {
resetFilter,
usersStore,
selectionStore,
headerMenuStore,
groupsStore,
selectedGroupStore,
getHeaderMenu,
dialogStore,
} = peopleStore;
const { getUsersList, removeUser } = usersStore;
const {
setSelected,
selectByStatus,
clearSelection,
selectAll,
} = selectionStore;
const { selectionStore, headerMenuStore, getHeaderMenu } = peopleStore;
const {
isHeaderVisible,
@ -398,31 +326,15 @@ export default withRouter(
cbMenuItems,
getCheckboxItemLabel,
} = headerMenuStore;
const { deleteGroup } = groupsStore;
const { group } = selectedGroupStore;
const { setInvitationDialogVisible } = dialogStore;
const { setSelected } = selectionStore;
return {
resetFilter,
customNames,
homepage: config.homepage,
isLoaded,
isAdmin,
fetchPeople: getUsersList,
setSelected,
selectByStatus,
isHeaderVisible,
isHeaderIndeterminate,
isHeaderChecked,
clearSelection,
selectAll,
deleteGroup,
removeUser,
group,
isTabletView,
getHeaderMenu,
setInvitationDialogVisible,
showText,
cbMenuItems,
getCheckboxItemLabel,
setInfoPanelVisible,

View File

@ -27,25 +27,6 @@ import { getMainButtonItems } from "SRC_DIR/helpers/plugins";
const StyledContainer = styled.div`
width: 100%;
height: 69px;
@media ${tablet} {
height: 61px;
}
${isMobile &&
css`
height: 61px;
`}
@media ${mobile} {
height: 53px;
}
${isMobileOnly &&
css`
height: 53px;
`}
.table-container_group-menu {
margin: 0 0 0 -20px;
@ -119,8 +100,7 @@ class SectionHeaderContent extends React.Component {
createForm = () => this.onCreate("docxf");
createFormFromFile = () => {
const { setSelectFileDialogVisible } = this.props;
setSelectFileDialogVisible(true);
this.props.setSelectFileDialogVisible(true);
};
onShowGallery = () => {
@ -478,7 +458,6 @@ class SectionHeaderContent extends React.Component {
personal,
navigationPath,
getHeaderMenu,
viewAs,
isRecycleBinFolder,
isEmptyFilesList,
isHeaderVisible,
@ -494,17 +473,7 @@ class SectionHeaderContent extends React.Component {
return (
<Consumer>
{(context) => (
<StyledContainer
width={context.sectionWidth}
isRootFolder={isRootFolder}
canCreate={canCreate}
isRecycleBinFolder={isRecycleBinFolder}
isTitle={title}
isDesktop={isDesktop}
isTabletView={isTabletView}
isLoading={isLoading}
viewAs={viewAs}
>
<StyledContainer>
{isHeaderVisible ? (
<TableGroupMenu
checkboxOptions={menuItems}
@ -569,8 +538,6 @@ export default inject(
}) => {
const {
setSelected,
setSelection,
canCreate,
isHeaderVisible,
isHeaderIndeterminate,
@ -581,7 +548,6 @@ export default inject(
isEmptyFilesList,
getFolderInfo,
setBufferSelection,
viewAs,
setIsLoading,
fetchFiles,
fetchRooms,
@ -601,14 +567,12 @@ export default inject(
setEmptyTrashDialogVisible,
setSelectFileDialogVisible,
setIsFolderActions,
setCreateRoomDialogVisible,
} = dialogsStore;
const {
isRecycleBinFolder,
isPrivacyFolder,
isRoomsFolder,
isArchiveFolder,
} = treeFoldersStore;
const {
deleteAction,
@ -623,7 +587,6 @@ export default inject(
title,
id,
roomType,
rootFolderType,
pathParts,
navigationPath,
} = selectedFolderStore;
@ -638,7 +601,6 @@ export default inject(
isRootFolder: pathParts?.length === 1,
title,
isRoom,
rootFolderType,
currentFolderId: id,
pathParts: pathParts,
navigationPath: navigationPath,
@ -657,7 +619,6 @@ export default inject(
getFolderInfo,
setSelected,
setSelection,
setSharingPanelVisible,
setMoveToPanelVisible,
@ -671,13 +632,11 @@ export default inject(
backToParentFolder,
getCheckboxItemLabel,
setSelectFileDialogVisible,
setCreateRoomDialogVisible,
isRecycleBinFolder,
setEmptyTrashDialogVisible,
isEmptyFilesList,
isPrivacyFolder,
viewAs,
setIsLoading,
fetchFiles,
@ -687,7 +646,6 @@ export default inject(
activeFolders,
isRoomsFolder,
isArchiveFolder,
setAlreadyFetchingRooms,

View File

@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next";
import EmptyScreenContainer from "@docspace/components/empty-screen-container";
const ForbiddenPage = () => {
const { t } = useTranslation("SingleSignOn");
const { t } = useTranslation("Settings");
return (
<EmptyScreenContainer

View File

@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
import { withTranslation } from "react-i18next";
import { inject, observer } from "mobx-react";
import { isDesktop } from "react-device-detect";
import withLoading from "SRC_DIR/HOCs/withLoading";
import Whitelabel from "./settingsBranding/whitelabel";
@ -9,7 +10,10 @@ import CompanyInfoSettings from "./settingsBranding/companyInfoSettings";
import styled from "styled-components";
import AdditionalResources from "./settingsBranding/additionalResources";
import ForbiddenPage from "../ForbiddenPage";
const StyledComponent = styled.div`
max-width: 700px;
width: 100%;
font-weight: 400;
font-size: 13px;
@ -27,11 +31,6 @@ const StyledComponent = styled.div`
.settings-block {
max-width: 433px;
padding-bottom: 32px;
}
.save-cancel-buttons {
padding-bottom: 24px;
}
.section-description {
@ -39,18 +38,29 @@ const StyledComponent = styled.div`
line-height: 20px;
padding-bottom: 20px;
}
hr {
margin: 24px 0;
border: none;
border-top: 1px solid #eceef1;
}
`;
const Branding = (props) => {
const [isPortalPaid, setIsPortalPaid] = useState(true);
if (!isDesktop) return <ForbiddenPage />;
return (
<StyledComponent>
<Whitelabel />
<Whitelabel isPortalPaid={isPortalPaid} />
<hr />
<div className="section-description">
Specify your company information, add links to external resources, and
email addresses displayed within the online office interface.
</div>
<CompanyInfoSettings />
<AdditionalResources />
<CompanyInfoSettings isPortalPaid={isPortalPaid} />
<AdditionalResources isPortalPaid={isPortalPaid} />
</StyledComponent>
);
};

View File

@ -9,11 +9,13 @@ import {
StyledFloatingButton,
IconBox,
} from "./StyledPreview";
import { withTranslation } from "react-i18next";
import ButtonPlusIcon from "../../../../../../../../public/images/actions.button.plus.react.svg";
const Preview = (props) => {
const {
t,
selectAccentColor,
themePreview,
selectThemeId,

View File

@ -1,56 +1,231 @@
import React from "react";
import React, { useState, useEffect } from "react";
import { withTranslation } from "react-i18next";
import SaveCancelButtons from "@docspace/components/save-cancel-buttons";
import { inject, observer } from "mobx-react";
import withLoading from "SRC_DIR/HOCs/withLoading";
import styled from "styled-components";
import Checkbox from "@docspace/components/checkbox";
import toastr from "@docspace/components/toast/toastr";
import LoaderAdditionalResources from "../sub-components/loaderAdditionalResources";
import isEqual from "lodash/isEqual";
const StyledComponent = styled.div`
margin-top: 40px;
.branding-checkbox {
padding-bottom: 16px;
display: flex;
flex-direction: column;
gap: 18px;
margin-bottom: 24px;
}
.additional-header {
padding-bottom: 2px;
}
.additional-description {
padding-bottom: 1px;
}
.description {
color: ${(props) => !props.isPortalPaid && "#A3A9AE"};
}
.save-cancel-buttons {
margin-top: 24px;
}
.checkbox {
width: max-content;
margin-right: 9px;
}
`;
const AdditionalResources = (props) => {
const { t } = props;
const {
t,
tReady,
isPortalPaid,
getAdditionalResources,
setAdditionalResources,
restoreAdditionalResources,
additionalResourcesData,
setIsLoadedAdditionalResources,
isLoadedAdditionalResources,
} = props;
const [feedbackAndSupportEnabled, setShowFeedback] = useState(
additionalResourcesData.feedbackAndSupportEnabled
);
const [videoGuidesEnabled, setShowVideoGuides] = useState(
additionalResourcesData.videoGuidesEnabled
);
const [helpCenterEnabled, setShowHelpCenter] = useState(
additionalResourcesData.helpCenterEnabled
);
const [hasChange, setHasChange] = useState(false);
const [hasChangesDefaultSettings, setHasChangesDefaultSettings] = useState(
false
);
const defaultAdditionalResources = JSON.parse(
localStorage.getItem("defaultAdditionalResources")
);
useEffect(() => {
setShowFeedback(additionalResourcesData.feedbackAndSupportEnabled);
setShowVideoGuides(additionalResourcesData.videoGuidesEnabled);
setShowHelpCenter(additionalResourcesData.helpCenterEnabled);
}, [additionalResourcesData]);
useEffect(() => {
const settings = {
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled,
};
const hasСhange = !_.isEqual(settings, additionalResourcesData);
const hasСhangeDefaul = !_.isEqual(settings, defaultAdditionalResources);
if (hasСhange) {
setHasChange(true);
} else {
setHasChange(false);
}
if (hasСhangeDefaul) {
setHasChangesDefaultSettings(true);
} else {
setHasChangesDefaultSettings(false);
}
}, [
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled,
additionalResourcesData,
defaultAdditionalResources,
]);
useEffect(() => {
if (!(additionalResourcesData && tReady)) return;
setIsLoadedAdditionalResources(true);
}, [additionalResourcesData, tReady]);
const onSave = () => {
setAdditionalResources(
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled
)
.then(() => {
toastr.success(t("Settings:SuccessfullySaveSettingsMessage"));
getAdditionalResources();
if (!localStorage.getItem("isFirstAdditionalResources")) {
localStorage.setItem("isFirstAdditionalResources", true);
setIsFirstAdditionalResources("true");
}
})
.catch((error) => {
toastr.error(error);
});
};
const onRestore = () => {
restoreAdditionalResources()
.then(() => {
toastr.success(t("Settings:SuccessfullySaveSettingsMessage"));
getAdditionalResources();
})
.catch((error) => {
toastr.error(error);
});
};
if (!isLoadedAdditionalResources) return <LoaderAdditionalResources />;
return (
<StyledComponent>
<div className="header">Additional resources</div>
<div className="description">
Choose whether you want to display links to additional resources in
Portal modules and sample files in Documents module.
</div>
<div className="settings-block">
<Checkbox
className="branding-checkbox"
label="Show Feedback & Support link"
<>
<StyledComponent isPortalPaid={isPortalPaid}>
<div className="header">
<div className="additional-header">
{t("Settings:AdditionalResources")}
</div>
</div>
<div className="description additional-description">
<div className="additional-description">
{t("Settings:AdditionalResourcesDescription")}
</div>
</div>
<div className="branding-checkbox">
<Checkbox
className="checkbox"
isDisabled={!isPortalPaid}
label={t("ShowFeedbackAndSupport")}
isChecked={feedbackAndSupportEnabled}
onChange={() => setShowFeedback(!feedbackAndSupportEnabled)}
/>
<Checkbox
className="checkbox"
isDisabled={!isPortalPaid}
label={t("ShowVideoGuides")}
isChecked={videoGuidesEnabled}
onChange={() => setShowVideoGuides(!videoGuidesEnabled)}
/>
<Checkbox
className="checkbox"
isDisabled={!isPortalPaid}
label={t("ShowHelpCenter")}
isChecked={helpCenterEnabled}
onChange={() => setShowHelpCenter(!helpCenterEnabled)}
/>
</div>
<SaveCancelButtons
onSaveClick={onSave}
onCancelClick={onRestore}
saveButtonLabel={t("Common:SaveButton")}
cancelButtonLabel={t("Settings:RestoreDefaultButton")}
displaySettings={true}
showReminder={isPortalPaid && hasChange}
disableRestoreToDefault={!hasChangesDefaultSettings}
/>
<Checkbox className="branding-checkbox" label="Show sample documents" />
<Checkbox
className="branding-checkbox"
label="Show link to Video Guides"
/>
<Checkbox
className="branding-checkbox"
label="Show link to Help Center"
/>
</div>
<SaveCancelButtons
id="buttonsCompanyInfoSettings"
className="save-cancel-buttons"
// onSaveClick={onSavePortalRename}
// onCancelClick={onCancelPortalName}
saveButtonLabel={t("Common:SaveButton")}
cancelButtonLabel={t("Settings:RestoreDefaultButton")}
displaySettings={true}
// hasScroll={hasScroll}
/>
</StyledComponent>
</StyledComponent>
</>
);
};
export default inject(({ auth, setup, common }) => {})(
export default inject(({ auth, common }) => {
const { settingsStore } = auth;
const {
setIsLoadedAdditionalResources,
isLoadedAdditionalResources,
} = common;
const {
getAdditionalResources,
setAdditionalResources,
restoreAdditionalResources,
additionalResourcesData,
} = settingsStore;
return {
getAdditionalResources,
setAdditionalResources,
restoreAdditionalResources,
additionalResourcesData,
setIsLoadedAdditionalResources,
isLoadedAdditionalResources,
};
})(
withLoading(
withTranslation(["Settings", "Common"])(observer(AdditionalResources))
)

View File

@ -9,10 +9,20 @@ import { inject, observer } from "mobx-react";
import withLoading from "SRC_DIR/HOCs/withLoading";
import styled from "styled-components";
const StyledComponent = styled.div``;
const StyledComponent = styled.div`
.save-cancel-buttons {
margin-top: 8px;
}
`;
const CompanyInfoSettings = (props) => {
const { t } = props;
const { t, isPortalPaid } = props;
const [companyName, setCompanyName] = useState("");
const [email, setEmail] = useState("");
const [phone, setPhone] = useState("");
const [website, setWebsite] = useState("");
const [address, setAddress] = useState("");
return (
<StyledComponent>
<div className="header">Company info settings</div>
@ -23,49 +33,79 @@ const CompanyInfoSettings = (props) => {
<FieldContainer
id="fieldContainerCompanyName"
className="field-container-width"
labelText="Company name:"
labelText={t("Common:CompanyName")}
isVertical={true}
>
<TextInput id="textInputContainerCompanyName" scale={true} />
<TextInput
id="textInputContainerCompanyName"
isDisabled={!isPortalPaid}
scale={true}
value={companyName}
onChange={(e) => setCompanyName(e.target.value)}
/>
</FieldContainer>
<FieldContainer
id="fieldContainerEmail"
isDisabled={!isPortalPaid}
className="field-container-width"
labelText="Email:"
labelText={t("Common:Email")}
isVertical={true}
>
<TextInput id="textInputContainerEmail" scale={true} />
<TextInput
id="textInputContainerEmail"
isDisabled={!isPortalPaid}
scale={true}
value={email}
onChange={(e) => setEmail(e.target.value)}
/>
</FieldContainer>
<FieldContainer
id="fieldContainerPhone"
className="field-container-width"
labelText="Phone:"
labelText={t("Common:Phone")}
isVertical={true}
>
<TextInput id="textInputContainerPhone" scale={true} />
<TextInput
id="textInputContainerPhone"
isDisabled={!isPortalPaid}
scale={true}
value={phone}
onChange={(e) => setPhone(e.target.value)}
/>
</FieldContainer>
<FieldContainer
id="fieldContainerWebsite"
className="field-container-width"
labelText="Website:"
labelText={t("Common:Website")}
isVertical={true}
>
<TextInput id="textInputContainerWebsite" scale={true} />
<TextInput
id="textInputContainerWebsite"
isDisabled={!isPortalPaid}
scale={true}
value={website}
onChange={(e) => setWebsite(e.target.value)}
/>
</FieldContainer>
<FieldContainer
id="fieldContainerAddress"
className="field-container-width"
labelText="Address:"
labelText={t("Common:Address")}
isVertical={true}
>
<TextInput id="textInputContainerAddress" scale={true} />
<TextInput
id="textInputContainerAddress"
isDisabled={!isPortalPaid}
scale={true}
value={address}
onChange={(e) => setAddress(e.target.value)}
/>
</FieldContainer>
</div>
<SaveCancelButtons
id="buttonsCompanyInfoSettings"
className="save-cancel-buttons"
// onSaveClick={onSavePortalRename}
// onCancelClick={onCancelPortalName}
onSaveClick={() => console.log("click")}
onCancelClick={() => console.log("click")}
saveButtonLabel={t("Common:SaveButton")}
cancelButtonLabel={t("Settings:RestoreDefaultButton")}
displaySettings={true}

View File

@ -0,0 +1,82 @@
import React from "react";
import Loaders from "@docspace/common/components/Loaders";
import styled from "styled-components";
const StyledLoader = styled.div`
margin-top: 40px;
.item {
padding-bottom: 15px;
}
.loader-header {
display: block;
}
.flex {
display: flex;
align-items: center;
}
.checkbox {
padding-right: 8px;
}
.button {
padding-top: 10px;
}
.save {
padding-right: 8px;
}
`;
const LoaderAdditionalResources = () => {
return (
<StyledLoader>
<div className="item">
<Loaders.Rectangle
width="166px"
height="22px"
className="loader-header"
/>
</div>
<div className="item">
<Loaders.Rectangle
width="700px"
height="20px"
className="loader-description"
/>
</div>
<div className="item">
<div className="flex">
<Loaders.Rectangle width="16px" height="16px" className="checkbox" />
<Loaders.Rectangle width="166px" height="20px" />
</div>
</div>
<div className="item">
<div className="flex">
<Loaders.Rectangle width="16px" height="16px" className="checkbox" />
<Loaders.Rectangle width="150px" height="20px" />
</div>
</div>
<div className="item">
<div className="flex">
<Loaders.Rectangle width="16px" height="16px" className="checkbox" />
<Loaders.Rectangle width="157px" height="20px" />
</div>
</div>
<div className="button">
<Loaders.Rectangle width="86px" height="32px" className="save" />
<Loaders.Rectangle width="170px" height="32px" />
</div>
</StyledLoader>
);
};
export default LoaderAdditionalResources;

View File

@ -0,0 +1,32 @@
import React from "react";
import Loaders from "@docspace/common/components/Loaders";
import styled from "styled-components";
const StyledLoader = styled.div`
display: flex;
flex-direction: column;
gap: 0px;
.description {
max-width: 700px;
}
.header {
margin-bottom: 8px;
}
.text-input {
margin: 12px 0;
}
`;
const LoaderWhiteLabel = () => {
return (
<StyledLoader>
<Loaders.Rectangle height="20px" className="description" />
<Loaders.Rectangle height="22px" width="95px" className="header" />
<Loaders.Rectangle height="16px" className="description" />
<Loaders.Rectangle height="20px" width="291px" />
<Loaders.Rectangle height="32px" width="350px" className="text-input" />
</StyledLoader>
);
};
export default LoaderWhiteLabel;

View File

@ -7,7 +7,6 @@ import Box from "@docspace/components/box";
import Certificates from "./Certificates";
import FieldMapping from "./FieldMapping";
import ForbiddenPage from "./sub-components/ForbiddenPage";
import HideButton from "./sub-components/HideButton";
import IdpSettings from "./IdpSettings";
import ProviderMetadata from "./ProviderMetadata";
@ -16,6 +15,8 @@ import StyledSettingsSeparator from "SRC_DIR/pages/PortalSettings/StyledSettings
import SubmitResetButtons from "./SubmitButton";
import ToggleSSO from "./sub-components/ToggleSSO";
import ForbiddenPage from "../../ForbiddenPage";
const SingleSignOn = (props) => {
const { load, serviceProviderSettings, spMetadata } = props;
const { t } = useTranslation("SingleSignOn");

View File

@ -21,6 +21,7 @@ class CommonStore {
isLoadedCustomization = false;
isLoadedCustomizationNavbar = false;
isLoadedWelcomePageSettings = false;
isLoadedAdditionalResources = false;
constructor() {
this.authStore = authStore;
@ -130,6 +131,12 @@ class CommonStore {
});
};
setIsLoadedAdditionalResources = (isLoadedAdditionalResources) => {
runInAction(() => {
this.isLoadedAdditionalResources = isLoadedAdditionalResources;
});
};
setIsLoaded = (isLoaded) => {
this.isLoaded = isLoaded;
};

View File

@ -217,7 +217,40 @@ class ProfileActionsStore {
}
}
return actions;
return this.checkEnabledActions(actions);
};
checkEnabledActions = (actions) => {
const actionsArray = actions;
const feedbackAndSupportEnabled = this.authStore.settingsStore
.additionalResourcesData.feedbackAndSupportEnabled;
const videoGuidesEnabled = this.authStore.settingsStore
.additionalResourcesData.videoGuidesEnabled;
const helpCenterEnabled = this.authStore.settingsStore
.additionalResourcesData.helpCenterEnabled;
if (!feedbackAndSupportEnabled) {
const index = actionsArray.findIndex((item) => item.key === "SupportBtn");
actionsArray.splice(index, 1);
}
if (!videoGuidesEnabled) {
const index = actionsArray.findIndex((item) => item.key === "VideoBtn");
actionsArray.splice(index, 1);
}
if (!helpCenterEnabled) {
const index = actionsArray.findIndex(
(item) => item.key === "HelpCenterBtn"
);
actionsArray.splice(index, 1);
}
return actionsArray;
};
}

View File

@ -224,6 +224,40 @@ export function getCustomSchemaList() {
});
}
export function setAdditionalResources(
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled
) {
const data = {
settings: {
helpCenterEnabled,
feedbackAndSupportEnabled,
videoGuidesEnabled,
},
};
return request({
method: "post",
url: `/settings/rebranding/additional.json`,
data,
});
}
export function getAdditionalResources() {
return request({
method: "get",
url: `/settings/rebranding/additional.json`,
});
}
export function restoreAdditionalResources() {
return request({
method: "delete",
url: `/settings/rebranding/additional.json`,
});
}
export function setCurrentSchema(id) {
return request({
method: "post",

View File

@ -116,9 +116,8 @@ StyledArticle.defaultProps = { theme: Base };
const StyledArticleHeader = styled.div`
height: 24px;
padding: 22px 20px 23px;
margin-left: -1px;
padding: 24px 21px 21px 20px;
margin: 0;
display: flex;
justify-content: flex-start;
align-items: center;

View File

@ -4,7 +4,7 @@ import styled from "styled-components";
const StyledContainer = styled.div`
width: 211px;
margin: -9px 0 0;
margin: 0;
@media ${tablet} {
display: none;

View File

@ -26,8 +26,6 @@ const StyledTextContainer = styled.div`
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-bottom: ${(props) => !props.isOpen && "2px"};
`;
const StyledHeading = styled(Heading)`

View File

@ -1,43 +1,10 @@
import React from "react";
import styled, { css } from "styled-components";
import ContextMenuButton from "@docspace/components/context-menu-button";
import IconButton from "@docspace/components/icon-button";
import { isMobile } from "react-device-detect";
import { tablet } from "@docspace/components/utils/device";
import { Base } from "@docspace/components/themes";
const StyledContainer = styled.div`
margin-left: 20px;
display: flex;
align-items: center;
height: 32px;
.add-button {
margin-right: 16px;
min-width: 15px;
@media ${tablet} {
display: none;
}
${isMobile &&
css`
display: none;
`}
}
.option-button {
margin-right: 16px;
min-width: 15px;
}
.trash-button {
margin-right: 16px;
min-width: 15px;
}
`;
const StyledInfoPanelToggleWrapper = styled.div`
display: ${(props) => (props.isInfoPanelVisible ? "none" : "flex")};

View File

@ -2,8 +2,6 @@ import React from "react";
import PropTypes from "prop-types";
import {
desktop,
size,
tablet,
mobile,
isMobile as isMobileUtils,
@ -11,7 +9,7 @@ import {
} from "@docspace/components/utils/device";
import NoUserSelect from "@docspace/components/utils/commonStyles";
import { Provider } from "@docspace/components/utils/context";
import { isMobile, isFirefox, isMobileOnly } from "react-device-detect";
import { isMobile, isMobileOnly } from "react-device-detect";
import SectionContainer from "./sub-components/section-container";
import SubSectionHeader from "./sub-components/section-header";
@ -206,16 +204,12 @@ class Section extends React.Component {
showSecondaryButtonAlert,
uploadFiles,
viewAs,
//withBodyAutoFocus,
withBodyScroll,
children,
isHeaderVisible,
//headerBorderBottom,
onOpenUploadPanel,
isTabletView,
firstLoad,
dragging,
isDesktop,
isHomepage,
maintenanceExist,
setMaintenanceExist,
@ -528,7 +522,6 @@ class Section extends React.Component {
Section.propTypes = {
children: PropTypes.any,
withBodyScroll: PropTypes.bool,
withBodyAutoFocus: PropTypes.bool,
showPrimaryProgressBar: PropTypes.bool,
primaryProgressBarValue: PropTypes.number,
showPrimaryButtonAlert: PropTypes.bool,
@ -541,12 +534,10 @@ Section.propTypes = {
onDrop: PropTypes.func,
setSelections: PropTypes.func,
uploadFiles: PropTypes.bool,
hideAside: PropTypes.bool,
viewAs: PropTypes.string,
onOpenUploadPanel: PropTypes.func,
isTabletView: PropTypes.bool,
isHeaderVisible: PropTypes.bool,
firstLoad: PropTypes.bool,
isHomepage: PropTypes.bool,
isInfoPanelAvailable: PropTypes.bool,
settingsStudio: PropTypes.bool,
@ -555,7 +546,6 @@ Section.propTypes = {
Section.defaultProps = {
withBodyScroll: true,
withBodyAutoFocus: false,
isInfoPanelAvailable: true,
settingsStudio: false,
withPaging: true,
@ -569,11 +559,10 @@ Section.SectionBody = SectionBody;
Section.SectionPaging = SectionPaging;
export default inject(({ auth }) => {
const { infoPanelStore, isLoaded, settingsStore } = auth;
const { infoPanelStore, settingsStore } = auth;
const {
isHeaderVisible,
isTabletView,
isDesktopClient,
maintenanceExist,
snackbarExist,
setMaintenanceExist,
@ -583,14 +572,12 @@ export default inject(({ auth }) => {
const { isVisible: infoPanelIsVisible } = infoPanelStore;
return {
isLoaded,
isTabletView,
isHeaderVisible,
maintenanceExist,
snackbarExist,
setMaintenanceExist,
isDesktop: isDesktopClient,
showText,

View File

@ -13,7 +13,6 @@ import { Base } from "@docspace/components/themes";
const tabletProps = css`
.section-body_header {
display: block;
position: sticky;
top: 0;
background: ${(props) => props.theme.section.header.background};

View File

@ -1,8 +1,6 @@
import React from "react";
import styled, { css } from "styled-components";
//import classnames from "classnames";
import PropTypes from "prop-types";
//import { LayoutContextConsumer } from "client/Layout/context";
import { isMobile, isMobileOnly } from "react-device-detect";
import { tablet, mobile } from "@docspace/components/utils/device";
import NoUserSelect from "@docspace/components/utils/commonStyles";
@ -11,6 +9,37 @@ import Base from "@docspace/components/themes/base";
const StyledSectionHeader = styled.div`
position: relative;
display: flex;
height: 69px;
min-height: 69px;
@media ${tablet} {
height: 61px;
min-height: 61px;
.header-container {
margin-bottom: 1px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
}
${isMobile &&
css`
height: 61px;
min-height: 61px;
`}
@media ${mobile} {
height: 53px;
min-height: 53px;
}
${isMobileOnly &&
css`
height: 53px;
min-height: 53px;
`}
padding-right: 20px;

View File

@ -60,7 +60,10 @@ class AuthStore {
if (this.isAuthenticated) {
!this.settingsStore.passwordSettings &&
requests.push(this.settingsStore.getPortalPasswordSettings());
requests.push(
this.settingsStore.getPortalPasswordSettings(),
this.settingsStore.getAdditionalResources()
);
}
return Promise.all(requests);

View File

@ -7,7 +7,7 @@ import {
ThemeKeys,
COOKIE_EXPIRATION_YEAR,
LANGUAGE,
TenantStatus
TenantStatus,
} from "../constants";
import { version } from "../package.json";
import SocketIOHelper from "../utils/socket";
@ -142,6 +142,8 @@ class SettingsStore {
enablePlugins = false;
pluginOptions = [];
additionalResourcesData = null;
constructor() {
makeAutoObservable(this);
}
@ -298,6 +300,45 @@ class SettingsStore {
this.cultures = cultures;
};
setAdditionalResourcesData = (data) => {
this.additionalResourcesData = data;
};
setAdditionalResources = async (
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled
) => {
const res = await api.settings.setAdditionalResources(
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled
);
};
getAdditionalResources = async () => {
const res = await api.settings.getAdditionalResources();
delete res.buyUrl;
delete res.feedbackAndSupportUrl;
delete res.licenseAgreementsEnabled;
delete res.licenseAgreementsUrl;
delete res.salesEmail;
delete res.startDocsEnabled;
delete res.userForumEnabled;
delete res.videoGuidesUrl;
this.setAdditionalResourcesData(res);
if (!localStorage.getItem("defaultAdditionalResources")) {
localStorage.setItem("defaultAdditionalResources", JSON.stringify(res));
}
};
restoreAdditionalResources = async () => {
const res = await api.settings.restoreAdditionalResources();
};
getPortalCultures = async () => {
const cultures = await api.settings.getPortalCultures();
this.setCultures(cultures);

View File

@ -44,7 +44,7 @@ class SaveCancelButtons extends React.Component {
saveButtonLabel,
cancelButtonLabel,
hasScroll,
isFirstWelcomePageSettings,
disableRestoreToDefault,
className,
id,
isSaving,
@ -53,8 +53,8 @@ class SaveCancelButtons extends React.Component {
const cancelButtonDisabled = cancelEnable
? false
: isFirstWelcomePageSettings === "true"
? false
: typeof disableRestoreToDefault === "boolean"
? disableRestoreToDefault
: !showReminder;
return (
@ -114,7 +114,7 @@ SaveCancelButtons.propTypes = {
displaySettings: PropTypes.bool,
hasScroll: PropTypes.bool,
minwidth: PropTypes.string,
isFirstWelcomePageSettings: PropTypes.string,
disableRestoreToDefault: PropTypes.bool,
isSaving: PropTypes.bool,
cancelEnable: PropTypes.bool,
};

View File

@ -6,6 +6,7 @@
"Activate": "Activate",
"AddButton": "Add",
"AddFilter": "Add filter",
"Address": "Address",
"AddUsers": "Add users",
"AdminSettings": "Admin settings",
"Alert": "Alert",
@ -25,6 +26,7 @@
"Comments": "Comments",
"Common": "Common",
"CommunityProduct": "Community",
"CompanyName": "Company name",
"Confirmation": "Confirmation",
"Connect": "Connect",
"Content": "Content",
@ -184,6 +186,7 @@
"View": "View",
"ViewWeb": "View web version",
"Warning": "Warning",
"Website": "Website",
"Hotkeys": "Hotkeys",
"PaymentsTitle": "Payments",
"AboutCompanyTitle": "About this program",