Web: Client: PortalSettings: added data-import categories

This commit is contained in:
Elyor Djalilov 2023-07-14 15:48:06 +05:00
parent a42d2f8b6c
commit 2ab2e635ff
7 changed files with 110 additions and 35 deletions

View File

@ -64,6 +64,7 @@
"CustomTitlesText": "Welcome Page",
"CustomTitlesWelcome": "Welcome Page Settings",
"DataBackup": "Data backup",
"DataImport": "Data import",
"Deactivate": "Deactivate",
"DeactivateOrDeletePortal": "Deactivate or delete space.",
"DeleteDocSpace": "Delete DocSpace",

View File

@ -64,6 +64,7 @@
"CustomTitlesText": "странице приветствия",
"CustomTitlesWelcome": "Настройки страницы приветствия",
"DataBackup": "Резервное копирование данных",
"DataImport": "Перенос данных",
"Deactivate": "Деактивировать",
"DeactivateOrDeletePortal": "Деактивировать или удалить портал.",
"DeleteDocSpace": "Удалить DocSpace",

View File

@ -57,6 +57,8 @@ const getTreeItems = (data, path, t) => {
return t("SingleSignOn");
case "DeveloperTools":
return t("DeveloperTools");
case "DataImport":
return t("DataImport");
default:
throw new Error("Unexpected translation key");
}
@ -173,17 +175,21 @@ const ArticleBodyContent = (props) => {
setSelectedKeys(["4-0"]);
}
if (location.pathname.includes("developer")) {
if (location.pathname.includes("migration")) {
setSelectedKeys(["5-0"]);
}
if (location.pathname.includes("delete-data")) {
if (location.pathname.includes("developer")) {
setSelectedKeys(["6-0"]);
}
if (location.pathname.includes("payments")) {
if (location.pathname.includes("delete-data")) {
setSelectedKeys(["7-0"]);
}
if (location.pathname.includes("payments")) {
setSelectedKeys(["8-0"]);
}
}
}, [tReady, setIsLoadedArticleBody, location.pathname, selectedKeys]);
@ -244,6 +250,8 @@ const ArticleBodyContent = (props) => {
return t("PortalDeletion");
case "DeveloperTools":
return t("DeveloperTools");
case "DataImport":
return t("DataImport");
default:
throw new Error("Unexpected translation key");
}
@ -285,7 +293,7 @@ const ArticleBodyContent = (props) => {
isActive={item.key === selectedKeys[0][0]}
onClick={() => onSelect(item.key)}
folderId={item.id}
style={{ marginTop: `${item.key.includes(7) ? "16px" : "0"}` }}
style={{ marginTop: `${item.key.includes(8) ? "16px" : "0"}` }}
/>
);
});

View File

@ -0,0 +1,4 @@
const DataImport = () => {
return <div>Data Import Page</div>;
};
export default DataImport;

View File

