From 4484cc42c56269ce592610e243bbb6846000a7cc Mon Sep 17 00:00:00 2001 From: Elyor Djalilov Date: Wed, 19 Jun 2024 12:42:05 +0500 Subject: [PATCH] fix bad merge --- .../client/public/locales/ru/Settings.json | 2 +- packages/client/src/HOCs/withPeopleContent.js | 3 +- .../UserSessionsPanel/LastSessionBlock.js | 2 +- packages/client/src/helpers/people-helpers.js | 4 +++ .../PortalSettings/categories/common/index.js | 33 ++++++++++--------- .../client/src/store/SelectionPeopleStore.js | 4 +-- packages/shared/enums/index.ts | 25 ++++++++++++++ public/locales/en/Common.json | 2 -- 8 files changed, 53 insertions(+), 22 deletions(-) diff --git a/packages/client/public/locales/ru/Settings.json b/packages/client/public/locales/ru/Settings.json index c9e59cee93..9b32031f9e 100644 --- a/packages/client/public/locales/ru/Settings.json +++ b/packages/client/public/locales/ru/Settings.json @@ -233,7 +233,7 @@ "ServiceUrl": "Url-адрес сервиса", "SessionLifetime": "Время жизни сеанса", "SessionsSubtitle": "Проверьте последние активные сеансы всех пользователей за последние 3 дня. При необходимости отключите отдельные сеансы пользователей или отключите пользователя. Если вам нужен полный отчет, скачайте его, нажав соответствующую кнопку ниже.", - "SessionLifetimeMobileDescription": "Время существования сессии позволяет задать время (в минутах), прежде чем пользователям DocSpace потребуется заново вводить учетные данные для получения доступа к нему.", + "SessionLifetimeMobileDescription": "Время существования сессии позволяет задать время (в минутах), прежде чем пользователям {{productName}} потребуется заново вводить учетные данные для получения доступа к нему.", "SessionLifetimeSettingDescription": "Настройте Время существования сессии, чтобы определить период времени перед автоматическим выходом из системы. После сохранения для всех пользователей будет произведен выход из системы.", "SetDefaultRoomQuota": "Установите квоту хранения по умолчанию для комнат в этом {{productName}}. Позже администратор комнаты сможет скорректировать квоту для каждой комнаты индивидуально.", "SetDefaultUserQuota": "Установите квоту хранения для пользователей этого {{productName}}. Пользовательская квота влияет на ограничение объема хранилища для папки Документы каждого пользователя.", diff --git a/packages/client/src/HOCs/withPeopleContent.js b/packages/client/src/HOCs/withPeopleContent.js index 7846d1ca4c..d6c8d4b96d 100644 --- a/packages/client/src/HOCs/withPeopleContent.js +++ b/packages/client/src/HOCs/withPeopleContent.js @@ -49,7 +49,8 @@ export default function withContent(WrappedContent) { itemIndex, } = props; - const { mobilePhone, email, role, displayName, avatar } = item; + const { mobilePhone, email, displayName, avatar, isAdmin, isOwner } = item; + const role = isOwner ? "owner" : isAdmin ? "admin" : null; const onContentRowSelect = useCallback( (checked, user) => { diff --git a/packages/client/src/components/panels/UserSessionsPanel/LastSessionBlock.js b/packages/client/src/components/panels/UserSessionsPanel/LastSessionBlock.js index beaf4fd0e4..970ed0fc9b 100644 --- a/packages/client/src/components/panels/UserSessionsPanel/LastSessionBlock.js +++ b/packages/client/src/components/panels/UserSessionsPanel/LastSessionBlock.js @@ -121,7 +121,7 @@ const LastSessionBlock = (props) => { const getUserType = () => { if (isOwner) return t("Common:Owner"); - if (isAdmin) return t("Common:DocspaceAdmin"); + if (isAdmin) return t("Common:PortalAdmin"); if (isRoomAdmin) return t("Common:RoomAdmin"); if (isCollaborator) return t("Common:PowerUser"); return t("Common:User"); diff --git a/packages/client/src/helpers/people-helpers.js b/packages/client/src/helpers/people-helpers.js index 8e0534d72d..0d110539b0 100644 --- a/packages/client/src/helpers/people-helpers.js +++ b/packages/client/src/helpers/people-helpers.js @@ -57,6 +57,10 @@ export const getUserStatus = (user) => { return "pending"; case EmployeeStatus.Disabled: return "disabled"; + case EmployeeStatus.Online: + return "online"; + case EmployeeStatus.Offline: + return "offline"; default: return "unknown"; } diff --git a/packages/client/src/pages/PortalSettings/categories/common/index.js b/packages/client/src/pages/PortalSettings/categories/common/index.js index a6f8771d2b..afda2978c2 100644 --- a/packages/client/src/pages/PortalSettings/categories/common/index.js +++ b/packages/client/src/pages/PortalSettings/categories/common/index.js @@ -67,13 +67,6 @@ const TabsCommon = (props) => { } }, [tReady, isLoadedSubmenu]); - const load = async () => { - const currentTab = getCurrentTab(); - await loadBaseInfo( - !isMobileView ? (currentTab === 0 ? "general" : "branding") : "", - ); - }; - const data = [ { id: "general", @@ -92,6 +85,24 @@ const TabsCommon = (props) => { }, ]; + const getCurrentTabId = () => { + const path = location.pathname; + const currentTab = data.find((item) => path.includes(item.id)); + return currentTab !== -1 && data.length ? currentTab.id : data[0].id; + }; + + const currentTabId = getCurrentTabId(); + + const load = async () => { + await loadBaseInfo( + !isMobileView + ? currentTabId === "general" + ? "general" + : "branding" + : "", + ); + }; + const onSelect = (e) => { navigate( combineUrl( @@ -102,14 +113,6 @@ const TabsCommon = (props) => { ); }; - const getCurrentTabId = () => { - const path = location.pathname; - const currentTab = data.find((item) => path.includes(item.id)); - return currentTab !== -1 && data.length ? currentTab.id : data[0].id; - }; - - const currentTabId = getCurrentTabId(); - if (!isLoadedSubmenu) return ; return ( diff --git a/packages/client/src/store/SelectionPeopleStore.js b/packages/client/src/store/SelectionPeopleStore.js index 2ac05cd3ac..c76ec670b2 100644 --- a/packages/client/src/store/SelectionPeopleStore.js +++ b/packages/client/src/store/SelectionPeopleStore.js @@ -249,9 +249,9 @@ class SelectionStore { case "disabled": return user.status === EmployeeStatus.Disabled; case "online": - return status === "online"; + return user.status === EmployeeStatus.Online; case "offline": - return status === "offline"; + return user.status === EmployeeStatus.Offline; default: return false; } diff --git a/packages/shared/enums/index.ts b/packages/shared/enums/index.ts index 2e870b6b97..015c03e494 100644 --- a/packages/shared/enums/index.ts +++ b/packages/shared/enums/index.ts @@ -547,3 +547,28 @@ export const enum RoomsStorageFilter { internal = 1, thirdparty = 2, } + +export const enum LDAPOperation { + SaveAndSync = "Save", + Sync = "Sync", +} + +export const enum LDAPCertificateProblem { + CertExpired = -2146762495, + CertValidityPeriodNesting = -2146762494, + CertRole = -2146762493, + CertPathLenConst = -2146762492, + CertCritical = -2146762491, + CertPurpose = -2146762490, + CertIssuerChaining = -2146762489, + CertMalformed = -2146762488, + CertUntrustedRoot = -2146762487, + CertChainnig = -2146762486, + CertRevoked = -2146762484, + CertUntrustedTestRoot = -2146762483, + CertRevocationFailure = -2146762482, + CertCnNoMatch = -2146762481, + CertWrongUsage = -2146762480, + CertUntrustedCa = -2146762478, + CertUnrecognizedError = -2146762477, +} diff --git a/public/locales/en/Common.json b/public/locales/en/Common.json index 8d5714459f..cf59186b01 100644 --- a/public/locales/en/Common.json +++ b/public/locales/en/Common.json @@ -336,8 +336,6 @@ "ProviderSsoSetting": "Single sign-on", "ProviderTwitter": "Twitter", "ProviderZoom": "Zoom", - "PublicRoom": "Public room", - "PublicRoomDescription": "Invite users via external links to view documents without registration. You can also embed this room into any web interface.", "PublicLink": "Public link", "PublicRoom": "Public room", "PublicRoomDescription": "Invite users via external links to view documents without registration. You can also embed this room into any web interface.",