@ -7,6 +7,7 @@ import DataManagementIconUrl from "PUBLIC_DIR/images/data-management.react.svg?u
import RestoreIconUrl from "PUBLIC_DIR/images/restore.react.svg?url";
import TrashIconUrl from "PUBLIC_DIR/images/trash.react.svg?url";
import DeveloperReactSvgUrl from "PUBLIC_DIR/images/catalog.developer.react.svg?url";
import DataImportReactSvgUrl from "PUBLIC_DIR/images/catalog.import.react.svg?url";
/**
* Array for generation current settings tree.
@ -281,8 +282,26 @@ export const settingsTree = [
],
},
{
id: "portal-settings_catalog-developer-tools",
id: "portal-settings_catalog-migration",
key: "5",
icon: DataImportReactSvgUrl,
link: "migration",
tKey: "DataImport",
isHeader: true,
children: [
{
id: "portal-settings_catalog-data-migration",
key: "5-0",
icon: "",
link: "data-import",
tKey: "DataImport",
isCategory: true,
},
],
},
{
id: "portal-settings_catalog-developer-tools",
key: "6",
icon: DeveloperReactSvgUrl,
link: "developer-tools",
tKey: "DeveloperTools",
@ -290,7 +309,7 @@ export const settingsTree = [
children: [
{
id: "portal-settings_catalog-javascript-sdk",
key: "5-0",
key: "6-0",
icon: "",
link: "javascript-sdk",
tKey: "DeveloperTools",
@ -298,7 +317,7 @@ export const settingsTree = [
},
{
id: "portal-settings_catalog-webhooks",
key: "5-1",
key: "6-1",
icon: "",
link: "webhooks",
tKey: "DeveloperTools",
@ -308,21 +327,21 @@ export const settingsTree = [
},
{
id: "portal-settings_catalog-delete",
key: "6",
key: "7",
icon: TrashIconUrl,
link: "delete-data",
tKey: "PortalDeletion",
isHeader: true,
children: [
{
key: "6-0",
key: "7-0",
icon: "",
link: "deletion",
tKey: "PortalDeletion",
isCategory: true,
},
{
key: "6-1",
key: "7-1",
icon: "",
link: "deactivation",
tKey: "PortalDeactivation",
@ -332,7 +351,7 @@ export const settingsTree = [
},
{
id: "portal-settings_catalog-payments",
key: "7",
key: "8",
icon: PaymentIconUrl,
link: "payments",
tKey: "Common:PaymentsTitle",
@ -340,7 +359,7 @@ export const settingsTree = [
children: [
{
id: "portal-settings_catalog-portal-payments",
key: "7-0",
key: "8-0",
icon: "",
link: "portal-payments",
tKey: "Common:PaymentsTitle",

View File

@ -12,65 +12,100 @@ import { generalRoutes } from "./general";
const PortalSettings = loadable(() => import("../pages/PortalSettings"));
const CustomizationSettings = loadable(() =>
import("../pages/PortalSettings/categories/common/index.js"),
import("../pages/PortalSettings/categories/common/index.js")
);
const LanguageAndTimeZoneSettings = loadable(() =>
import("../pages/PortalSettings/categories/common/Customization/language-and-time-zone"),
import(
"../pages/PortalSettings/categories/common/Customization/language-and-time-zone"
)
);
const WelcomePageSettings = loadable(() =>
import("../pages/PortalSettings/categories/common/Customization/welcome-page-settings"),
import(
"../pages/PortalSettings/categories/common/Customization/welcome-page-settings"
)
);
const DNSSettings = loadable(() =>
import("../pages/PortalSettings/categories/common/Customization/dns-settings"),
import("../pages/PortalSettings/categories/common/Customization/dns-settings")
);
const PortalRenaming = loadable(() =>
import("../pages/PortalSettings/categories/common/Customization/portal-renaming"),
import(
"../pages/PortalSettings/categories/common/Customization/portal-renaming"
)
);
const WhiteLabel = loadable(() =>
import("../pages/PortalSettings/categories/common/Branding/whitelabel"),
import("../pages/PortalSettings/categories/common/Branding/whitelabel")
);
const SecuritySettings = loadable(() =>
import("../pages/PortalSettings/categories/security/index.js"),
import("../pages/PortalSettings/categories/security/index.js")
);
const TfaPage = loadable(() =>
import("../pages/PortalSettings/categories/security/access-portal/tfa"),
import("../pages/PortalSettings/categories/security/access-portal/tfa")
);
const PasswordStrengthPage = loadable(() =>
import("../pages/PortalSettings/categories/security/access-portal/passwordStrength"),
import(
"../pages/PortalSettings/categories/security/access-portal/passwordStrength"
)
);
const TrustedMailPage = loadable(() =>
import("../pages/PortalSettings/categories/security/access-portal/trustedMail"),
import(
"../pages/PortalSettings/categories/security/access-portal/trustedMail"
)
);
const IpSecurityPage = loadable(() =>
import("../pages/PortalSettings/categories/security/access-portal/ipSecurity"),
import("../pages/PortalSettings/categories/security/access-portal/ipSecurity")
);
const AdminMessagePage = loadable(() =>
import("../pages/PortalSettings/categories/security/access-portal/adminMessage"),
import(
"../pages/PortalSettings/categories/security/access-portal/adminMessage"
)
);
const SessionLifetimePage = loadable(() =>
import("../pages/PortalSettings/categories/security/access-portal/sessionLifetime"),
import(
"../pages/PortalSettings/categories/security/access-portal/sessionLifetime"
)
);
const Integration = loadable(() =>
import("../pages/PortalSettings/categories/integration")
);
const Payments = loadable(() =>
import("../pages/PortalSettings/categories/payments")
);
const Integration = loadable(() => import("../pages/PortalSettings/categories/integration"));
const Payments = loadable(() => import("../pages/PortalSettings/categories/payments"));
const ThirdParty = loadable(() =>
import("../pages/PortalSettings/categories/integration/ThirdPartyServicesSettings"),
import(
"../pages/PortalSettings/categories/integration/ThirdPartyServicesSettings"
)
);
const SingleSignOn = loadable(() =>
import("../pages/PortalSettings/categories/integration/SingleSignOn"),
import("../pages/PortalSettings/categories/integration/SingleSignOn")
);
const DeveloperTools = loadable(() =>
import("../pages/PortalSettings/categories/developer-tools/index.js"),
import("../pages/PortalSettings/categories/developer-tools/index.js")
);
const DataImport = loadable(() =>
import("../pages/PortalSettings/categories/data-import/index.js")
);
const WebhookHistory = loadable(() =>
import("../pages/PortalSettings/categories/developer-tools/Webhooks/WebhookHistory"),
import(
"../pages/PortalSettings/categories/developer-tools/Webhooks/WebhookHistory"
)
);
const WebhookDetails = loadable(() =>
import("../pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails"),
import(
"../pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails"
)
);
const Backup = loadable(() =>
import("../pages/PortalSettings/categories/data-management/index")
);
const DeleteDataPage = loadable(() =>
import("../pages/PortalSettings/categories/delete-data")
);
const Backup = loadable(() => import("../pages/PortalSettings/categories/data-management/index"));
const DeleteDataPage = loadable(() => import("../pages/PortalSettings/categories/delete-data"));
const RestoreBackup = loadable(() =>
import("../pages/PortalSettings/categories/data-management/backup/restore-backup/index"),
import(
"../pages/PortalSettings/categories/data-management/backup/restore-backup/index"
)
);
const PortalSettingsRoutes = {
@ -188,6 +223,10 @@ const PortalSettingsRoutes = {
path: "developer-tools/javascript-sdk",
element: <DeveloperTools />,
},
{
path: "migration/data-import",
element: <DataImport />,
},
{
path: "developer-tools/webhooks",
element: <DeveloperTools />,

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7071 0.292893C11.5196 0.105357 11.2652 0 11 0H5C3.89543 0 3 0.895431 3 2V5H5V2H10.5858L13 4.41421V14H5V11H3V14C3 15.1046 3.89543 16 5 16H13C14.1046 16 15 15.1046 15 14V4C15 3.73478 14.8946 3.48043 14.7071 3.29289L11.7071 0.292893ZM6.29289 5.70711L7.58579 7H1L1 9H7.58579L6.29289 10.2929L7.70711 11.7071L10.7071 8.70711C11.0976 8.31658 11.0976 7.68342 10.7071 7.29289L7.70711 4.29289L6.29289 5.70711Z" fill="#657077"/>
</svg>

After

Width:  |  Height:  |  Size: 574 B