From b93441d1f2638c288fd7c61311c44982950f5f27 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Thu, 1 Aug 2024 14:50:00 +0300
Subject: [PATCH 01/45] Client:Hiding badges__quickButtons.
---
.../Section/Body/TableView/TableContainer.js | 7 +++
.../Section/Body/TableView/TableHeader.js | 56 +++++++++----------
.../TableView/sub-components/RecentRowData.js | 4 +-
.../Body/TableView/sub-components/RowData.js | 14 ++++-
.../table/sub-components/TableHeaderCell.tsx | 4 +-
5 files changed, 51 insertions(+), 34 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
index 6dbf73b5e7..e040836ea5 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
@@ -50,6 +50,13 @@ const contextCss = css`
`;
const StyledTableContainer = styled(TableContainer)`
+ .badges__quickButtons {
+ padding-left: 16px;
+ display: flex;
+ flex-grow: 2;
+ justify-content: flex-end;
+ }
+
.table-row-selected {
.table-container_file-name-cell {
${fileNameCss}
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
index 76b188ceb9..8a21277f30 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
@@ -109,13 +109,13 @@ class FilesTableHeader extends React.Component {
onChange: this.onColumnChange,
onClick: this.onRoomsFilter,
},
- {
- key: "QuickButtons",
- title: "",
- enable: this.props.roomColumnQuickButtonsIsEnabled,
- defaultSize: 52,
- resizable: false,
- },
+ // {
+ // key: "QuickButtons",
+ // title: "",
+ // enable: this.props.roomColumnQuickButtonsIsEnabled,
+ // defaultSize: 52,
+ // resizable: false,
+ // },
];
showStorageInfo &&
@@ -199,13 +199,13 @@ class FilesTableHeader extends React.Component {
// onClick: this.onFilter,
onChange: this.onColumnChange,
},
- {
- key: "QuickButtons",
- title: "",
- enable: this.props.quickButtonsColumnIsEnabled,
- defaultSize: 52,
- resizable: false,
- },
+ // {
+ // key: "QuickButtons",
+ // title: "",
+ // enable: this.props.quickButtonsColumnIsEnabled,
+ // defaultSize: 52,
+ // resizable: false,
+ // },
];
defaultColumns.push(...columns);
} else if (isRecentTab) {
@@ -278,13 +278,13 @@ class FilesTableHeader extends React.Component {
// onClick: this.onFilter,
onChange: this.onColumnChange,
},
- {
- key: "QuickButtons",
- title: "",
- enable: this.props.quickButtonsColumnIsEnabled,
- defaultSize: 52,
- resizable: false,
- },
+ // {
+ // key: "QuickButtons",
+ // title: "",
+ // enable: this.props.quickButtonsColumnIsEnabled,
+ // defaultSize: 52,
+ // resizable: false,
+ // },
];
defaultColumns.push(...columns);
} else {
@@ -348,13 +348,13 @@ class FilesTableHeader extends React.Component {
// onClick: this.onFilter,
onChange: this.onColumnChange,
},
- {
- key: "QuickButtons",
- title: "",
- enable: this.props.quickButtonsColumnIsEnabled,
- defaultSize: 52,
- resizable: false,
- },
+ // {
+ // key: "QuickButtons",
+ // title: "",
+ // enable: this.props.quickButtonsColumnIsEnabled,
+ // defaultSize: 52,
+ // resizable: false,
+ // },
];
defaultColumns.push(...columns);
}
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
index b8af6e6856..945c285056 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
@@ -213,7 +213,7 @@ const RecentRowDataComponent = (props) => {
) : (
From f62d9ee64deaf6d95df3f9eda369eba9fa5e9a21 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Thu, 1 Aug 2024 14:51:01 +0300
Subject: [PATCH 02/45] Shared:Changing the function to display the last column
and the Name column too.
---
packages/shared/utils/index.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/shared/utils/index.ts b/packages/shared/utils/index.ts
index 6f4d74fba9..2ef9af784f 100644
--- a/packages/shared/utils/index.ts
+++ b/packages/shared/utils/index.ts
@@ -179,7 +179,7 @@ export const getLastColumn = (tableStorageName: string) => {
(column) => column !== "false" && column !== "QuickButtons",
);
- if (filterColumns.length > 1) return filterColumns[filterColumns.length - 1];
+ if (filterColumns.length > 0) return filterColumns[filterColumns.length - 1];
return null;
};
From 398f1480b57122f76e57eb2f0a45b2fd4a64e1e8 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Mon, 5 Aug 2024 17:51:08 +0300
Subject: [PATCH 03/45] Client:Table:Add quickButtonsComponent in table cell.
---
.../Body/TableView/sub-components/RowData.js | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
index 60b94bfbe1..ee41b09a12 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
@@ -63,10 +63,6 @@ const RowDataComponent = (props) => {
const lastColumn = getLastColumn(tableStorageName);
- console.log("lastColumn", lastColumn);
- console.log("quickButtonsComponent", quickButtonsComponent);
- console.log("sizeColumnIsEnabled", sizeColumnIsEnabled);
-
return (
<>
{
{badgesComponent}
- {/* {lastColumn === "Name" ? quickButtonsComponent : <>>} */}
+ {lastColumn === "Name" ? quickButtonsComponent : <>>}
{authorColumnIsEnabled ? (
@@ -106,7 +102,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {/* {lastColumn === "Author" ? quickButtonsComponent : <>>} */}
+ {lastColumn === "Author" ? quickButtonsComponent : <>>}
) : (
@@ -130,7 +126,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {/* {lastColumn === "Created" ? quickButtonsComponent : <>>} */}
+ {lastColumn === "Created" ? quickButtonsComponent : <>>}
) : (
@@ -151,7 +147,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {/* {lastColumn === "Modified" ? quickButtonsComponent : <>>} */}
+ {lastColumn === "Modified" ? quickButtonsComponent : <>>}
) : (
@@ -172,7 +168,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {/* {lastColumn === "Size" ? quickButtonsComponent : <>>} */}
+ {lastColumn === "Size" ? quickButtonsComponent : <>>}
) : (
@@ -195,7 +191,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {/* {lastColumn === "Type" ? quickButtonsComponent : <>>} */}
+ {lastColumn === "Type" ? quickButtonsComponent : <>>}
) : (
From 393fb016b3b24e02efc491df2b10d8658cd473fd Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Mon, 5 Aug 2024 17:53:41 +0300
Subject: [PATCH 04/45] Shared:Table:Fix jump context menu in row after
adding/hiding a column after removing a column with quick buttons.
---
packages/shared/components/table/TableHeader.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/shared/components/table/TableHeader.tsx b/packages/shared/components/table/TableHeader.tsx
index c7557492d2..2f7d9a9f5c 100644
--- a/packages/shared/components/table/TableHeader.tsx
+++ b/packages/shared/components/table/TableHeader.tsx
@@ -412,7 +412,7 @@ class TableHeaderComponent extends React.Component<
if (!container) return;
- const containerWidth = +container.clientWidth;
+ const containerWidth = container.getBoundingClientRect().width;
const defaultWidth = tableContainer
.map((column) => getSubstring(column))
From 902feb36542210c174dcf6d45964f290446285d9 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Mon, 5 Aug 2024 17:55:23 +0300
Subject: [PATCH 05/45] Shared:IconButton:Fixed flickering of quick buttons
with color when adding/hiding a column.
---
packages/shared/components/icon-button/IconButton.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/shared/components/icon-button/IconButton.tsx b/packages/shared/components/icon-button/IconButton.tsx
index 018d31f7a2..90fa472833 100644
--- a/packages/shared/components/icon-button/IconButton.tsx
+++ b/packages/shared/components/icon-button/IconButton.tsx
@@ -64,7 +64,7 @@ const IconButton = ({
const [currentIconName, setCurrentIconName] = React.useState(iconName);
const [currentIconColor, setCurrentIconColor] = React.useState<
string | undefined
- >(iconName);
+ >(color);
const onMouseEnterAction = (e: React.MouseEvent) => {
if (isDisabled) return;
From 260445c4c6c49fe9dbf21a1bb099623ed3577af1 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Tue, 6 Aug 2024 13:32:24 +0300
Subject: [PATCH 06/45] Client:QuickButtons:Added quick buttons to the last
column in the table rooms.
---
.../pages/Home/Section/Body/TableView/TableHeader.js | 2 +-
.../Body/TableView/sub-components/RoomsRowData.js | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
index f97adabdf0..269d443fa2 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
@@ -119,7 +119,7 @@ class FilesTableHeader extends React.Component {
];
showStorageInfo &&
- columns.splice(columns.length - 1, 0, {
+ columns.splice(columns.length, 0, {
key: "Storage",
title:
isDefaultRoomsQuotaSet && !isArchiveFolder
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
index bcc5ffc22c..0c91284b7b 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
@@ -85,6 +85,7 @@ const RoomsRowDataComponent = (props) => {
{badgesComponent}
+ {lastColumn === "Name" ? quickButtonsComponent : <>>}
{roomColumnTypeIsEnabled ? (
@@ -104,6 +105,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
+ {lastColumn === "Type" ? quickButtonsComponent : <>>}
) : (
@@ -122,6 +124,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
+ {lastColumn === "Tags" ? quickButtonsComponent : <>>}
) : (
@@ -144,6 +147,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
+ {lastColumn === "Owner" ? quickButtonsComponent : <>>}
) : (
@@ -166,6 +170,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
+ {lastColumn === "Activity" ? quickButtonsComponent : <>>}
) : (
@@ -178,12 +183,13 @@ const RoomsRowDataComponent = (props) => {
type="room"
isReadOnly={!item?.security?.EditRoom}
/>
+ {lastColumn === "Storage" ? quickButtonsComponent : <>>}
) : (
))}
- {roomColumnQuickButtonsIsEnabled ? (
+ {/* {roomColumnQuickButtonsIsEnabled ? (
{
) : (
- )}
+ )} */}
>
);
};
From 0cbf7e5e8806bdadb8bf4657b24ebff8027d3042 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Tue, 6 Aug 2024 13:49:29 +0300
Subject: [PATCH 07/45] Client:QuickButtons:Removed the column with quick
buttons in the trash.
---
.../TableView/sub-components/TrashRowData.js | 20 -------------------
1 file changed, 20 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
index 61e66530a5..0fca4c3090 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
@@ -217,26 +217,6 @@ const TrashRowDataComponent = (props) => {
) : (
)}
- {quickButtonsColumnIsEnabled ? (
-
-
- {quickButtonsComponent}
-
-
- ) : (
-
- )}
>
);
};
From 31408a3c6c23157be94df39e6646e8489f2103c6 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Wed, 7 Aug 2024 15:33:18 +0300
Subject: [PATCH 08/45] Client:QuickButtons:Fix padding.
---
.../Home/Section/Body/TableView/StyledTable.js | 2 +-
.../Home/Section/Body/TableView/TableContainer.js | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js b/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js
index e1d424da6b..1a45ef146d 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js
@@ -232,7 +232,7 @@ const StyledTableRow = styled(TableRow)`
.no-extra-space {
p {
- margin-inline-end: 0 !important;
+ margin-inline-end: 8px !important;
}
}
`;
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
index e040836ea5..2a3f53d980 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
@@ -51,10 +51,21 @@ const contextCss = css`
const StyledTableContainer = styled(TableContainer)`
.badges__quickButtons {
- padding-left: 16px;
display: flex;
- flex-grow: 2;
+ flex-grow: 1;
justify-content: flex-end;
+
+ .badge {
+ padding-left: 16px;
+ }
+
+ .badge:first-child {
+ padding-left: 8px;
+ }
+
+ .badge:last-child {
+ padding-right: 8px;
+ }
}
.table-row-selected {
From db1738c2f21bbc39d656f22f8b2efcf365f342c4 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Wed, 7 Aug 2024 18:05:15 +0300
Subject: [PATCH 09/45] Client:QuickButtons:Fix styles.
---
.../Section/Body/TableView/StyledTable.js | 15 ++--
.../Section/Body/TableView/TableContainer.js | 18 -----
.../TableView/sub-components/RecentRowData.js | 25 +------
.../TableView/sub-components/RoomsRowData.js | 69 +++++++++++--------
.../Body/TableView/sub-components/RowData.js | 68 +++++++++++-------
.../TableView/sub-components/TrashRowData.js | 5 +-
6 files changed, 92 insertions(+), 108 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js b/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js
index e1d8d0fbbd..46eb4fbad3 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/StyledTable.js
@@ -136,9 +136,7 @@ const StyledTableRow = styled(TableRow)`
`}
}
- .table-container_element-wrapper,
- .table-container_quick-buttons-wrapper {
- padding-inline-end: 0;
+ .table-container_element-wrapper {
}
.table-container_element-wrapper,
@@ -306,7 +304,10 @@ const StyledBadgesContainer = styled.div`
`;
const StyledQuickButtonsContainer = styled.div`
- width: 100%;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ flex-grow: 1;
.badges {
display: flex;
@@ -315,11 +316,7 @@ const StyledQuickButtonsContainer = styled.div`
}
.badge {
- padding: 12px 7px;
- }
-
- .badge:last-child {
- margin-inline-end: 3px;
+ padding: 12px 8px;
}
.lock-file {
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
index 2a3f53d980..6dbf73b5e7 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js
@@ -50,24 +50,6 @@ const contextCss = css`
`;
const StyledTableContainer = styled(TableContainer)`
- .badges__quickButtons {
- display: flex;
- flex-grow: 1;
- justify-content: flex-end;
-
- .badge {
- padding-left: 16px;
- }
-
- .badge:first-child {
- padding-left: 8px;
- }
-
- .badge:last-child {
- padding-right: 8px;
- }
- }
-
.table-row-selected {
.table-container_file-name-cell {
${fileNameCss}
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
index 945c285056..8a3bc75bcc 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
@@ -33,10 +33,7 @@ import AuthorCell from "./AuthorCell";
import DateCell from "./DateCell";
import SizeCell from "./SizeCell";
import { classNames, getLastColumn } from "@docspace/shared/utils";
-import {
- StyledBadgesContainer,
- StyledQuickButtonsContainer,
-} from "../StyledTable";
+import { StyledBadgesContainer } from "../StyledTable";
const RecentRowDataComponent = (props) => {
const {
@@ -213,26 +210,6 @@ const RecentRowDataComponent = (props) => {
) : (
)}
- {/* {quickButtonsColumnIsEnabled ? (
-
-
- {quickButtonsComponent}
-
-
- ) : (
-
- )} */}
>
);
};
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
index 0c91284b7b..6bd34d2727 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
@@ -85,7 +85,13 @@ const RoomsRowDataComponent = (props) => {
{badgesComponent}
- {lastColumn === "Name" ? quickButtonsComponent : <>>}
+ {lastColumn === "Name" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
{roomColumnTypeIsEnabled ? (
@@ -105,7 +111,13 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Type" ? quickButtonsComponent : <>>}
+ {lastColumn === "Type" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -124,7 +136,13 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Tags" ? quickButtonsComponent : <>>}
+ {lastColumn === "Tags" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -147,7 +165,13 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Owner" ? quickButtonsComponent : <>>}
+ {lastColumn === "Owner" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -170,7 +194,13 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Activity" ? quickButtonsComponent : <>>}
+ {lastColumn === "Activity" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -183,32 +213,17 @@ const RoomsRowDataComponent = (props) => {
type="room"
isReadOnly={!item?.security?.EditRoom}
/>
- {lastColumn === "Storage" ? quickButtonsComponent : <>>}
+ {lastColumn === "Storage" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
))}
-
- {/* {roomColumnQuickButtonsIsEnabled ? (
-
-
- {quickButtonsComponent}
-
-
- ) : (
-
- )} */}
>
);
};
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
index ee41b09a12..5b497f5c30 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
@@ -84,7 +84,13 @@ const RowDataComponent = (props) => {
{badgesComponent}
- {lastColumn === "Name" ? quickButtonsComponent : <>>}
+ {lastColumn === "Name" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
{authorColumnIsEnabled ? (
@@ -102,7 +108,13 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Author" ? quickButtonsComponent : <>>}
+ {lastColumn === "Author" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -126,7 +138,13 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Created" ? quickButtonsComponent : <>>}
+ {lastColumn === "Created" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -147,7 +165,13 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Modified" ? quickButtonsComponent : <>>}
+ {lastColumn === "Modified" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -168,7 +192,13 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Size" ? quickButtonsComponent : <>>}
+ {lastColumn === "Size" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
@@ -191,31 +221,17 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Type" ? quickButtonsComponent : <>>}
+ {lastColumn === "Type" ? (
+
+ {quickButtonsComponent}
+
+ ) : (
+ <>>
+ )}
) : (
)}
- {/* {quickButtonsColumnIsEnabled ? (
-
-
- {quickButtonsComponent}
-
-
- ) : (
-
- )} */}
>
);
};
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
index 0fca4c3090..7cefdaf1f3 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
@@ -33,10 +33,7 @@ import AuthorCell from "./AuthorCell";
import DateCell from "./DateCell";
import SizeCell from "./SizeCell";
import { classNames, getLastColumn } from "@docspace/shared/utils";
-import {
- StyledBadgesContainer,
- StyledQuickButtonsContainer,
-} from "../StyledTable";
+import { StyledBadgesContainer } from "../StyledTable";
import ErasureCell from "./ErasureCell";
import RoomCell from "./RoomCell";
From af60c740e07c67b720bc615ac4e818cec66e0772 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Wed, 7 Aug 2024 18:14:21 +0300
Subject: [PATCH 10/45] Client:QuickButtons:Delete column Quick Buttons.
---
.../Section/Body/TableView/TableHeader.js | 32 -------------------
.../TableView/sub-components/RecentRowData.js | 4 ---
.../Body/TableView/sub-components/RowData.js | 4 ---
.../TableView/sub-components/TrashRowData.js | 5 ---
packages/client/src/store/TableStore.js | 12 -------
5 files changed, 57 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
index 269d443fa2..2262f1b6f0 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js
@@ -109,13 +109,6 @@ class FilesTableHeader extends React.Component {
onChange: this.onColumnChange,
onClick: this.onRoomsFilter,
},
- // {
- // key: "QuickButtons",
- // title: "",
- // enable: this.props.roomColumnQuickButtonsIsEnabled,
- // defaultSize: 52,
- // resizable: false,
- // },
];
showStorageInfo &&
@@ -199,13 +192,6 @@ class FilesTableHeader extends React.Component {
// onClick: this.onFilter,
onChange: this.onColumnChange,
},
- // {
- // key: "QuickButtons",
- // title: "",
- // enable: this.props.quickButtonsColumnIsEnabled,
- // defaultSize: 52,
- // resizable: false,
- // },
];
defaultColumns.push(...columns);
} else if (isRecentTab) {
@@ -278,13 +264,6 @@ class FilesTableHeader extends React.Component {
// onClick: this.onFilter,
onChange: this.onColumnChange,
},
- // {
- // key: "QuickButtons",
- // title: "",
- // enable: this.props.quickButtonsColumnIsEnabled,
- // defaultSize: 52,
- // resizable: false,
- // },
];
defaultColumns.push(...columns);
} else {
@@ -348,13 +327,6 @@ class FilesTableHeader extends React.Component {
// onClick: this.onFilter,
onChange: this.onColumnChange,
},
- // {
- // key: "QuickButtons",
- // title: "",
- // enable: this.props.quickButtonsColumnIsEnabled,
- // defaultSize: 52,
- // resizable: false,
- // },
];
defaultColumns.push(...columns);
}
@@ -639,14 +611,12 @@ export default inject(
sizeTrashColumnIsEnabled,
typeColumnIsEnabled,
typeTrashColumnIsEnabled,
- quickButtonsColumnIsEnabled,
lastOpenedColumnIsEnabled,
roomColumnNameIsEnabled,
roomColumnTypeIsEnabled,
roomColumnTagsIsEnabled,
roomColumnOwnerIsEnabled,
- roomColumnQuickButtonsIsEnabled,
roomColumnActivityIsEnabled,
roomQuotaColumnIsEnable,
@@ -690,14 +660,12 @@ export default inject(
sizeTrashColumnIsEnabled,
typeColumnIsEnabled,
typeTrashColumnIsEnabled,
- quickButtonsColumnIsEnabled,
lastOpenedColumnIsEnabled,
roomColumnNameIsEnabled,
roomColumnTypeIsEnabled,
roomColumnTagsIsEnabled,
roomColumnOwnerIsEnabled,
- roomColumnQuickButtonsIsEnabled,
roomColumnActivityIsEnabled,
roomQuotaColumnIsEnable,
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
index 8a3bc75bcc..d425eab1cf 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js
@@ -42,7 +42,6 @@ const RecentRowDataComponent = (props) => {
modifiedColumnIsEnabled,
sizeColumnIsEnabled,
typeColumnIsEnabled,
- quickButtonsColumnIsEnabled,
lastOpenedColumnIsEnabled,
dragStyles,
@@ -55,7 +54,6 @@ const RecentRowDataComponent = (props) => {
inProgress,
showHotkeyBorder,
badgesComponent,
- quickButtonsComponent,
tableStorageName,
} = props;
@@ -221,7 +219,6 @@ export default inject(({ tableStore }) => {
modifiedColumnIsEnabled,
sizeColumnIsEnabled,
typeColumnIsEnabled,
- quickButtonsColumnIsEnabled,
lastOpenedColumnIsEnabled,
tableStorageName,
} = tableStore;
@@ -232,7 +229,6 @@ export default inject(({ tableStore }) => {
modifiedColumnIsEnabled,
sizeColumnIsEnabled,
typeColumnIsEnabled,
- quickButtonsColumnIsEnabled,
lastOpenedColumnIsEnabled,
tableStorageName,
};
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
index 5b497f5c30..7862870d54 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
@@ -45,8 +45,6 @@ const RowDataComponent = (props) => {
modifiedColumnIsEnabled,
sizeColumnIsEnabled,
typeColumnIsEnabled,
- quickButtonsColumnIsEnabled,
-
dragStyles,
selectionProp,
value,
@@ -243,7 +241,6 @@ export default inject(({ tableStore }) => {
modifiedColumnIsEnabled,
sizeColumnIsEnabled,
typeColumnIsEnabled,
- quickButtonsColumnIsEnabled,
tableStorageName,
} = tableStore;
@@ -253,7 +250,6 @@ export default inject(({ tableStore }) => {
modifiedColumnIsEnabled,
sizeColumnIsEnabled,
typeColumnIsEnabled,
- quickButtonsColumnIsEnabled,
tableStorageName,
};
})(observer(RowDataComponent));
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
index 7cefdaf1f3..28eb938384 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/TrashRowData.js
@@ -45,8 +45,6 @@ const TrashRowDataComponent = (props) => {
erasureColumnIsEnabled,
sizeTrashColumnIsEnabled,
typeTrashColumnIsEnabled,
- quickButtonsColumnIsEnabled,
-
dragStyles,
selectionProp,
value,
@@ -57,7 +55,6 @@ const TrashRowDataComponent = (props) => {
inProgress,
showHotkeyBorder,
badgesComponent,
- quickButtonsComponent,
tableStorageName,
} = props;
@@ -226,7 +223,6 @@ export default inject(({ tableStore }) => {
erasureColumnIsEnabled,
sizeTrashColumnIsEnabled,
typeTrashColumnIsEnabled,
- quickButtonsColumnIsEnabled,
tableStorageName,
} = tableStore;
@@ -237,7 +233,6 @@ export default inject(({ tableStore }) => {
erasureColumnIsEnabled,
sizeTrashColumnIsEnabled,
typeTrashColumnIsEnabled,
- quickButtonsColumnIsEnabled,
tableStorageName,
};
})(observer(TrashRowDataComponent));
diff --git a/packages/client/src/store/TableStore.js b/packages/client/src/store/TableStore.js
index 8d63973d2a..498c38a41b 100644
--- a/packages/client/src/store/TableStore.js
+++ b/packages/client/src/store/TableStore.js
@@ -55,7 +55,6 @@ class TableStore {
roomColumnTypeIsEnabled = false;
roomColumnTagsIsEnabled = true;
roomColumnOwnerIsEnabled = false;
- roomColumnQuickButtonsIsEnabled = true;
roomColumnActivityIsEnabled = true;
roomQuotaColumnIsEnable = false;
@@ -67,7 +66,6 @@ class TableStore {
modifiedColumnIsEnabled = true;
sizeColumnIsEnabled = true;
typeColumnIsEnabled = true;
- quickButtonsColumnIsEnabled = true;
lastOpenedColumnIsEnabled = true;
authorTrashColumnIsEnabled = true;
@@ -143,10 +141,6 @@ class TableStore {
this.typeColumnIsEnabled = enable;
};
- setQuickButtonsColumn = (enable) => {
- this.quickButtonsColumnIsEnabled = enable;
- };
-
setAuthorTrashColumn = (enable) => (this.authorTrashColumnIsEnabled = enable);
setCreatedTrashColumn = (enable) =>
(this.createdTrashColumnIsEnabled = enable);
@@ -232,7 +226,6 @@ class TableStore {
this.setErasureColumn(splitColumns.includes("Erasure"));
this.setSizeTrashColumn(splitColumns.includes("SizeTrash"));
this.setTypeTrashColumn(splitColumns.includes("TypeTrash"));
- this.setQuickButtonsColumn(splitColumns.includes("QuickButtons"));
return;
}
@@ -241,7 +234,6 @@ class TableStore {
this.setCreatedColumn(splitColumns.includes("Created"));
this.setSizeColumn(splitColumns.includes("Size"));
this.setTypeColumn(splitColumns.includes("Type"));
- this.setQuickButtonsColumn(splitColumns.includes("QuickButtons"));
this.setLastOpenedColumn(splitColumns.includes("LastOpened"));
}
};
@@ -315,10 +307,6 @@ class TableStore {
this.setTypeTrashColumn(!this.typeTrashColumnIsEnabled);
return;
- case "QuickButtons":
- this.setQuickButtonsColumn(!this.quickButtonsColumnIsEnabled);
- return;
-
case "Owner":
this.setRoomColumnOwner(!this.roomColumnOwnerIsEnabled);
return;
From 2fca5d4ac128060a78fd2cdb48b0bb368298568c Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Wed, 7 Aug 2024 18:23:07 +0300
Subject: [PATCH 11/45] Shared:TableHeader:Removed line commenting.
---
.../components/table/sub-components/TableHeaderCell.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/shared/components/table/sub-components/TableHeaderCell.tsx b/packages/shared/components/table/sub-components/TableHeaderCell.tsx
index bfae281ca4..a22a18ed3c 100644
--- a/packages/shared/components/table/sub-components/TableHeaderCell.tsx
+++ b/packages/shared/components/table/sub-components/TableHeaderCell.tsx
@@ -82,7 +82,7 @@ const TableHeaderCell = ({
data-default={isDefault}
data-enable={enable}
data-min-width={minWidth}
- // data-default-size={defaultSize}
+ data-default-size={defaultSize}
sortingVisible={sortingVisible}
ref={tagRef}
>
@@ -121,7 +121,7 @@ const TableHeaderCell = ({
data-enable={enable}
data-default={isDefault}
data-min-width={minWidth}
- // data-default-size={defaultSize}
+ data-default-size={defaultSize}
sortingVisible={sortingVisible}
>
From c6dd338bb79774dc35b10f858149e6b125028f6b Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Thu, 8 Aug 2024 10:37:19 +0300
Subject: [PATCH 12/45] Client:TableRow:Refactoring.
---
.../TableView/sub-components/RoomsRowData.js | 56 ++++---------------
.../Body/TableView/sub-components/RowData.js | 53 ++++--------------
2 files changed, 22 insertions(+), 87 deletions(-)
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
index 6bd34d2727..c9ad73fa71 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RoomsRowData.js
@@ -41,7 +41,6 @@ const RoomsRowDataComponent = (props) => {
const {
roomColumnTypeIsEnabled,
roomColumnOwnerIsEnabled,
- roomColumnQuickButtonsIsEnabled,
roomColumnTagsIsEnabled,
roomColumnActivityIsEnabled,
roomQuotaColumnIsEnable,
@@ -63,6 +62,11 @@ const RoomsRowDataComponent = (props) => {
} = props;
const lastColumn = getLastColumn(tableStorageName);
+ const quickButtonsComponentNode = (
+
+ {quickButtonsComponent}
+
+ );
return (
<>
@@ -85,13 +89,7 @@ const RoomsRowDataComponent = (props) => {
{badgesComponent}
- {lastColumn === "Name" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Name" ? quickButtonsComponentNode : <>>}
{roomColumnTypeIsEnabled ? (
@@ -111,13 +109,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Type" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Type" ? quickButtonsComponentNode : <>>}
) : (
@@ -136,13 +128,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Tags" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Tags" ? quickButtonsComponentNode : <>>}
) : (
@@ -165,13 +151,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Owner" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Owner" ? quickButtonsComponentNode : <>>}
) : (
@@ -194,13 +174,7 @@ const RoomsRowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Activity" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Activity" ? quickButtonsComponentNode : <>>}
) : (
@@ -213,13 +187,7 @@ const RoomsRowDataComponent = (props) => {
type="room"
isReadOnly={!item?.security?.EditRoom}
/>
- {lastColumn === "Storage" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Storage" ? quickButtonsComponentNode : <>>}
) : (
@@ -232,7 +200,6 @@ export default inject(({ currentQuotaStore, tableStore }) => {
const {
roomColumnTypeIsEnabled,
roomColumnOwnerIsEnabled,
- roomColumnQuickButtonsIsEnabled,
roomColumnTagsIsEnabled,
roomColumnActivityIsEnabled,
roomQuotaColumnIsEnable,
@@ -244,7 +211,6 @@ export default inject(({ currentQuotaStore, tableStore }) => {
roomQuotaColumnIsEnable,
roomColumnTypeIsEnabled,
roomColumnOwnerIsEnabled,
- roomColumnQuickButtonsIsEnabled,
roomColumnTagsIsEnabled,
roomColumnActivityIsEnabled,
showStorageInfo,
diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
index 7862870d54..75cbfe1cee 100644
--- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
+++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js
@@ -60,6 +60,11 @@ const RowDataComponent = (props) => {
} = props;
const lastColumn = getLastColumn(tableStorageName);
+ const quickButtonsComponentNode = (
+
+ {quickButtonsComponent}
+
+ );
return (
<>
@@ -82,13 +87,7 @@ const RowDataComponent = (props) => {
{badgesComponent}
- {lastColumn === "Name" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Name" ? quickButtonsComponentNode : <>>}
{authorColumnIsEnabled ? (
@@ -106,13 +105,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Author" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Author" ? quickButtonsComponentNode : <>>}
) : (
@@ -136,13 +129,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Created" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Created" ? quickButtonsComponentNode : <>>}
) : (
@@ -163,13 +150,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Modified" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Modified" ? quickButtonsComponentNode : <>>}
) : (
@@ -190,13 +171,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Size" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Size" ? quickButtonsComponentNode : <>>}
) : (
@@ -219,13 +194,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
- {lastColumn === "Type" ? (
-
- {quickButtonsComponent}
-
- ) : (
- <>>
- )}
+ {lastColumn === "Type" ? quickButtonsComponentNode : <>>}
) : (
From fdc06cf61c2bc7feb61c209a29dd3ae32c5dd56d Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Wed, 24 Jul 2024 13:14:34 +0200
Subject: [PATCH 13/45] Client: InfoPanel Groups: Fix getting all members in
one request. Add infinite loader
---
.../CreateEditGroupDialog/EditGroupDialog.tsx | 2 +-
.../Body/views/Groups/GroupMember.js | 2 +-
.../GroupMembersList/GroupMembersList.tsx | 155 ++++++++++++++++++
.../Home/InfoPanel/Body/views/Groups/index.js | 95 +++++++++--
.../Body/views/Groups/useFetchGroup.js | 2 +-
packages/shared/api/groups/index.ts | 10 +-
packages/shared/api/groups/types.ts | 1 +
7 files changed, 246 insertions(+), 21 deletions(-)
create mode 100644 packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMembersList/GroupMembersList.tsx
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
index c0027e0286..9f706cbc83 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
@@ -143,7 +143,7 @@ const EditGroupDialog = ({
if (groupParams.groupMembers) return;
setFetchMembersIsLoading(true);
- getGroupById(group.id)!
+ getGroupById(group.id, true)!
.then((data: any) => {
prevGroupParams.current.groupMembers = data.members;
setInitialMembersIds(data.members.map((gm) => gm.id));
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMember.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMember.js
index 4b2487f9a2..f0d4ad9672 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMember.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMember.js
@@ -84,7 +84,7 @@ const GroupMember = ({
className="avatar"
role={groupMember.role || "user"}
size={"min"}
- source={groupMember.avatarSmall}
+ source={groupMember.avatarSmall || groupMember.avatar}
/>
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMembersList/GroupMembersList.tsx b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMembersList/GroupMembersList.tsx
new file mode 100644
index 0000000000..08800bb675
--- /dev/null
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/GroupMembersList/GroupMembersList.tsx
@@ -0,0 +1,155 @@
+// (c) Copyright Ascensio System SIA 2009-2024
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+import React, { useCallback, useEffect, useState } from "react";
+import {
+ ListRowProps,
+ Index,
+ IndexRange,
+ InfiniteLoader,
+ List,
+ WindowScroller,
+} from "react-virtualized";
+import styled from "styled-components";
+
+import { TUser } from "@docspace/shared/api/people/types";
+import { RowLoader } from "@docspace/shared/skeletons/selector";
+
+import GroupMember from "../GroupMember";
+
+const ROW_HEIGHT = 50;
+
+export const StyledList = styled(List)`
+ width: ${({ width }) => `${width - 40}px`} !important;
+
+ .group-member-row-loader {
+ padding: 0;
+ }
+`;
+
+interface GroupMembersListProps {
+ members: TUser[];
+ loadNextPage: (startIndex: number) => Promise
;
+ hasNextPage: boolean;
+ total: number;
+}
+
+export const GroupMembersList = ({
+ members,
+ loadNextPage,
+ hasNextPage,
+ total,
+}: GroupMembersListProps) => {
+ const [scrollElement, setScrollElement] = useState(
+ null,
+ );
+ const [isNextPageLoading, setIsNextPageLoading] = useState(false);
+
+ const itemsCount = hasNextPage ? members.length + 1 : members.length;
+
+ const isItemLoaded = useCallback(
+ ({ index }: Index) => {
+ return !hasNextPage || index < itemsCount;
+ },
+ [hasNextPage, itemsCount],
+ );
+
+ const loadMoreItems = useCallback(
+ async ({ startIndex }: IndexRange) => {
+ setIsNextPageLoading(true);
+ if (!isNextPageLoading) {
+ await loadNextPage(startIndex - 1);
+ }
+ setIsNextPageLoading(false);
+ },
+ [isNextPageLoading, loadNextPage],
+ );
+
+ const renderRow = ({ key, index, style }: ListRowProps) => {
+ const item = members[index];
+
+ return (
+
+ {item ? (
+
+ ) : (
+
+ )}
+
+ );
+ };
+
+ useEffect(() => {
+ const scrollEl = document.querySelector(".info-panel-scroll");
+
+ if (scrollEl) {
+ setScrollElement(scrollEl as HTMLDivElement);
+ }
+ }, []);
+
+ if (!scrollElement) {
+ return null;
+ }
+
+ return (
+
+ {({ onRowsRendered, registerChild }) => (
+
+ {({ height, isScrolling, scrollTop }) => {
+ const scrollRect = scrollElement.getBoundingClientRect();
+
+ return (
+
+ );
+ }}
+
+ )}
+
+ );
+};
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
index ac9bebf5b7..f250e63b2b 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
@@ -26,14 +26,20 @@
import { inject, observer } from "mobx-react";
import { withTranslation } from "react-i18next";
-import * as Styled from "../../styles/groups.styled";
-import withLoader from "@docspace/client/src/HOCs/withLoader";
-import InfoPanelViewLoader from "@docspace/shared/skeletons/info-panel/body";
-import GroupMember from "./GroupMember";
-import useFetchGroup from "./useFetchGroup";
import { useParams } from "react-router-dom";
import { useState, useEffect } from "react";
+import withLoader from "@docspace/client/src/HOCs/withLoader";
+import InfoPanelViewLoader from "@docspace/shared/skeletons/info-panel/body";
+import api from "@docspace/shared/api";
+import AccountsFilter from "@docspace/shared/api/people/filter";
+import { MIN_LOADER_TIMER } from "@docspace/shared/selectors/Files/FilesSelector.constants";
+
+import GroupMember from "./GroupMember";
+import * as Styled from "../../styles/groups.styled";
+import useFetchGroup from "./useFetchGroup";
+import { GroupMembersList } from "./GroupMembersList/GroupMembersList";
+
const Groups = ({
infoPanelSelection,
currentGroup,
@@ -42,6 +48,9 @@ const Groups = ({
setInfoPanelSelectedGroup,
}) => {
const [isShowLoader, setIsShowLoader] = useState(false);
+ const [areMembersLoading, setAreMembersLoading] = useState(false);
+ const [groupMembers, setGroupMembers] = useState(null);
+ const [total, setTotal] = useState(0);
const { groupId: paramsGroupId } = useParams();
const isInsideGroup = !!paramsGroupId;
@@ -51,32 +60,88 @@ const Groups = ({
const groupId = isInsideGroup ? paramsGroupId : infoPanelSelection?.id;
const setGroup = isInsideGroup ? setCurrentGroup : setInfoPanelSelectedGroup;
+ const groupManager = group?.manager;
+
+ const loadNextPage = async (startIndex) => {
+ const startLoadingTime = new Date();
+
+ try {
+ if (startIndex === 0) {
+ setAreMembersLoading(true);
+ }
+
+ const pageCount = 100;
+ const filter = AccountsFilter.getDefault();
+ filter.group = groupId;
+ filter.page = startIndex / pageCount;
+ filter.pageCount = pageCount;
+
+ const res = await api.people.getUserList(filter);
+
+ const membersWithoutManager = groupManager
+ ? res.items.filter((item) => item.id !== groupManager.id)
+ : res.items;
+
+ setTotal(res.total);
+ if (startIndex === 0 || !groupMembers) {
+ setGroupMembers(membersWithoutManager);
+ } else {
+ setGroupMembers([...groupMembers, ...membersWithoutManager]);
+ }
+ } catch (e) {
+ console.log(e);
+ } finally {
+ const nowDate = new Date();
+ const diff = Math.abs(nowDate.getTime() - startLoadingTime.getTime());
+
+ if (diff < MIN_LOADER_TIMER) {
+ setTimeout(() => {
+ setAreMembersLoading(false);
+ }, MIN_LOADER_TIMER - diff);
+ } else {
+ setAreMembersLoading(false);
+ }
+ }
+ };
+
useFetchGroup(groupId, group?.id, setGroup);
+ useEffect(() => {
+ if (group) {
+ loadNextPage(0);
+ }
+ }, [group]);
+
useEffect(() => {
const showLoaderTimer = setTimeout(() => setIsShowLoader(true), 500);
return () => clearTimeout(showLoaderTimer);
}, []);
- const groupManager = group?.manager;
- const groupMembers = group?.members?.filter(
- (user) => user.id !== groupManager?.id,
- );
-
if (!group) {
- if (isShowLoader) return ;
+ if (isShowLoader)
+ return (
+
+
+
+ );
return null;
}
+ const totalWithoutManager = groupManager ? total - 1 : total;
+
return (
{groupManager && }
- {!groupMembers ? (
+ {!groupMembers || areMembersLoading ? (
) : (
- groupMembers?.map((groupMember) => (
-
- ))
+
)}
);
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/useFetchGroup.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/useFetchGroup.js
index c65aff8872..cb2b08f351 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/useFetchGroup.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/useFetchGroup.js
@@ -45,7 +45,7 @@ const useFetchGroup = (groupId, fetchedGroupId, setGroup) => {
setIsLoading(true);
}
- getGroupById(groupId, abortControllerRef.current?.signal)
+ getGroupById(groupId, false, abortControllerRef.current?.signal)
.then((data) => {
if (isMount.current) startTransition(() => setGroup(data));
})
diff --git a/packages/shared/api/groups/index.ts b/packages/shared/api/groups/index.ts
index e9f642f9cf..25f72dc909 100644
--- a/packages/shared/api/groups/index.ts
+++ b/packages/shared/api/groups/index.ts
@@ -69,12 +69,16 @@ export const getGroups = (filter = Filter.getDefault()) => {
});
};
-export const getGroupById = (groupId: string, signal: AbortSignal) => {
+export const getGroupById = (
+ groupId: string,
+ includeMembers: boolean = false,
+ signal?: AbortSignal,
+) => {
return request({
method: "get",
- url: `/group/${groupId}`,
+ url: `/group/${groupId}?includeMembers=${includeMembers}`,
signal,
- });
+ }) as Promise;
};
export const getGroupsByName = async (
diff --git a/packages/shared/api/groups/types.ts b/packages/shared/api/groups/types.ts
index 1669911d06..e8d103736e 100644
--- a/packages/shared/api/groups/types.ts
+++ b/packages/shared/api/groups/types.ts
@@ -34,6 +34,7 @@ export type TGroup = {
name: string;
parent: string;
isGroup?: boolean;
+ members?: TUser[];
membersCount: number;
shared?: boolean;
isLDAP: boolean;
From a8e5a244f72aa631092eab4ea2585c287bbc0a4c Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Mon, 29 Jul 2024 14:48:36 +0200
Subject: [PATCH 14/45] Client: EditGroupDialog: Rewrite dialog to work with
infinite loader
---
.../CreateEditGroupDialog.styled.ts | 32 ++
.../CreateGroupDialog.tsx | 4 +-
.../CreateEditGroupDialog/EditGroupDialog.tsx | 287 ++++++++++--------
.../sub-components/BodyLoader/BodyLoader.tsx | 43 +++
.../sub-components/GroupMemberRow/index.tsx | 19 +-
.../GroupMembersList/GroupMembersList.tsx | 152 ++++++++++
.../SelectGroupManagerPanel.tsx | 7 +-
.../sub-components/HeadOfGroupParam/index.tsx | 27 +-
.../sub-components/MembersParam/index.tsx | 78 +++--
.../MembersSelector.tsx} | 63 ++--
.../create-components/SelectMembersPanel.tsx} | 66 ++--
.../edit-components/SelectMembersPanel.tsx | 62 ++++
.../components/panels/AddUsersPanel/index.tsx | 19 +-
packages/client/src/store/EditGroupStore.ts | 248 +++++++++++++++
packages/client/src/store/GroupsStore.ts | 2 +-
packages/client/src/store/index.js | 4 +
packages/shared/api/groups/index.ts | 2 +-
packages/shared/api/groups/types.ts | 2 +-
.../components/selector/Selector.types.ts | 3 +
19 files changed, 849 insertions(+), 271 deletions(-)
create mode 100644 packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/BodyLoader/BodyLoader.tsx
create mode 100644 packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMembersList/GroupMembersList.tsx
rename packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/{MembersParam/SelectGroupMembersPanel.tsx => MembersSelector/MembersSelector.tsx} (67%)
rename packages/client/src/components/dialogs/CreateEditGroupDialog/{utils/index.ts => sub-components/create-components/SelectMembersPanel.tsx} (54%)
create mode 100644 packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/edit-components/SelectMembersPanel.tsx
create mode 100644 packages/client/src/store/EditGroupStore.ts
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateEditGroupDialog.styled.ts b/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateEditGroupDialog.styled.ts
index 795b0eaac0..e0d9b7ae7c 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateEditGroupDialog.styled.ts
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateEditGroupDialog.styled.ts
@@ -34,3 +34,35 @@ export const StyledModal = styled(ModalDialog)`
padding-top: 20px;
}
`;
+
+export const StyledBodyLoader = styled.div`
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+
+ .title-section {
+ margin-bottom: 14px;
+ }
+
+ .group-title {
+ margin-bottom: 4px;
+ height: 16px;
+ padding-top: 4px;
+ }
+
+ .manager-title,
+ .members-title {
+ padding-block: 8px;
+ }
+
+ .add-member-container {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-block: 8px;
+ }
+
+ .member-row {
+ padding-inline: 0;
+ }
+`;
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx
index 71cf29c8ba..3c0d2bfdaf 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx
@@ -42,7 +42,7 @@ import GroupNameParam from "./sub-components/GroupNameParam";
import HeadOfGroup from "./sub-components/HeadOfGroupParam";
import MembersParam from "./sub-components/MembersParam";
import SelectGroupManagerPanel from "./sub-components/HeadOfGroupParam/SelectGroupManagerPanel";
-import SelectGroupMembersPanel from "./sub-components/MembersParam/SelectGroupMembersPanel";
+import { SelectMembersPanel } from "./sub-components/create-components/SelectMembersPanel";
interface CreateGroupDialogProps {
visible: boolean;
@@ -177,7 +177,7 @@ const CreateGroupDialog = ({
)}
{selectMembersPanelIsVisible && (
- ;
+
+type EditGroupDialogProps = {
+ group: TGroup;
visible: boolean;
onClose: () => void;
- updateGroup: (
- groupId: string,
- groupName: string,
- groupManager: string,
- membersToAdd: string[],
- membersToRemove: string[],
- ) => Promise;
-}
+ injectedProps?: InjectedProps;
+};
const EditGroupDialog = ({
group,
visible,
onClose,
- updateGroup,
- setInfoPanelSelectedGroup,
+
+ injectedProps,
}: EditGroupDialogProps) => {
+ const {
+ initGroupData,
+ resetGroupData,
+ isInit,
+ loadMembers,
+ manager,
+ addManager,
+ removeManager,
+ members,
+ addMembers,
+ removeMember,
+ currentTotal,
+ submitChanges,
+ title,
+ setTitle,
+ hasChanges,
+ } = injectedProps!;
+
const { t } = useTranslation(["PeopleTranslations", "Common"]);
-
- const [initialMembersIds, setInitialMembersIds] = useState([]);
-
- const [isCreateGroupLoading, setCreateGroupIsLoading] =
- useState(false);
-
- const [isFetchMembersLoading, setFetchMembersIsLoading] =
- useState(false);
-
- const [groupParams, setGroupParams] = useState({
- groupName: group.name,
- groupManager: group.manager,
- groupMembers: null,
- });
-
- const prevGroupParams = useRef({ ...groupParams });
-
- const onChangeGroupName = (e: ChangeEvent) =>
- setGroupParams((prev) => ({ ...prev, groupName: e.target.value }));
-
- const setGroupManager = (groupManager: object | null) =>
- setGroupParams((prev) => ({ ...prev, groupManager }));
-
- const setGroupMembers = (groupMembers: object[]) =>
- setGroupParams((prev) => ({ ...prev, groupMembers }));
-
+ const [isSubmitting, setIsSubmitting] = useState(false);
const [selectGroupMangerPanelIsVisible, setSelectGroupMangerPanelIsVisible] =
useState(false);
+ const [selectMembersPanelIsVisible, setSelectMembersPanelIsVisible] =
+ useState(false);
+
+ const onChangeGroupName = (e: ChangeEvent) => {
+ setTitle(e.target.value);
+ };
+
+ const closeModal = () => {
+ resetGroupData();
+ onClose();
+ };
const onShowSelectGroupManagerPanel = () =>
setSelectGroupMangerPanelIsVisible(true);
const onHideSelectGroupManagerPanel = () =>
setSelectGroupMangerPanelIsVisible(false);
- const [selectMembersPanelIsVisible, setSelectMembersPanelIsVisible] =
- useState(false);
-
const onShowSelectMembersPanel = () => setSelectMembersPanelIsVisible(true);
const onHideSelectMembersPanel = () => setSelectMembersPanelIsVisible(false);
const onEditGroup = async () => {
- setCreateGroupIsLoading(true);
+ setIsSubmitting(true);
- const groupManagerId = groupParams.groupManager?.id || undefined;
+ await submitChanges();
- const newMembersIds =
- groupParams.groupMembers?.map((gm: any) => gm.id) || [];
- const membersToAdd = newMembersIds.filter(
- (gm) => !initialMembersIds.includes(gm),
- );
- const membersToDelete = initialMembersIds.filter(
- (gm) => !newMembersIds.includes(gm),
- );
-
- await updateGroup(
- group.id,
- groupParams.groupName,
- groupManagerId,
- membersToAdd,
- membersToDelete,
- );
-
- setCreateGroupIsLoading(false);
- onClose();
+ setIsSubmitting(false);
+ closeModal();
};
- const notEnoughGroupParamsToEdit =
- !groupParams.groupName ||
- (!groupParams.groupManager && !groupParams.groupMembers?.length);
-
- const groupParamsNotChanged = compareGroupParams(
- groupParams,
- prevGroupParams.current,
- );
-
useEffect(() => {
- if (groupParams.groupMembers) return;
- setFetchMembersIsLoading(true);
+ initGroupData(group);
- getGroupById(group.id, true)!
- .then((data: any) => {
- prevGroupParams.current.groupMembers = data.members;
- setInitialMembersIds(data.members.map((gm) => gm.id));
- setGroupMembers(data.members);
- })
- .then((data) => {
- setInfoPanelSelectedGroup(data);
- })
- .catch((err) => console.error(err))
- .finally(() => setFetchMembersIsLoading(false));
- }, [group.id]);
+ return () => {
+ resetGroupData();
+ };
+ }, []);
+
+ const notEnoughParamsToEdit = !title || (!manager && !members?.length);
return (
<>
{t("PeopleTranslations:EditGroup")}
-
-
- {!isFetchMembersLoading && (
-
+ {isInit ? (
+ <>
+
+
+
+
+ >
+ ) : (
+
)}
@@ -198,21 +186,21 @@ const EditGroupDialog = ({
id="edit-group-modal_submit"
tabIndex={5}
label={t("Common:SaveButton")}
- size="normal"
+ size={ButtonSize.normal}
primary
scale
onClick={onEditGroup}
- isDisabled={notEnoughGroupParamsToEdit || groupParamsNotChanged}
- isLoading={isCreateGroupLoading}
+ isDisabled={!hasChanges || notEnoughParamsToEdit}
+ isLoading={isSubmitting}
/>
@@ -222,25 +210,60 @@ const EditGroupDialog = ({
isVisible={selectGroupMangerPanelIsVisible}
onClose={onHideSelectGroupManagerPanel}
onParentPanelClose={onClose}
- setGroupManager={setGroupManager}
+ setGroupManager={addManager}
/>
)}
{selectMembersPanelIsVisible && (
-
)}
>
);
};
-export default inject(({ peopleStore, infoPanelStore }) => ({
- updateGroup: peopleStore.groupsStore.updateGroup,
- setInfoPanelSelectedGroup: infoPanelStore.setInfoPanelSelectedGroup,
-}))(observer(EditGroupDialog));
+export default inject<{ editGroupStore: EditGroupStore }>(
+ ({ editGroupStore }) => {
+ const {
+ initGroupData,
+ resetGroupData,
+ isInit,
+ loadMembers,
+ manager,
+ addManager,
+ removeManager,
+ members,
+ addMembers,
+ removeMember,
+ currentTotal,
+ submitChanges,
+ title,
+ setTitle,
+ hasChanges,
+ } = editGroupStore;
+
+ return {
+ injectedProps: {
+ initGroupData,
+ resetGroupData,
+ isInit,
+ loadMembers,
+ manager,
+ addManager,
+ removeManager,
+ members,
+ addMembers,
+ removeMember,
+ currentTotal,
+ submitChanges,
+ title,
+ setTitle,
+ hasChanges,
+ },
+ };
+ },
+)(observer(EditGroupDialog));
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/BodyLoader/BodyLoader.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/BodyLoader/BodyLoader.tsx
new file mode 100644
index 0000000000..2655f30804
--- /dev/null
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/BodyLoader/BodyLoader.tsx
@@ -0,0 +1,43 @@
+import React from "react";
+
+import { RectangleSkeleton } from "@docspace/shared/skeletons";
+import { RowLoader } from "@docspace/shared/skeletons/selector";
+
+import { StyledBodyLoader } from "../../CreateEditGroupDialog.styled";
+
+export const BodyLoader = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.tsx
index a5d2ee61ac..e0854106e3 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow/index.tsx
@@ -24,11 +24,10 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+import { memo } from "react";
import { ReactSVG } from "react-svg";
import { useTranslation } from "react-i18next";
-import RemoveReactSvgUrl from "PUBLIC_DIR/images/remove.react.svg?url";
-
import {
Avatar,
AvatarRole,
@@ -36,18 +35,16 @@ import {
} from "@docspace/shared/components/avatar";
import { getUserRole, getUserTypeLabel } from "@docspace/shared/utils/common";
import { TUser } from "@docspace/shared/api/people/types";
+import RemoveReactSvgUrl from "PUBLIC_DIR/images/remove.react.svg?url";
import * as Styled from "./index.styled";
interface GroupMemberRowProps {
groupMember: TUser;
- onClickRemove: () => void;
+ removeMember: (member: TUser) => void;
}
-const GroupMemberRow = ({
- groupMember,
- onClickRemove,
-}: GroupMemberRowProps) => {
+const GroupMemberRow = ({ groupMember, removeMember }: GroupMemberRowProps) => {
const { t } = useTranslation(["Common"]);
const role = getUserRole(groupMember);
@@ -68,6 +65,10 @@ const GroupMemberRow = ({
default:
}
+ const onRemove = () => {
+ removeMember(groupMember);
+ };
+
return (
);
};
-export default GroupMemberRow;
+export default memo(GroupMemberRow);
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMembersList/GroupMembersList.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMembersList/GroupMembersList.tsx
new file mode 100644
index 0000000000..6d319fb4f6
--- /dev/null
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/GroupMembersList/GroupMembersList.tsx
@@ -0,0 +1,152 @@
+// (c) Copyright Ascensio System SIA 2009-2024
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+import React, { useCallback, useEffect, useState } from "react";
+import {
+ Index,
+ IndexRange,
+ InfiniteLoader,
+ List,
+ ListRowProps,
+ WindowScroller,
+} from "react-virtualized";
+import styled from "styled-components";
+
+import { TUser } from "@docspace/shared/api/people/types";
+import { RowLoader } from "@docspace/shared/skeletons/selector";
+import GroupMemberRow from "SRC_DIR/components/dialogs/CreateEditGroupDialog/sub-components/GroupMemberRow";
+
+const ROW_HEIGHT = 50;
+
+export const StyledList = styled(List)`
+ width: ${({ width }) => `${width - 16}px`} !important;
+
+ .group-member-row-loader {
+ padding: 0;
+ }
+`;
+
+interface GroupMembersListProps {
+ members: TUser[];
+ removeMember: (member: TUser) => void;
+ loadNextPage: (startIndex: number) => Promise;
+ hasNextPage: boolean;
+ total: number;
+}
+
+export const GroupMembersList = (props: GroupMembersListProps) => {
+ const { members, removeMember, loadNextPage, hasNextPage, total } = props;
+
+ const [scrollElement, setScrollElement] = useState(
+ null,
+ );
+ const [isNextPageLoading, setIsNextPageLoading] = useState(false);
+
+ const itemsCount = hasNextPage ? members.length + 1 : members.length;
+
+ const isItemLoaded = useCallback(
+ ({ index }: Index) => {
+ return !hasNextPage || index < itemsCount;
+ },
+ [hasNextPage, itemsCount],
+ );
+
+ const loadMoreItems = isNextPageLoading
+ ? async () => {}
+ : async ({ startIndex }: IndexRange) => {
+ setIsNextPageLoading(true);
+ await loadNextPage(startIndex - 1);
+ setIsNextPageLoading(false);
+ };
+
+ const renderRow = ({ key, index, style }: ListRowProps) => {
+ const item = members[index];
+
+ return (
+
+ {item ? (
+
+ ) : (
+
+ )}
+
+ );
+ };
+
+ useEffect(() => {
+ const scrollEl = document.querySelector(
+ "#modal-scroll > .scroll-wrapper > .scroller",
+ );
+
+ if (scrollEl) {
+ setScrollElement(scrollEl as HTMLDivElement);
+ }
+ }, []);
+
+ if (!scrollElement) {
+ return null;
+ }
+
+ return (
+
+ {({ onRowsRendered, registerChild }) => (
+
+ {({ height, isScrolling, scrollTop }) => {
+ const scrollBodyRect =
+ scrollElement.children[0].getBoundingClientRect();
+
+ return (
+
+ );
+ }}
+
+ )}
+
+ );
+};
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/SelectGroupManagerPanel.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/SelectGroupManagerPanel.tsx
index a7b7b6d8c3..c61e38a9c2 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/SelectGroupManagerPanel.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/SelectGroupManagerPanel.tsx
@@ -25,8 +25,11 @@
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { useTranslation } from "react-i18next";
+
import { ShareAccessRights } from "@docspace/shared/enums";
import { Portal } from "@docspace/shared/components/portal";
+import { TUser } from "@docspace/shared/api/people/types";
+
import AddUsersPanel from "../../../../panels/AddUsersPanel";
import { getAccessOptions } from "../../../../panels/InvitePanel/utils";
@@ -34,7 +37,7 @@ interface SelectGroupManagerPanelProps {
isVisible: boolean;
onClose: () => void;
onParentPanelClose: () => void;
- setGroupManager: (groupManager: object) => void;
+ setGroupManager: (groupManager: TUser) => void;
}
const SelectGroupManagerPanel = ({
@@ -46,7 +49,7 @@ const SelectGroupManagerPanel = ({
const { t } = useTranslation(["InviteDialog"]);
const accessOptions = getAccessOptions(t);
- const onSelectGroupManager = (newGroupManager: object[]) => {
+ const onSelectGroupManager = (newGroupManager: TUser[]) => {
setGroupManager(newGroupManager[0]);
};
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.tsx
index c265296ef5..e321c94151 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/HeadOfGroupParam/index.tsx
@@ -24,37 +24,28 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-import { useState } from "react";
import { useTranslation } from "react-i18next";
+
import { SelectorAddButton } from "@docspace/shared/components/selector-add-button";
-import * as Styled from "./index.styled";
+import { TUser } from "@docspace/shared/api/people/types";
import PlusSvgUrl from "PUBLIC_DIR/images/icons/16/button.plus.react.svg?url";
-import SelectGroupManagerPanel from "./SelectGroupManagerPanel";
+
+import * as Styled from "./index.styled";
import GroupMemberRow from "../GroupMemberRow";
interface HeadOfGroupProps {
- groupManager: object | null;
- setGroupManager: (groupManager: object | null) => void;
- groupMembers: object[] | null;
- setGroupMembers: (groupMembers: object[]) => void;
+ groupManager: TUser | null;
+ removeManager: () => void;
+ onShowSelectGroupManagerPanel: () => void;
}
const HeadOfGroup = ({
groupManager,
- setGroupManager,
- groupMembers,
- setGroupMembers,
+ removeManager,
onShowSelectGroupManagerPanel,
}: HeadOfGroupProps) => {
const { t } = useTranslation(["Common"]);
- const onRemoveGroupManager = () => {
- setGroupManager(null);
- setGroupMembers(
- groupMembers?.filter((gm) => gm.id !== groupManager!.id) || [],
- );
- };
-
return (
{t("Common:HeadOfGroup")}
@@ -67,7 +58,7 @@ const HeadOfGroup = ({
) : (
)}
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx
index 60d0232c58..b376ec4e95 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx
@@ -26,38 +26,49 @@
import { useCallback } from "react";
import { useTranslation } from "react-i18next";
+
import { SelectorAddButton } from "@docspace/shared/components/selector-add-button";
+import { TUser } from "@docspace/shared/api/people/types";
import PlusSvgUrl from "PUBLIC_DIR/images/icons/16/button.plus.react.svg?url";
+
import * as Styled from "./index.styled";
-import SelectGroupMembersPanel from "./SelectGroupMembersPanel";
import GroupMemberRow from "../GroupMemberRow";
+import { GroupMembersList } from "../GroupMembersList/GroupMembersList";
-interface GroupMember {
- id: string;
-}
+type InfiniteLoaderProps =
+ | {
+ withInfiniteLoader: true;
+ loadNextPage: (startIndex: number) => Promise;
+ hasNextPage: boolean;
+ total: number;
+ }
+ | Partial<{
+ withInfiniteLoader: undefined;
+ loadNextPage: undefined;
+ hasNextPage: undefined;
+ total: undefined;
+ }>;
-interface MembersParamProps {
- groupManager: GroupMember | null;
- groupMembers: GroupMember[] | null;
- setGroupMembers: (groupMembers: GroupMember[]) => void;
+type MembersParamProps = {
+ groupManager: TUser | null;
+ groupMembers: TUser[] | null;
+ setGroupMembers: (groupMembers: TUser[]) => void;
onShowSelectMembersPanel: () => void;
-}
+ removeMember: (member: TUser) => void;
+} & InfiniteLoaderProps;
+
const MembersParam = ({
groupManager,
groupMembers,
- setGroupMembers,
onShowSelectMembersPanel,
+ withInfiniteLoader,
+ hasNextPage,
+ loadNextPage,
+ total,
+ removeMember,
}: MembersParamProps) => {
const { t } = useTranslation(["Common", "PeopleTranslation"]);
- const onRemoveUserById = useCallback(
- (id: string) => {
- const newGroupMembers = groupMembers?.filter((gm) => gm.id !== id);
- setGroupMembers(newGroupMembers || []);
- },
- [groupMembers, setGroupMembers],
- );
-
return (
{t("Common:Members")}
@@ -67,16 +78,27 @@ const MembersParam = ({
{t("PeopleTranslations:AddMembers")}
- {groupMembers &&
- groupMembers
- .filter((member) => member.id !== groupManager?.id)
- .map((member) => (
-
onRemoveUserById(member.id)}
- />
- ))}
+ {groupMembers ? (
+ withInfiniteLoader ? (
+
+ ) : (
+ groupMembers
+ .filter((member) => member.id !== groupManager?.id)
+ .map((member) => (
+
+ ))
+ )
+ ) : null}
);
};
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/SelectGroupMembersPanel.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersSelector/MembersSelector.tsx
similarity index 67%
rename from packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/SelectGroupMembersPanel.tsx
rename to packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersSelector/MembersSelector.tsx
index 6d09e4510e..8f38acc29b 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/SelectGroupMembersPanel.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersSelector/MembersSelector.tsx
@@ -26,59 +26,38 @@
import React from "react";
import { useTranslation } from "react-i18next";
+
import { ShareAccessRights } from "@docspace/shared/enums";
-import { toastr } from "@docspace/shared/components/toast";
import { Portal } from "@docspace/shared/components/portal";
import { TUser } from "@docspace/shared/api/people/types";
-import { TSelectorItem } from "@docspace/shared/components/selector";
+
import AddUsersPanel from "../../../../panels/AddUsersPanel";
import { getAccessOptions } from "../../../../panels/InvitePanel/utils";
-interface SelectGroupMembersPanelProps {
+type MembersSelectorProps = {
isVisible: boolean;
onClose: () => void;
onParentPanelClose: () => void;
- groupManager?: TUser;
- groupMembers: TUser[];
- setGroupMembers: (groupMembers: (TUser | TSelectorItem)[]) => void;
-}
-const SelectGroupMembersPanel = ({
+ addMembers: (members: TUser[]) => void;
+} & (
+ | { checkIfUserInvited: (user: TUser) => boolean; invitedUsers?: undefined }
+ | { invitedUsers: string[]; checkIfUserInvited?: undefined }
+);
+
+export const MembersSelector = ({
isVisible,
- onClose,
+ addMembers,
onParentPanelClose,
- groupManager,
- groupMembers,
- setGroupMembers,
-}: SelectGroupMembersPanelProps) => {
+ onClose,
+ checkIfUserInvited,
+ invitedUsers,
+}: MembersSelectorProps) => {
const { t } = useTranslation(["InviteDialog"]);
const accessOptions = getAccessOptions(t, 5, false, true);
-
- const onAddGroupMembers = (newGroupMembers: TSelectorItem[]) => {
- const resultGroupMembers: (TUser | TSelectorItem)[] = [...groupMembers];
- let showErrorWasSelected = false;
-
- newGroupMembers.forEach((groupMember) => {
- if (groupMembers.findIndex((gm) => gm.id === groupMember.id) !== -1) {
- showErrorWasSelected = true;
- return;
- }
- resultGroupMembers.push(groupMember);
- });
-
- if (showErrorWasSelected) {
- toastr.warning("Some users have already been added");
- }
-
- setGroupMembers(resultGroupMembers);
- };
-
- const invitedUsers = React.useMemo(
- () => [...groupMembers].map((g) => g?.id),
- [groupMembers],
- );
-
- if (groupManager) invitedUsers.push(groupManager.id);
+ const invitedProps = checkIfUserInvited
+ ? { checkIfUserInvited }
+ : { invitedUsers };
return (
}
/>
);
};
-
-export default SelectGroupMembersPanel;
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/utils/index.ts b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx
similarity index 54%
rename from packages/client/src/components/dialogs/CreateEditGroupDialog/utils/index.ts
rename to packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx
index eeb87bdf5b..982cfda2e0 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/utils/index.ts
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx
@@ -24,41 +24,43 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+import React from "react";
+
import { TUser } from "@docspace/shared/api/people/types";
-import { EditGroupParams, GroupMembers } from "../types";
-const compareMembers = (a: GroupMembers, b: GroupMembers): boolean => {
- if (!a && !b) return true;
- if (!Array.isArray(a) || !Array.isArray(b)) return false;
- if (a.length !== b.length) return false;
+import { MembersSelector } from "../MembersSelector/MembersSelector";
- const sortCb = (first: TUser, second: TUser) =>
- first.id < second.id ? -1 : 1;
- const sortedA = [...a].sort(sortCb);
- const sortedB = [...b].sort(sortCb);
-
- return !sortedA.some((el, i) => el.id !== sortedB[i].id);
+type SelectMembersPanelProps = {
+ isVisible: boolean;
+ onClose: () => void;
+ onParentPanelClose: () => void;
+ groupManager?: TUser;
+ groupMembers: TUser[];
+ addMembers: (members: TUser[]) => void;
};
-const removeManagerFromMembers = (members: GroupMembers, managerId: string) => {
- return members?.filter((g) => g.id !== managerId) || null;
-};
-
-export const compareGroupParams = (
- prev: EditGroupParams,
- current: EditGroupParams,
-): boolean => {
- const equalTitle = prev.groupName === current.groupName;
- const equalManager = prev.groupManager?.id === current.groupManager?.id;
-
- const prevGroupMembers = prev.groupManager?.id
- ? removeManagerFromMembers(prev.groupMembers, prev.groupManager.id)
- : prev.groupMembers;
- const currentGroupMembers = current.groupManager?.id
- ? removeManagerFromMembers(current.groupMembers, current.groupManager.id)
- : current.groupMembers;
-
- const equalMembers = compareMembers(prevGroupMembers, currentGroupMembers);
-
- return equalTitle && equalManager && equalMembers;
+export const SelectMembersPanel = ({
+ isVisible,
+ onClose,
+ onParentPanelClose,
+ groupManager,
+ groupMembers,
+ addMembers,
+}: SelectMembersPanelProps) => {
+ const invitedUsers = React.useMemo(
+ () => [...groupMembers].map((g) => g?.id),
+ [groupMembers],
+ );
+
+ if (groupManager) invitedUsers.push(groupManager.id);
+
+ return (
+
+ );
};
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/edit-components/SelectMembersPanel.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/edit-components/SelectMembersPanel.tsx
new file mode 100644
index 0000000000..0d6fc1cc65
--- /dev/null
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/edit-components/SelectMembersPanel.tsx
@@ -0,0 +1,62 @@
+import React from "react";
+import { inject, observer } from "mobx-react";
+
+import { TUser } from "@docspace/shared/api/people/types";
+import EditGroupStore from "SRC_DIR/store/EditGroupStore";
+
+import { MembersSelector } from "../MembersSelector/MembersSelector";
+
+type InjectedProps = Pick<
+ EditGroupStore,
+ "group" | "removedMembersMap" | "addedMembersMap"
+>;
+
+type SelectMembersPanelProps = {
+ isVisible: boolean;
+ onClose: () => void;
+ onParentPanelClose: () => void;
+ addMembers: (members: TUser[]) => void;
+
+ injectedProps?: InjectedProps;
+};
+
+const Panel = ({
+ isVisible,
+ onClose,
+ onParentPanelClose,
+ addMembers,
+
+ injectedProps,
+}: SelectMembersPanelProps) => {
+ const { addedMembersMap, removedMembersMap, group } = injectedProps!;
+
+ const checkIfUserInvited = (user: TUser) => {
+ if (removedMembersMap.has(user.id)) {
+ return false;
+ }
+
+ if (addedMembersMap.has(user.id)) {
+ return true;
+ }
+
+ return Boolean(user.groups?.find((g) => g.id === group?.id));
+ };
+
+ return (
+
+ );
+};
+
+export const SelectMembersPanel = inject<{ editGroupStore: EditGroupStore }>(
+ ({ editGroupStore }) => {
+ const { group, removedMembersMap, addedMembersMap } = editGroupStore;
+
+ return { injectedProps: { group, removedMembersMap, addedMembersMap } };
+ },
+)(observer(Panel));
diff --git a/packages/client/src/components/panels/AddUsersPanel/index.tsx b/packages/client/src/components/panels/AddUsersPanel/index.tsx
index 8ae26aa7b2..45c2cb7717 100644
--- a/packages/client/src/components/panels/AddUsersPanel/index.tsx
+++ b/packages/client/src/components/panels/AddUsersPanel/index.tsx
@@ -71,6 +71,7 @@ const toListItem = (
invitedUsers?: string[],
disableDisabledUsers?: boolean,
isRoom?: boolean,
+ checkIfUserInvited?: (user: TUser) => void,
) => {
if ("displayName" in item) {
const {
@@ -87,13 +88,16 @@ const toListItem = (
isRoomAdmin,
status,
shared,
+ groups,
} = item;
const role = getUserRole(item);
const userAvatar = hasAvatar ? avatar : DefaultUserPhoto;
- const isInvited = invitedUsers?.includes(id) || (isRoom && shared);
+ const isInvited = checkIfUserInvited
+ ? checkIfUserInvited(item)
+ : invitedUsers?.includes(id) || (isRoom && shared);
const isDisabled =
disableDisabledUsers && status === EmployeeStatus.Disabled;
@@ -117,6 +121,7 @@ const toListItem = (
isRoomAdmin,
isDisabled: isInvited || isDisabled,
disabledText,
+ groups,
} as TSelectorItem;
}
@@ -162,6 +167,7 @@ type AddUsersPanelProps = {
invitedUsers?: string[];
disableDisabledUsers?: boolean;
+ checkIfUserInvited?: (user: TUser) => boolean;
roomId?: string | number;
withGroups?: boolean;
@@ -189,6 +195,7 @@ const AddUsersPanel = ({
invitedUsers,
disableDisabledUsers,
+ checkIfUserInvited,
}: AddUsersPanelProps) => {
const theme = useTheme();
const { t } = useTranslation([
@@ -285,6 +292,7 @@ const AddUsersPanel = ({
newItem.isCollaborator = user.isCollaborator;
newItem.isRoomAdmin = user.isRoomAdmin;
newItem.email = user.email;
+ newItem.groups = user.groups;
}
items.push(newItem);
@@ -366,7 +374,14 @@ const AddUsersPanel = ({
const totalDifferent = startIndex ? response.total - totalRef.current : 0;
const items = response.items.map((item) =>
- toListItem(item, t, invitedUsers, disableDisabledUsers, !!roomId),
+ toListItem(
+ item,
+ t,
+ invitedUsers,
+ disableDisabledUsers,
+ !!roomId,
+ checkIfUserInvited,
+ ),
);
const newTotal = response.total - totalDifferent;
diff --git a/packages/client/src/store/EditGroupStore.ts b/packages/client/src/store/EditGroupStore.ts
new file mode 100644
index 0000000000..541ace92c8
--- /dev/null
+++ b/packages/client/src/store/EditGroupStore.ts
@@ -0,0 +1,248 @@
+// (c) Copyright Ascensio System SIA 2009-2024
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+import { makeAutoObservable } from "mobx";
+
+import { TUser } from "@docspace/shared/api/people/types";
+import { TGroup } from "@docspace/shared/api/groups/types";
+import AccountsFilter from "@docspace/shared/api/people/filter";
+import api from "@docspace/shared/api";
+import PeopleStore from "SRC_DIR/store/PeopleStore";
+import GroupsStore from "SRC_DIR/store/GroupsStore";
+
+class EditGroupStore {
+ isInit = false;
+
+ group: TGroup | null = null;
+
+ title: string = "";
+
+ manager: TUser | null = null;
+
+ members: TUser[] | null = null;
+
+ addedMembersMap: Map = new Map();
+
+ removedMembersMap: Map = new Map();
+
+ initialTotal: number = 0;
+
+ filter = AccountsFilter.getDefault();
+
+ peopleStore: PeopleStore;
+
+ constructor(peopleStore: PeopleStore) {
+ this.peopleStore = peopleStore;
+
+ makeAutoObservable(this);
+ }
+
+ initGroupData = async (group: TGroup) => {
+ try {
+ this.setGroup(group);
+ this.setTitle(group.name);
+
+ if (group.manager) {
+ this.setManager(group.manager);
+ }
+
+ this.filter.group = group.id;
+ this.filter.pageCount = 100;
+
+ await this.loadMembers(0);
+
+ this.setIsInit(true);
+ } catch (e) {
+ console.log(e);
+ }
+ };
+
+ resetGroupData = () => {
+ this.isInit = false;
+ this.group = null;
+ this.title = "";
+ this.manager = null;
+ this.members = null;
+ this.addedMembersMap = new Map();
+ this.removedMembersMap = new Map();
+ this.initialTotal = 0;
+ this.filter = AccountsFilter.getDefault();
+ };
+
+ loadMembers = async (startIndex: number) => {
+ try {
+ if (!this.group?.id) return;
+
+ this.filter.page = !startIndex ? 0 : this.filter.page + 1;
+
+ const res = await api.people.getUserList(this.filter);
+
+ const membersWithoutManager = res.items.filter(
+ (item) =>
+ item.id !== this.manager?.id || item.id !== this.group?.manager?.id,
+ );
+
+ this.setInitialTotal(res.total);
+
+ if (startIndex === 0 || !this.members) {
+ this.setMembers(membersWithoutManager);
+ } else {
+ this.setMembers([...this.members, ...membersWithoutManager]);
+ }
+ } catch (e) {
+ console.log(e);
+ }
+ };
+
+ submitChanges = async () => {
+ try {
+ if (!this.group) return;
+
+ const { updateGroup } = this.peopleStore.groupsStore! as GroupsStore;
+
+ const addedIds = Array.from(this.addedMembersMap.keys());
+ const removedIds = Array.from(this.removedMembersMap.keys());
+
+ await updateGroup(
+ this.group?.id,
+ this.title.trim(),
+ this.manager?.id,
+ addedIds,
+ removedIds,
+ );
+ } catch (e) {
+ console.log(e);
+ }
+ };
+
+ addManager = (manager: TUser) => {
+ this.removedMembersMap.delete(manager.id);
+ const alreadyMember = manager.groups?.find((g) => g.id === this.group?.id);
+
+ if (!alreadyMember) {
+ this.addedMembersMap.set(manager.id, manager);
+ }
+
+ if (this.members?.length) {
+ this.members = this.members.filter((member) => member.id !== manager.id);
+ }
+
+ this.manager = manager;
+ };
+
+ removeManager = () => {
+ if (!this.manager) return;
+
+ const wasAdded = this.addedMembersMap.delete(this.manager.id);
+
+ if (!wasAdded) {
+ this.removedMembersMap.set(this.manager.id, this.manager);
+ }
+
+ this.manager = null;
+ };
+
+ setIsInit = (value: boolean) => {
+ this.isInit = value;
+ };
+
+ setGroup = (group: TGroup) => {
+ this.group = group;
+ };
+
+ setTitle = (title: string) => {
+ this.title = title;
+ };
+
+ setManager = (manager: TUser | null) => {
+ this.manager = manager;
+ };
+
+ setMembers = (members: TUser[] | null) => {
+ this.members = members;
+ };
+
+ addMembers = (members: TUser[]) => {
+ members.forEach((member) => {
+ const wasRemoved = this.removedMembersMap.delete(member.id);
+
+ if (!wasRemoved) {
+ this.addedMembersMap.set(member.id, member);
+ }
+ });
+
+ this.members = this.members ? [...this.members, ...members] : members;
+ };
+
+ removeMember = (member: TUser) => {
+ const wasAdded = this.addedMembersMap.delete(member.id);
+
+ if (!wasAdded) {
+ this.removedMembersMap.set(member.id, member);
+ }
+
+ this.members = this.members?.filter((m) => m.id !== member.id) || null;
+ };
+
+ setInitialTotal = (total: number) => {
+ this.initialTotal = total;
+ };
+
+ get currentTotal() {
+ let total =
+ this.initialTotal +
+ this.addedMembersMap.size -
+ this.removedMembersMap.size;
+
+ const prevManager = this.group?.manager;
+ const newManager = this.manager;
+ const managerWasChanged = prevManager?.id !== newManager?.id;
+
+ if (prevManager && !managerWasChanged) {
+ total -= 1;
+ }
+
+ if (newManager && managerWasChanged) {
+ total -= 1;
+ }
+
+ return total;
+ }
+
+ get hasChanges() {
+ const titleWasChanged = this.title.trim() !== this.group?.name;
+ const managerWasChanged = this.group?.manager?.id !== this.manager?.id;
+
+ return (
+ titleWasChanged ||
+ managerWasChanged ||
+ this.addedMembersMap.size ||
+ this.removedMembersMap.size
+ );
+ }
+}
+
+export default EditGroupStore;
diff --git a/packages/client/src/store/GroupsStore.ts b/packages/client/src/store/GroupsStore.ts
index 398255f934..28a14c28b2 100644
--- a/packages/client/src/store/GroupsStore.ts
+++ b/packages/client/src/store/GroupsStore.ts
@@ -637,7 +637,7 @@ class GroupsStore {
updateGroup = async (
groupId: string,
groupName: string,
- groupManagerId: string,
+ groupManagerId: string | undefined,
membersToAdd: string[],
membersToRemove: string[],
) => {
diff --git a/packages/client/src/store/index.js b/packages/client/src/store/index.js
index 8d2478efe5..7a3f831d8d 100644
--- a/packages/client/src/store/index.js
+++ b/packages/client/src/store/index.js
@@ -80,6 +80,7 @@ import ImportAccountsStore from "./ImportAccountsStore";
import PluginStore from "./PluginStore";
import InfoPanelStore from "./InfoPanelStore";
import CampaignsStore from "./CampaignsStore";
+import EditGroupStore from "./EditGroupStore";
const selectedFolderStore = new SelectedFolderStore(settingsStore);
@@ -300,6 +301,8 @@ const storageManagement = new StorageManagement(
const campaignsStore = new CampaignsStore(settingsStore, userStore);
+const editGroupStore = new EditGroupStore(peopleStore);
+
const store = {
authStore,
userStore,
@@ -354,6 +357,7 @@ const store = {
pluginStore,
storageManagement,
campaignsStore,
+ editGroupStore,
};
export default store;
diff --git a/packages/shared/api/groups/index.ts b/packages/shared/api/groups/index.ts
index 25f72dc909..6d6d25e810 100644
--- a/packages/shared/api/groups/index.ts
+++ b/packages/shared/api/groups/index.ts
@@ -127,7 +127,7 @@ export const getGroupMembersInRoom = (
export const updateGroup = (
groupId: string,
groupName: string,
- groupManager: string,
+ groupManager: string | undefined,
membersToAdd: string[],
membersToRemove: string[],
) => {
diff --git a/packages/shared/api/groups/types.ts b/packages/shared/api/groups/types.ts
index e8d103736e..04ed62ef9c 100644
--- a/packages/shared/api/groups/types.ts
+++ b/packages/shared/api/groups/types.ts
@@ -30,7 +30,7 @@ import { ShareAccessRights } from "../../enums";
export type TGroup = {
category: string;
id: string;
- manager: TUser;
+ manager?: TUser;
name: string;
parent: string;
isGroup?: boolean;
diff --git a/packages/shared/components/selector/Selector.types.ts b/packages/shared/components/selector/Selector.types.ts
index 29bfd0a026..1e3714a6e4 100644
--- a/packages/shared/components/selector/Selector.types.ts
+++ b/packages/shared/components/selector/Selector.types.ts
@@ -30,6 +30,7 @@ import { MergeTypes, Nullable } from "../../types";
import { TFileSecurity, TFolderSecurity } from "../../api/files/types";
import { TRoomSecurity } from "../../api/rooms/types";
+import { TGroup } from "../../api/groups/types";
import { AvatarRole } from "../avatar";
import { TTabItem } from "../tabs";
@@ -394,6 +395,7 @@ type TSelectorItemEmpty = {
iconOriginal?: undefined;
role?: undefined;
email?: undefined;
+ groups?: TGroup[];
isOwner?: undefined;
isAdmin?: undefined;
isVisitor?: undefined;
@@ -438,6 +440,7 @@ export type TSelectorItemUser = MergeTypes<
avatar: string;
hasAvatar: boolean;
role: AvatarRole;
+ groups?: TGroup[];
access?: ShareAccessRights | string | number;
}
From 844daabd2ffea47c078b89bd1b8c8e1d722dd5d0 Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Wed, 7 Aug 2024 17:43:06 +0200
Subject: [PATCH 15/45] Client: CreateGroupDialog: Fix create dialog after
rewriting edit dialog
---
.../CreateGroupDialog.tsx | 72 ++++++++++++++----
.../CreateEditGroupDialog/EditGroupDialog.tsx | 1 -
.../sub-components/CreateGroupDialogBody.tsx | 74 -------------------
.../sub-components/MembersParam/index.tsx | 2 -
.../create-components/SelectMembersPanel.tsx | 2 +-
.../CreateEditGroupDialog/types/index.tsx | 4 +-
packages/shared/api/groups/index.ts | 4 +-
7 files changed, 63 insertions(+), 96 deletions(-)
delete mode 100644 packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/CreateGroupDialogBody.tsx
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx
index 3c0d2bfdaf..7697abde48 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/CreateGroupDialog.tsx
@@ -25,17 +25,21 @@
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { useState, ChangeEvent } from "react";
+import { useTranslation } from "react-i18next";
+import { useNavigate } from "react-router-dom";
+import { observer, inject } from "mobx-react";
+
import {
ModalDialog,
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { Button, ButtonSize } from "@docspace/shared/components/button";
import { toastr } from "@docspace/shared/components/toast";
-import { observer, inject } from "mobx-react";
-
-import { useTranslation } from "react-i18next";
-import { useNavigate } from "react-router-dom";
import { createGroup } from "@docspace/shared/api/groups";
+import { TUser } from "@docspace/shared/api/people/types";
+import PeopleStore from "SRC_DIR/store/PeopleStore";
+import GroupsStore from "SRC_DIR/store/GroupsStore";
+
import { StyledModal } from "./CreateEditGroupDialog.styled";
import { GroupParams } from "./types";
import GroupNameParam from "./sub-components/GroupNameParam";
@@ -69,10 +73,10 @@ const CreateGroupDialog = ({
const onChangeGroupName = (e: ChangeEvent) =>
setGroupParams({ ...groupParams, groupName: e.target.value });
- const setGroupManager = (groupManager: object | null) =>
+ const setGroupManager = (groupManager: TUser | null) =>
setGroupParams({ ...groupParams, groupManager });
- const setGroupMembers = (groupMembers: object[]) =>
+ const setGroupMembers = (groupMembers: TUser[]) =>
setGroupParams((prevState) => ({ ...prevState, groupMembers }));
const [selectGroupMangerPanelIsVisible, setSelectGroupMangerPanelIsVisible] =
@@ -89,6 +93,44 @@ const CreateGroupDialog = ({
const onShowSelectMembersPanel = () => setSelectMembersPanelIsVisible(true);
const onHideSelectMembersPanel = () => setSelectMembersPanelIsVisible(false);
+ const removeManager = () => {
+ setGroupManager(null);
+ setGroupMembers(
+ groupParams.groupMembers?.filter(
+ (gm) => gm.id !== groupParams.groupManager!.id,
+ ) || [],
+ );
+ };
+
+ const addMembers = (newGroupMembers: TUser[]) => {
+ const resultGroupMembers: TUser[] = [...groupParams.groupMembers];
+ let showErrorWasSelected = false;
+
+ newGroupMembers.forEach((groupMember) => {
+ if (
+ groupParams.groupMembers.findIndex((gm) => gm.id === groupMember.id) !==
+ -1
+ ) {
+ showErrorWasSelected = true;
+ return;
+ }
+ resultGroupMembers.push(groupMember);
+ });
+
+ if (showErrorWasSelected) {
+ toastr.warning("Some users have already been added");
+ }
+
+ setGroupMembers(resultGroupMembers);
+ };
+
+ const removeMember = (member: TUser) => {
+ const newGroupMembers = groupParams.groupMembers?.filter(
+ (gm) => gm.id !== member.id,
+ );
+ setGroupMembers(newGroupMembers || []);
+ };
+
const onCreateGroup = async () => {
setIsLoading(true);
@@ -127,15 +169,13 @@ const CreateGroupDialog = ({
/>
@@ -183,13 +223,17 @@ const CreateGroupDialog = ({
onParentPanelClose={onClose}
groupManager={groupParams.groupManager}
groupMembers={groupParams.groupMembers}
- setGroupMembers={setGroupMembers}
+ addMembers={addMembers}
/>
)}
>
);
};
-export default inject(({ peopleStore }) => ({
- getGroups: peopleStore.groupsStore.getGroups,
-}))(observer(CreateGroupDialog));
+export default inject<{ peopleStore: PeopleStore }>(({ peopleStore }) => {
+ const { getGroups } = peopleStore.groupsStore! as GroupsStore;
+
+ return {
+ getGroups,
+ };
+})(observer(CreateGroupDialog));
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
index 8e63a233ce..a79cb2d6d5 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
@@ -167,7 +167,6 @@ const EditGroupDialog = ({
>;
- onClose: () => void;
-}
-
-const CreateGroupDialogBody = ({
- groupParams,
- setGroupParams,
- onClose,
-}: CreateGroupDialogBodyProps) => {
- const onChangeGroupName = (e: ChangeEvent) =>
- setGroupParams({ ...groupParams, groupName: e.target.value });
-
- const setGroupManager = (groupManager: object) =>
- setGroupParams({ ...groupParams, groupManager });
-
- const setGroupMembers = (groupMembers: object[]) =>
- setGroupParams({ ...groupParams, groupMembers });
-
- return (
- <>
-
-
-
- >
- );
-};
-
-export default CreateGroupDialogBody;
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx
index b376ec4e95..18d38fab69 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/MembersParam/index.tsx
@@ -24,7 +24,6 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-import { useCallback } from "react";
import { useTranslation } from "react-i18next";
import { SelectorAddButton } from "@docspace/shared/components/selector-add-button";
@@ -52,7 +51,6 @@ type InfiniteLoaderProps =
type MembersParamProps = {
groupManager: TUser | null;
groupMembers: TUser[] | null;
- setGroupMembers: (groupMembers: TUser[]) => void;
onShowSelectMembersPanel: () => void;
removeMember: (member: TUser) => void;
} & InfiniteLoaderProps;
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx
index 982cfda2e0..7c73410bcd 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/sub-components/create-components/SelectMembersPanel.tsx
@@ -34,7 +34,7 @@ type SelectMembersPanelProps = {
isVisible: boolean;
onClose: () => void;
onParentPanelClose: () => void;
- groupManager?: TUser;
+ groupManager: TUser | null;
groupMembers: TUser[];
addMembers: (members: TUser[]) => void;
};
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/types/index.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/types/index.tsx
index 8199e95b6c..942de2a09f 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/types/index.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/types/index.tsx
@@ -28,8 +28,8 @@ import { TUser } from "@docspace/shared/api/people/types";
export type GroupParams = {
groupName: string;
- groupManager: object | null;
- groupMembers: object[];
+ groupManager: TUser | null;
+ groupMembers: TUser[];
};
export type GroupMembers = TUser[] | null;
diff --git a/packages/shared/api/groups/index.ts b/packages/shared/api/groups/index.ts
index 6d6d25e810..3b54cba3b1 100644
--- a/packages/shared/api/groups/index.ts
+++ b/packages/shared/api/groups/index.ts
@@ -38,7 +38,7 @@ import {
export const createGroup = (
groupName: string,
- groupManager: string,
+ groupManager: string | undefined,
members: string[],
) => {
return request({
@@ -49,7 +49,7 @@ export const createGroup = (
groupManager,
members,
},
- });
+ }) as Promise;
};
// * Read
From 3be90245558cfe71c6bb17d2bbb78c6a4c8e7048 Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Thu, 8 Aug 2024 15:11:17 +0200
Subject: [PATCH 16/45] Client: Groups: Fix loaders
---
.../CreateEditGroupDialog/EditGroupDialog.tsx | 92 +++++++++++----
.../Home/InfoPanel/Body/views/Groups/index.js | 110 +++++++++++-------
2 files changed, 137 insertions(+), 65 deletions(-)
diff --git a/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx b/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
index a79cb2d6d5..bfc3b0084d 100644
--- a/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
+++ b/packages/client/src/components/dialogs/CreateEditGroupDialog/EditGroupDialog.tsx
@@ -24,7 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-import { ChangeEvent, useEffect, useState } from "react";
+import { ChangeEvent, useEffect, useRef, useState } from "react";
import { inject, observer } from "mobx-react";
import { useTranslation } from "react-i18next";
@@ -34,6 +34,10 @@ import {
ModalDialogType,
} from "@docspace/shared/components/modal-dialog";
import { TGroup } from "@docspace/shared/api/groups/types";
+import {
+ MIN_LOADER_TIMER,
+ SHOW_LOADER_TIMER,
+} from "@docspace/shared/selectors/Files/FilesSelector.constants";
import EditGroupStore from "SRC_DIR/store/EditGroupStore";
import { StyledModal } from "./CreateEditGroupDialog.styled";
@@ -101,6 +105,10 @@ const EditGroupDialog = ({
useState(false);
const [selectMembersPanelIsVisible, setSelectMembersPanelIsVisible] =
useState(false);
+ const [showLoader, setShowLoader] = useState(false);
+
+ const loaderTimeout = useRef(null);
+ const startLoaderTime = useRef(null);
const onChangeGroupName = (e: ChangeEvent) => {
setTitle(e.target.value);
@@ -136,6 +144,38 @@ const EditGroupDialog = ({
};
}, []);
+ useEffect(() => {
+ if (!isInit) {
+ loaderTimeout.current = setTimeout(() => {
+ startLoaderTime.current = new Date();
+ setShowLoader(true);
+ }, SHOW_LOADER_TIMER);
+ } else if (startLoaderTime.current) {
+ const currentDate = new Date();
+
+ const ms = Math.abs(
+ startLoaderTime.current.getTime() - currentDate.getTime(),
+ );
+
+ if (ms >= MIN_LOADER_TIMER) {
+ startLoaderTime.current = null;
+ return setShowLoader(false);
+ }
+
+ setTimeout(() => {
+ if (isInit) {
+ startLoaderTime.current = null;
+ setShowLoader(false);
+ }
+ }, MIN_LOADER_TIMER - ms);
+
+ loaderTimeout.current = null;
+ } else if (loaderTimeout.current) {
+ clearTimeout(loaderTimeout.current);
+ loaderTimeout.current = null;
+ }
+ }, [isInit]);
+
const notEnoughParamsToEdit = !title || (!manager && !members?.length);
return (
@@ -152,31 +192,33 @@ const EditGroupDialog = ({
- {isInit ? (
- <>
-
-
-
-
- >
- ) : (
+ {showLoader ? (
+ ) : (
+ isInit && (
+ <>
+
+
+
+
+ >
+ )
)}
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
index f250e63b2b..ce23ad8fb3 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
@@ -27,13 +27,16 @@
import { inject, observer } from "mobx-react";
import { withTranslation } from "react-i18next";
import { useParams } from "react-router-dom";
-import { useState, useEffect } from "react";
+import { useState, useEffect, useRef } from "react";
import withLoader from "@docspace/client/src/HOCs/withLoader";
import InfoPanelViewLoader from "@docspace/shared/skeletons/info-panel/body";
import api from "@docspace/shared/api";
import AccountsFilter from "@docspace/shared/api/people/filter";
-import { MIN_LOADER_TIMER } from "@docspace/shared/selectors/Files/FilesSelector.constants";
+import {
+ MIN_LOADER_TIMER,
+ SHOW_LOADER_TIMER,
+} from "@docspace/shared/selectors/Files/FilesSelector.constants";
import GroupMember from "./GroupMember";
import * as Styled from "../../styles/groups.styled";
@@ -47,11 +50,14 @@ const Groups = ({
infoPanelSelectedGroup,
setInfoPanelSelectedGroup,
}) => {
- const [isShowLoader, setIsShowLoader] = useState(false);
- const [areMembersLoading, setAreMembersLoading] = useState(false);
+ const [isFirstLoad, setIsFirstLoad] = useState(true);
+ const [showLoader, setShowLoader] = useState(false);
const [groupMembers, setGroupMembers] = useState(null);
const [total, setTotal] = useState(0);
+ const startLoader = useRef(null);
+ const loaderTimeout = useRef(null);
+
const { groupId: paramsGroupId } = useParams();
const isInsideGroup = !!paramsGroupId;
@@ -63,13 +69,7 @@ const Groups = ({
const groupManager = group?.manager;
const loadNextPage = async (startIndex) => {
- const startLoadingTime = new Date();
-
try {
- if (startIndex === 0) {
- setAreMembersLoading(true);
- }
-
const pageCount = 100;
const filter = AccountsFilter.getDefault();
filter.group = groupId;
@@ -91,21 +91,48 @@ const Groups = ({
} catch (e) {
console.log(e);
} finally {
- const nowDate = new Date();
- const diff = Math.abs(nowDate.getTime() - startLoadingTime.getTime());
-
- if (diff < MIN_LOADER_TIMER) {
- setTimeout(() => {
- setAreMembersLoading(false);
- }, MIN_LOADER_TIMER - diff);
- } else {
- setAreMembersLoading(false);
+ if (startIndex === 0) {
+ setIsFirstLoad(false);
}
}
};
+ const calculateLoader = () => {
+ if (isFirstLoad) {
+ loaderTimeout.current = setTimeout(() => {
+ startLoader.current = new Date();
+ setShowLoader(true);
+ }, SHOW_LOADER_TIMER);
+ } else if (startLoader.current) {
+ const currentDate = new Date();
+
+ const ms = Math.abs(
+ startLoader.current.getTime() - currentDate.getTime(),
+ );
+
+ if (ms >= MIN_LOADER_TIMER) {
+ startLoader.current = null;
+ return setShowLoader(false);
+ }
+
+ setTimeout(() => {
+ startLoader.current = null;
+ setShowLoader(false);
+ }, MIN_LOADER_TIMER - ms);
+
+ loaderTimeout.current = null;
+ } else if (loaderTimeout.current) {
+ clearTimeout(loaderTimeout.current);
+ loaderTimeout.current = null;
+ }
+ };
+
useFetchGroup(groupId, group?.id, setGroup);
+ useEffect(() => {
+ setIsFirstLoad(true);
+ }, [infoPanelSelection.id]);
+
useEffect(() => {
if (group) {
loadNextPage(0);
@@ -113,35 +140,38 @@ const Groups = ({
}, [group]);
useEffect(() => {
- const showLoaderTimer = setTimeout(() => setIsShowLoader(true), 500);
- return () => clearTimeout(showLoaderTimer);
+ calculateLoader();
+ }, [isFirstLoad]);
+
+ useEffect(() => {
+ return () => {
+ loaderTimeout.current = null;
+ };
}, []);
- if (!group) {
- if (isShowLoader)
- return (
-
-
-
- );
- return null;
+ if (showLoader) {
+ return (
+
+
+
+ );
}
const totalWithoutManager = groupManager ? total - 1 : total;
return (
- {groupManager && }
- {!groupMembers || areMembersLoading ? (
-
- ) : (
-
+ {isFirstLoad || !groupMembers ? null : (
+ <>
+ {groupManager && }
+
+ >
)}
);
From b2e08f0c2a1a9e12b80d0542eea5185a4cbbde68 Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Thu, 8 Aug 2024 18:45:38 +0200
Subject: [PATCH 17/45] Client: InfoPanel: Groups: Add request cancelling to
prevent adding members from previous selected group
---
.../pages/Home/InfoPanel/Body/views/Groups/index.js | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
index ce23ad8fb3..09b3f47a4a 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
@@ -55,6 +55,7 @@ const Groups = ({
const [groupMembers, setGroupMembers] = useState(null);
const [total, setTotal] = useState(0);
+ const abortControllerRef = useRef(new AbortController());
const startLoader = useRef(null);
const loaderTimeout = useRef(null);
@@ -70,13 +71,18 @@ const Groups = ({
const loadNextPage = async (startIndex) => {
try {
+ abortControllerRef.current = new AbortController();
+
const pageCount = 100;
const filter = AccountsFilter.getDefault();
filter.group = groupId;
filter.page = startIndex / pageCount;
filter.pageCount = pageCount;
- const res = await api.people.getUserList(filter);
+ const res = await api.people.getUserList(
+ filter,
+ abortControllerRef.current.signal,
+ );
const membersWithoutManager = groupManager
? res.items.filter((item) => item.id !== groupManager.id)
@@ -137,6 +143,10 @@ const Groups = ({
if (group) {
loadNextPage(0);
}
+
+ return () => {
+ abortControllerRef.current.abort();
+ };
}, [group]);
useEffect(() => {
From 717d0c86dda0fa869e927cb7c170e3620448d000 Mon Sep 17 00:00:00 2001
From: Akmal Isomadinov
Date: Fri, 9 Aug 2024 17:38:13 +0500
Subject: [PATCH 18/45] Web:EmptyContainer Fixed translation
---
.../EmptyViewContainer/EmptyViewContainer.helpers.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx
index a0d86182e1..e9662c368c 100644
--- a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx
+++ b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx
@@ -350,7 +350,9 @@ export const getOptions = (
t("EmptyView:UploadFromPortalTitle", {
productName: t("Common:ProductName"),
}),
- t("EmptyView:UploadPDFFormOptionDescription"),
+ t("EmptyView:UploadPDFFormOptionDescription", {
+ productName: t("Common:ProductName"),
+ }),
FilterType.PDFForm,
);
From 00ee68c59df1d2d83064bddad82f614d3abb6faf Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Fri, 9 Aug 2024 14:49:42 +0200
Subject: [PATCH 19/45] Client: AddUsersPanel: Fix loader padding
---
packages/client/src/components/panels/AddUsersPanel/index.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/client/src/components/panels/AddUsersPanel/index.tsx b/packages/client/src/components/panels/AddUsersPanel/index.tsx
index 8ae26aa7b2..d1d1e51fbf 100644
--- a/packages/client/src/components/panels/AddUsersPanel/index.tsx
+++ b/packages/client/src/components/panels/AddUsersPanel/index.tsx
@@ -573,6 +573,7 @@ const AddUsersPanel = ({
isSearchLoading={isInit}
rowLoader={
Date: Fri, 9 Aug 2024 19:03:59 +0500
Subject: [PATCH 20/45] Web:FilesActionStore Fixed closing the media viewer
when deleting the last item
---
packages/client/src/store/FilesActionsStore.js | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/packages/client/src/store/FilesActionsStore.js b/packages/client/src/store/FilesActionsStore.js
index 11fc69fd0c..1349a9ec62 100644
--- a/packages/client/src/store/FilesActionsStore.js
+++ b/packages/client/src/store/FilesActionsStore.js
@@ -155,13 +155,6 @@ class FilesActionStore {
this.isBulkDownload = isBulkDownload;
};
- isMediaOpen = () => {
- const { visible, setMediaViewerData, playlist } = this.mediaViewerDataStore;
- if (visible && playlist.length === 1) {
- setMediaViewerData({ visible: false, id: null });
- }
- };
-
updateCurrentFolder = (fileIds, folderIds, clearSelection, operationId) => {
const { clearSecondaryProgressData } =
this.uploadDataStore.secondaryProgressDataStore;
@@ -390,8 +383,6 @@ class FilesActionStore {
addActiveItems(null, folderIds, destFolderId);
if (folderIds.length || fileIds.length) {
- this.isMediaOpen();
-
try {
this.filesStore.setOperationAction(true);
this.setGroupMenuBlocked(true);
@@ -852,7 +843,6 @@ class FilesActionStore {
if (isFile) {
addActiveItems([itemId], null, destFolderId);
- this.isMediaOpen();
return deleteFile(itemId)
.then(async (res) => {
if (res[0]?.error) return Promise.reject(res[0].error);
From 810b20ca5fc84fe4a8e2c7b38312d20239c35165 Mon Sep 17 00:00:00 2001
From: Timofey Boyko
Date: Fri, 9 Aug 2024 17:11:10 +0300
Subject: [PATCH 21/45] Login: return select language for mobile
---
packages/login/src/components/SimpleNav.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/login/src/components/SimpleNav.tsx b/packages/login/src/components/SimpleNav.tsx
index f780bdb2da..6aa8b78a5a 100644
--- a/packages/login/src/components/SimpleNav.tsx
+++ b/packages/login/src/components/SimpleNav.tsx
@@ -73,7 +73,7 @@ const SimpleNav = ({}: SimpleNavProps) => {
return (
);
};
From 4c814ae6222445a2856cbc3c1b07715c6d3c0faf Mon Sep 17 00:00:00 2001
From: gopienkonikita
Date: Fri, 9 Aug 2024 17:20:27 +0300
Subject: [PATCH 22/45] Web: Files: SimulatePassword: fixed crash
---
packages/client/src/components/SimulatePassword/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/client/src/components/SimulatePassword/index.js b/packages/client/src/components/SimulatePassword/index.js
index 395e497177..e8ded4a622 100644
--- a/packages/client/src/components/SimulatePassword/index.js
+++ b/packages/client/src/components/SimulatePassword/index.js
@@ -145,7 +145,7 @@ const SimulatePassword = memo(
}, [isDisabled]);
useEffect(() => {
- setPassword(inputValue);
+ if (inputValue) setPassword(inputValue);
}, [inputValue]);
return (
From 656e7dd2801928e3522cbc956a754b20ce63890c Mon Sep 17 00:00:00 2001
From: gopienkonikita
Date: Fri, 9 Aug 2024 17:33:00 +0300
Subject: [PATCH 23/45] Web: Files: InfoPanel: fixed public icon
---
.../Body/sub-components/ItemTitle/Rooms/index.js | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js
index 6302ffb2b0..d96f23599d 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/Rooms/index.js
@@ -52,7 +52,7 @@ const RoomsItemHeader = ({
setSelection,
setBufferSelection,
isArchive,
- hasLinks,
+ isShared,
showSearchBlock,
setShowSearchBlock,
roomType,
@@ -70,7 +70,7 @@ const RoomsItemHeader = ({
(selection.roomType === RoomsType.PublicRoom ||
selection.roomType === RoomsType.FormRoom ||
selection.roomType === RoomsType.CustomRoom) &&
- hasLinks;
+ isShared;
const badgeUrl = showPlanetIcon ? Planet12ReactSvgUrl : null;
const isRoomMembersPanel = selection?.isRoom && roomsView === "info_members";
@@ -161,7 +161,6 @@ export default inject(
selectedFolderStore,
filesStore,
infoPanelStore,
- publicRoomStore,
}) => {
const {
infoPanelSelection,
@@ -170,7 +169,6 @@ export default inject(
showSearchBlock,
setShowSearchBlock,
} = infoPanelStore;
- const { externalLinks } = publicRoomStore;
const selection = infoPanelSelection.length > 1 ? null : infoPanelSelection;
const isArchive = selection?.rootFolderType === FolderType.Archive;
@@ -196,7 +194,7 @@ export default inject(
setSelection: filesStore.setSelection,
setBufferSelection: filesStore.setBufferSelection,
isArchive,
- hasLinks: externalLinks.length,
+ isShared: selection?.shared,
roomType,
};
},
From 21d08cc69194017cb8c4dcdecbbbbdda17b3fcb9 Mon Sep 17 00:00:00 2001
From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com>
Date: Fri, 9 Aug 2024 17:41:52 +0300
Subject: [PATCH 24/45] Fixed Bug 69577: Srv: Branding. Blank page for
"Feedback & Support" when "Show link to Help Center" is disabled
---
.../common/Branding/additionalResources.js | 12 +++++++-----
packages/shared/api/settings/index.ts | 10 ++--------
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js b/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js
index 3bf68280bf..f7d3cd0e19 100644
--- a/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js
+++ b/packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js
@@ -187,12 +187,14 @@ const AdditionalResources = (props) => {
const onSave = useCallback(async () => {
setIsLoading(true);
+ const settings = JSON.parse(JSON.stringify(additionalResourcesData));
+
+ settings.feedbackAndSupportEnabled = feedbackAndSupportEnabled;
+ settings.videoGuidesEnabled = videoGuidesEnabled;
+ settings.helpCenterEnabled = helpCenterEnabled;
+
await api.settings
- .setAdditionalResources(
- feedbackAndSupportEnabled,
- videoGuidesEnabled,
- helpCenterEnabled,
- )
+ .setAdditionalResources(settings)
.then(() => {
toastr.success(t("Settings:SuccessfullySaveSettingsMessage"));
})
diff --git a/packages/shared/api/settings/index.ts b/packages/shared/api/settings/index.ts
index 8f3b5919ba..395c38dbad 100644
--- a/packages/shared/api/settings/index.ts
+++ b/packages/shared/api/settings/index.ts
@@ -407,16 +407,10 @@ export async function getCustomSchemaList() {
}
export function setAdditionalResources(
- feedbackAndSupportEnabled,
- videoGuidesEnabled,
- helpCenterEnabled,
+ additionalResources: TAdditionalResources,
) {
const data = {
- settings: {
- helpCenterEnabled,
- feedbackAndSupportEnabled,
- videoGuidesEnabled,
- },
+ settings: additionalResources,
};
return request({
From 4ea0f130b3462c03777314d44c153b1414ce1a17 Mon Sep 17 00:00:00 2001
From: gopienkonikita
Date: Fri, 9 Aug 2024 17:54:50 +0300
Subject: [PATCH 25/45] Fix Bug 69656 - Rooms.AsNew.Media. Fixed opening of
media files
---
.../components/panels/NewFilesPanel/index.js | 47 +++----------------
1 file changed, 6 insertions(+), 41 deletions(-)
diff --git a/packages/client/src/components/panels/NewFilesPanel/index.js b/packages/client/src/components/panels/NewFilesPanel/index.js
index 26965d6bbf..2a65bf707e 100644
--- a/packages/client/src/components/panels/NewFilesPanel/index.js
+++ b/packages/client/src/components/panels/NewFilesPanel/index.js
@@ -52,6 +52,7 @@ import { StyledNewFilesBody, StyledLink } from "../StyledPanels";
import withLoader from "../../../HOCs/withLoader";
import config from "PACKAGE_FILE";
+import { MEDIA_VIEW_URL } from "@docspace/shared/constants";
const NewFilesPanel = (props) => {
const {
@@ -60,8 +61,6 @@ const NewFilesPanel = (props) => {
getFolderIcon,
newFiles,
markAsRead,
- setMediaViewerData,
- currentFolderId,
setIsLoading,
t,
visible,
@@ -203,40 +202,10 @@ const NewFilesPanel = (props) => {
}
if (isMedia) {
- if (currentFolderId !== item.folderId) {
- const categoryType = getCategoryTypeByFolderType(
- rootFolderType,
- item.folderId,
- );
-
- const state = {
- title: "",
- rootFolderType,
-
- isRoot: false,
- };
- setIsLoading(true);
-
- const url = getCategoryUrl(categoryType, item.folderId);
-
- const filter = FilesFilter.getDefault();
- filter.folder = item.folderId;
-
- window.DocSpace.navigate(`${url}?${filter.toUrlParams()}`, { state });
-
- const mediaItem = { visible: true, id };
- setMediaViewerData(mediaItem);
-
- setInProgress(false);
- onClose();
- } else {
- const mediaItem = { visible: true, id };
- setMediaViewerData(mediaItem);
-
- return onClose();
- }
-
- return;
+ return window.open(
+ combineUrl(MEDIA_VIEW_URL, id),
+ openOnNewPage ? "_blank" : "_self",
+ );
}
if (fileItemsList && enablePlugins) {
@@ -335,7 +304,6 @@ export default inject(
filesStore,
mediaViewerDataStore,
filesActionsStore,
- selectedFolderStore,
dialogsStore,
filesSettingsStore,
clientLoadingStore,
@@ -349,10 +317,9 @@ export default inject(
setIsSectionFilterLoading(param);
};
- const { setMediaViewerData, setCurrentItem } = mediaViewerDataStore;
+ const { setCurrentItem } = mediaViewerDataStore;
const { getIcon, getFolderIcon, openOnNewPage } = filesSettingsStore;
const { markAsRead } = filesActionsStore;
- const { id: currentFolderId } = selectedFolderStore;
const {
setNewFilesPanelVisible,
@@ -371,8 +338,6 @@ export default inject(
newFilesIds,
isLoading,
setCurrentItem,
- currentFolderId,
- setMediaViewerData,
getIcon,
getFolderIcon,
markAsRead,
From d61e5aaa8b69709ef847f6f1358d960a26141357 Mon Sep 17 00:00:00 2001
From: gopienkonikita
Date: Sat, 10 Aug 2024 09:02:49 +0300
Subject: [PATCH 26/45] Web: Files: SimulatePassword: fix
---
packages/client/src/components/SimulatePassword/index.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/packages/client/src/components/SimulatePassword/index.js b/packages/client/src/components/SimulatePassword/index.js
index e8ded4a622..8529c30515 100644
--- a/packages/client/src/components/SimulatePassword/index.js
+++ b/packages/client/src/components/SimulatePassword/index.js
@@ -145,7 +145,9 @@ const SimulatePassword = memo(
}, [isDisabled]);
useEffect(() => {
- if (inputValue) setPassword(inputValue);
+ if (inputValue !== undefined) {
+ setPassword(inputValue);
+ }
}, [inputValue]);
return (
From 6f53b26ec3a12196c88dbb910b0f5ab3e28526ff Mon Sep 17 00:00:00 2001
From: Timofey Boyko
Date: Mon, 12 Aug 2024 13:15:14 +0300
Subject: [PATCH 27/45] Bug 69629 - Accounts. The language selection window
expands when you change the width of the browser window when the dark theme
is enabled
---
packages/shared/components/drop-down/DropDown.styled.ts | 3 ++-
.../shared/components/language-combobox/LanguageCombobox.tsx | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/shared/components/drop-down/DropDown.styled.ts b/packages/shared/components/drop-down/DropDown.styled.ts
index 69bd55f1c1..4fa68fb4af 100644
--- a/packages/shared/components/drop-down/DropDown.styled.ts
+++ b/packages/shared/components/drop-down/DropDown.styled.ts
@@ -93,6 +93,7 @@ const StyledDropdown = styled.div<{
props.zIndex ? props.zIndex : props.theme.dropDown.zIndex};
display: ${(props) =>
props.open ? (props.columnCount ? "block" : "table") : "none"};
+ table-layout: fixed;
${(props) =>
!props.isDropdownReady &&
@@ -105,7 +106,7 @@ const StyledDropdown = styled.div<{
border: ${(props) => props.theme.dropDown.border};
border-radius: ${(props) => props.theme.dropDown.borderRadius};
-moz-border-radius: ${(props) => props.theme.dropDown.borderRadius};
- -webkit-border-radius: ${(props) => props.theme.dropDown.borderRadius};
+ -webkit-border-radius: ${(props) => props.theme.dropDown.borderRadius};dropDownMaxHeight
box-shadow: ${(props) => props.theme.dropDown.boxShadow};
-moz-box-shadow: ${(props) => props.theme.dropDown.boxShadow};
-webkit-box-shadow: ${(props) => props.theme.dropDown.boxShadow};
diff --git a/packages/shared/components/language-combobox/LanguageCombobox.tsx b/packages/shared/components/language-combobox/LanguageCombobox.tsx
index 27b2a2864a..d28925944c 100644
--- a/packages/shared/components/language-combobox/LanguageCombobox.tsx
+++ b/packages/shared/components/language-combobox/LanguageCombobox.tsx
@@ -74,7 +74,7 @@ const LanguageCombobox = (props: ComboboxProps) => {
dropDownMaxHeight={300}
fillIcon={false}
displaySelectedOption
- manualWidth="41px"
+ manualWidth="42px"
noBorder={false}
type="onlyIcon"
optionStyle={{ padding: "0 8px" }}
From 9ba016ba358c0d732d010b236df47228ca64f0d0 Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Mon, 12 Aug 2024 12:37:23 +0200
Subject: [PATCH 28/45] Client: EditGroupMembersDialog: Add email to member row
---
.../sub-components/GroupMember/index.styled.ts | 15 ++++++++++++++-
.../sub-components/GroupMember/index.tsx | 6 +++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.styled.ts b/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.styled.ts
index f3e0e01173..61a072612b 100644
--- a/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.styled.ts
+++ b/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.styled.ts
@@ -42,11 +42,15 @@ export const GroupMember = styled.div<{ isExpect: boolean }>`
overflow: auto;
}
- .name-wrapper,
+ .info,
.role-email {
display: flex;
}
+ .info {
+ flex-direction: column;
+ }
+
.name {
font-weight: 600;
font-size: 14px;
@@ -59,6 +63,15 @@ export const GroupMember = styled.div<{ isExpect: boolean }>`
props.isExpect && `color: ${props.theme.infoPanel.members.isExpectName}`};
}
+ .email {
+ color: ${({ theme }) => theme.sideBarRow.metaDataColor};
+ font-size: 12px;
+ line-height: 16px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
.me-label {
font-weight: 600;
font-size: 14px;
diff --git a/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.tsx b/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.tsx
index 081701f4ea..7925f15b08 100644
--- a/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.tsx
+++ b/packages/client/src/components/dialogs/EditGroupMembersDialog/sub-components/GroupMember/index.tsx
@@ -131,13 +131,17 @@ const GroupMember = ({ member, infoPanelSelection }: GroupMemberProps) => {
/>
-
+
{decode(user.displayName)}
+
+ {user.email}
+
From b9c1b95234359ecf68eea4acd98061b6b0486fbc Mon Sep 17 00:00:00 2001
From: Aleksandr Lushkin
Date: Mon, 12 Aug 2024 13:04:37 +0200
Subject: [PATCH 29/45] Client: InfoPanel: Groups: Fix wrong filter page
---
.../client/src/pages/Home/InfoPanel/Body/views/Groups/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
index 09b3f47a4a..78361e93e3 100644
--- a/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
+++ b/packages/client/src/pages/Home/InfoPanel/Body/views/Groups/index.js
@@ -76,7 +76,7 @@ const Groups = ({
const pageCount = 100;
const filter = AccountsFilter.getDefault();
filter.group = groupId;
- filter.page = startIndex / pageCount;
+ filter.page = Math.ceil(startIndex / pageCount);
filter.pageCount = pageCount;
const res = await api.people.getUserList(
From a99de259cf71fa6c132f108fb5f9b2446abddd7f Mon Sep 17 00:00:00 2001
From: Alexey Safronov
Date: Mon, 12 Aug 2024 15:21:29 +0400
Subject: [PATCH 30/45] Fix bug 66831 - Rooms: Invite via link: Request failed
with status code 403
---
.../sub-components/ExternalLinks.js | 32 +++++++++++++------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js b/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js
index 3157df9554..a247277c03 100644
--- a/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js
+++ b/packages/client/src/components/panels/InvitePanel/sub-components/ExternalLinks.js
@@ -66,25 +66,36 @@ const ExternalLinks = ({
isMobileView,
getPortalInviteLink,
}) => {
+ const [isLinksToggling, setIsLinksToggling] = useState(false);
+
const [actionLinksVisible, setActionLinksVisible] = useState(false);
const inputsRef = useRef();
const toggleLinks = async (e) => {
- if (roomId === -1) {
- if (e?.target?.checked) {
- const link = shareLinks.find((l) => l.access === defaultAccess);
+ if (isLinksToggling) return;
- link.shareLink = await getPortalInviteLink(defaultAccess);
+ setIsLinksToggling(true);
- setActiveLink(link);
- copyLink(link.shareLink);
+ try {
+ if (roomId === -1) {
+ if (e?.target?.checked) {
+ const link = shareLinks.find((l) => l.access === defaultAccess);
+
+ link.shareLink = await getPortalInviteLink(defaultAccess);
+
+ setActiveLink(link);
+ copyLink(link.shareLink);
+ }
+ } else {
+ !externalLinksVisible ? editLink() : disableLink();
}
- } else {
- !externalLinksVisible ? editLink() : disableLink();
+ onChangeExternalLinksVisible(!externalLinksVisible);
+ } catch (error) {
+ toastr.error(error.message);
+ } finally {
+ setIsLinksToggling(false);
}
-
- onChangeExternalLinksVisible(!externalLinksVisible);
};
const disableLink = () => {
@@ -223,6 +234,7 @@ const ExternalLinks = ({
className="invite-via-link"
isChecked={externalLinksVisible}
onChange={toggleLinks}
+ isDisabled={isLinksToggling}
/>
From 2cfbca7d27a351e49b74d3d97b952df5f2e04a4a Mon Sep 17 00:00:00 2001
From: Alexey Safronov
Date: Mon, 12 Aug 2024 16:38:06 +0400
Subject: [PATCH 31/45] SSO: Moved ResetConfirmationModal to client components
---
.../public/locales/ar-SA/SingleSignOn.json | 5 +-
.../public/locales/az/SingleSignOn.json | 5 +-
.../public/locales/bg/SingleSignOn.json | 5 +-
.../public/locales/cs/SingleSignOn.json | 5 +-
.../public/locales/de/SingleSignOn.json | 5 +-
.../public/locales/el-GR/SingleSignOn.json | 5 +-
.../public/locales/en/SingleSignOn.json | 5 +-
.../public/locales/es/SingleSignOn.json | 5 +-
.../public/locales/fi/SingleSignOn.json | 5 +-
.../public/locales/fr/SingleSignOn.json | 5 +-
.../public/locales/hy-AM/SingleSignOn.json | 5 +-
.../public/locales/it/SingleSignOn.json | 5 +-
.../public/locales/ja-JP/SingleSignOn.json | 5 +-
.../public/locales/ko-KR/SingleSignOn.json | 5 +-
.../public/locales/lo-LA/SingleSignOn.json | 5 +-
.../public/locales/lv/SingleSignOn.json | 5 +-
.../public/locales/nl/SingleSignOn.json | 5 +-
.../public/locales/pl/SingleSignOn.json | 5 +-
.../public/locales/pt-BR/SingleSignOn.json | 5 +-
.../public/locales/pt/SingleSignOn.json | 5 +-
.../public/locales/ro/SingleSignOn.json | 5 +-
.../public/locales/ru/SingleSignOn.json | 5 +-
.../public/locales/si/SingleSignOn.json | 5 +-
.../public/locales/sk/SingleSignOn.json | 5 +-
.../public/locales/sl/SingleSignOn.json | 5 +-
.../locales/sr-Cyrl-RS/SingleSignOn.json | 5 +-
.../locales/sr-Latn-RS/SingleSignOn.json | 5 +-
.../public/locales/tr/SingleSignOn.json | 5 +-
.../public/locales/uk-UA/SingleSignOn.json | 5 +-
.../public/locales/vi/SingleSignOn.json | 5 +-
.../public/locales/zh-CN/SingleSignOn.json | 5 +-
.../ResetConfirmationModal.js | 14 ++--
.../StyledModalDialog.js | 64 +++++++++++++++++++
.../integration/SingleSignOn/SubmitButton.js | 16 ++++-
public/locales/ar-SA/Common.json | 5 +-
public/locales/az/Common.json | 5 +-
public/locales/bg/Common.json | 5 +-
public/locales/cs/Common.json | 5 +-
public/locales/de/Common.json | 5 +-
public/locales/el-GR/Common.json | 5 +-
public/locales/en/Common.json | 5 +-
public/locales/es/Common.json | 5 +-
public/locales/fi/Common.json | 5 +-
public/locales/fr/Common.json | 5 +-
public/locales/hy-AM/Common.json | 5 +-
public/locales/it/Common.json | 5 +-
public/locales/ja-JP/Common.json | 5 +-
public/locales/ko-KR/Common.json | 5 +-
public/locales/lo-LA/Common.json | 5 +-
public/locales/lv/Common.json | 5 +-
public/locales/nl/Common.json | 5 +-
public/locales/pl/Common.json | 5 +-
public/locales/pt-BR/Common.json | 5 +-
public/locales/pt/Common.json | 5 +-
public/locales/ro/Common.json | 5 +-
public/locales/ru/Common.json | 5 +-
public/locales/si/Common.json | 5 +-
public/locales/sk/Common.json | 5 +-
public/locales/sl/Common.json | 5 +-
public/locales/sr-Cyrl-RS/Common.json | 5 +-
public/locales/sr-Latn-RS/Common.json | 5 +-
public/locales/tr/Common.json | 5 +-
public/locales/uk-UA/Common.json | 5 +-
public/locales/vi/Common.json | 5 +-
public/locales/zh-CN/Common.json | 5 +-
65 files changed, 237 insertions(+), 167 deletions(-)
rename packages/client/src/{pages/PortalSettings/categories/integration/SingleSignOn/sub-components => components/dialogs/ResetConfirmationDialog}/ResetConfirmationModal.js (83%)
create mode 100644 packages/client/src/components/dialogs/ResetConfirmationDialog/StyledModalDialog.js
diff --git a/packages/client/public/locales/ar-SA/SingleSignOn.json b/packages/client/public/locales/ar-SA/SingleSignOn.json
index 70ba83a0c2..f29f35594b 100644
--- a/packages/client/public/locales/ar-SA/SingleSignOn.json
+++ b/packages/client/public/locales/ar-SA/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "إضافة شهادة",
"AdvancedSettings": "الإعدادات المتقدمة",
"AdvancedSettingsTooltip": "إخفاء صفحة المصادقة الافتراضية وإعادة التوجيه تلقائيًا إلى خدمة Single Sign-On (SSO).",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "مطابقة سمات Single Sign-On مع إدخالات قسم \"الحسابات\".",
"Binding": "الربط:",
"CertificateExist": "شهادة بنفس نوع الإجراء موجودة بالفعل.",
- "ConfirmationText": "سيتم فقدان جميع البيانات التي أدخلتها. هل أنت متأكد أنك ترغب في المتابعة؟",
"CustomEntryButton": "تخصيص تسمية زر تسجيل الدخول",
"CustomEntryTooltip": "التسمية المستخدمة للزر الذي يُستخدم لتسجيل الدخول إلى المساحة باستخدام خدمة تسجيل الدخول الموحدة",
"DownloadMetadataXML": "تنزيل ملف بيانات المزوّد",
@@ -61,4 +60,4 @@
"UploadXML": "تحميل البيانات من لغة التوصيف الموسعة لملىء الحقول المطلوبة تلقائيًا.",
"UploadXMLPlaceholder": "عنوان رابط للبيانات الوصفية لمزود الهوية بتنسيق لغة التوصيف الموسعة",
"UsedFor": "يسخدم من اجل"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/az/SingleSignOn.json b/packages/client/public/locales/az/SingleSignOn.json
index 6d35172306..ab28c35734 100644
--- a/packages/client/public/locales/az/SingleSignOn.json
+++ b/packages/client/public/locales/az/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Sertifikat əlavə edin",
"AdvancedSettings": "Qabaqcıl Parametrlər",
"AdvancedSettingsTooltip": "Defolt doğrulama səhifəsini gizlədin və avtomatik olaraq SSO xidmətinə yönləndirin.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Birdəfəlik Giriş Atributları \"Hesablar\" bölməsindəki qeydlərə uyğundur.",
"Binding": "Birləşdirən:",
"CertificateExist": "Eyni fəaliyyət növü olan sertifikat artıq mövcuddur",
- "ConfirmationText": "Daxil etdiyiniz bütün məlumatlar itiriləcək. Davam etmək istədiyinizə əminsiniz?",
"CustomEntryButton": "Fərdi giriş düyməsinin başlığı",
"CustomEntryTooltip": "Birdəfəlik Giriş xidməti ilə domenə daxil olmaq üçün istifadə edilən düymənin adı",
"DownloadMetadataXML": "SP metadata XML-ni endirin",
@@ -61,4 +60,4 @@
"UploadXML": "Tələb olunan sahələri avtomatik doldurmaq üçün XML-dən metadata yükləyin.",
"UploadXMLPlaceholder": "IdP Metadata XML üçün URL",
"UsedFor": "İstifadə etmək üçün"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/bg/SingleSignOn.json b/packages/client/public/locales/bg/SingleSignOn.json
index 3e9f0b8826..b9e9cacf8c 100644
--- a/packages/client/public/locales/bg/SingleSignOn.json
+++ b/packages/client/public/locales/bg/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Добавете сертификат",
"AdvancedSettings": "Разширени настройки",
"AdvancedSettingsTooltip": "Скриване на страницата за удостоверяване по подразбиране и автоматично пренасочване към SSO услуга.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Съответствието на атрибутите за единично вписване към записите в секцията „Акаунти“.",
"Binding": "Обвързване:",
"CertificateExist": "Вече съществува сертификат със същия тип действие",
- "ConfirmationText": "Всички въведени от вас данни ще бъдат загубени. Сигурни ли сте, че искате да продължите?",
"CustomEntryButton": "Персонализиран надпис на бутона за влизане",
"CustomEntryTooltip": "Надписът за бутона, използван за вписване в пространството с услугата за единично вписване",
"DownloadMetadataXML": "Изтеглете XML с метаданните на доставчика на услуги",
@@ -61,4 +60,4 @@
"UploadXML": "Заредете метаданни от XML, за да попълните автоматично необходимите полета.",
"UploadXMLPlaceholder": "URL към XML с метаданните на доставчика на идентичност",
"UsedFor": "Използвай за"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/cs/SingleSignOn.json b/packages/client/public/locales/cs/SingleSignOn.json
index c06da93475..1fa96fe5e0 100644
--- a/packages/client/public/locales/cs/SingleSignOn.json
+++ b/packages/client/public/locales/cs/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Přidat certifikát",
"AdvancedSettings": "Rozšířená nastavení",
"AdvancedSettingsTooltip": "Skrýt výchozí ověřovací stránky a automaticky přesměrovat na službu SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Shoda atributů jednotného přihlášení se záznamy v sekci „Účty“.",
"Binding": "Vazba:",
"CertificateExist": "Certifikát se stejným typem akce již existuje.",
- "ConfirmationText": "Všechna zadaná data budou ztracena. Určitě chcete pokračovat?",
"CustomEntryButton": "Vlastní titulek přihlašovacího tlačítka",
"CustomEntryTooltip": "Titulek tlačítka pro přihlášení do prostoru pomocí služby jednotného přihlášení",
"DownloadMetadataXML": "Stáhnout metadata SP XML",
@@ -61,4 +60,4 @@
"UploadXML": "Načtení metadat z XML pro automatické vyplnění požadovaných polí.",
"UploadXMLPlaceholder": "Adresa URL na metadata IdP XML",
"UsedFor": "Použijte pro"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/de/SingleSignOn.json b/packages/client/public/locales/de/SingleSignOn.json
index 6dd2791967..e28be14b52 100644
--- a/packages/client/public/locales/de/SingleSignOn.json
+++ b/packages/client/public/locales/de/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Zertifikat hinzufügen",
"AdvancedSettings": "Erweiterte Einstellungen",
"AdvancedSettingsTooltip": "Standard-Authentifizierungsseite und automatische Weiterleitung zum SSO-Dienst ausblenden.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Die Entsprechung der Single-Sign-On-Attribute zu den Einträgen des Bereichs «Konten».",
"Binding": "Bindung:",
"CertificateExist": "Es gibt bereits ein Zertifikat mit gleichem Aktionstyp",
- "ConfirmationText": "Alle von Ihnen eingegebenen Daten gehen verloren. Sind Sie sicher, dass Sie fortfahren möchten?",
"CustomEntryButton": "Benutzerdefinierte Beschriftung der Anmeldeschaltfläche",
"CustomEntryTooltip": "Die Beschriftung für die Schaltfläche, die für die Anmeldung im Bereich mit dem Single Sign-On-Dienst verwendet wird",
"DownloadMetadataXML": "XML mit SP-Metadaten herunterladen",
@@ -61,4 +60,4 @@
"UploadXML": "Laden von Metadaten aus XML zum automatischen Ausfüllen der erforderlichen Felder.",
"UploadXMLPlaceholder": "URL zu IdP-Metadaten-XML",
"UsedFor": "Verwenden für"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/el-GR/SingleSignOn.json b/packages/client/public/locales/el-GR/SingleSignOn.json
index 39d46cf220..0deb74600c 100644
--- a/packages/client/public/locales/el-GR/SingleSignOn.json
+++ b/packages/client/public/locales/el-GR/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Προσθήκη πιστοποιητικού",
"AdvancedSettings": "Προχωρημένες ρυθμίσεις",
"AdvancedSettingsTooltip": "Απόκρυψη της προεπιλεγμένης σελίδας ελέγχου ταυτότητας και αυτόματη ανακατεύθυνση στην υπηρεσία SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Η αντιστοιχία των χαρακτηριστικών της υπηρεσίας ενιαίας σύνδεσης με τις καταχωρήσεις της ενότητας «Λογαριασμοί».",
"Binding": "Δέσμευση:",
"CertificateExist": "Υπάρχει ήδη πιστοποιητικό με τον ίδιο τύπο ενέργειας",
- "ConfirmationText": "Όλα τα δεδομένα που έχετε εισάγει θα χαθούν. Θέλετε σίγουρα να συνεχίσετε;",
"CustomEntryButton": "Προσαρμοσμένη λεζάντα κουμπιού σύνδεσης",
"CustomEntryTooltip": "Η λεζάντα για το κουμπί που χρησιμοποιείται για τη σύνδεση στον χώρο με την υπηρεσία ενιαίας σύνδεσης",
"DownloadMetadataXML": "Λήψη μεταδεδομένων παρόχου υπηρεσιών XML",
@@ -61,4 +60,4 @@
"UploadXML": "Φόρτωση μεταδεδομένων από XML για την αυτόματη συμπλήρωση των απαιτούμενων πεδίων.",
"UploadXMLPlaceholder": "URL για τα μεταδεδομένα XML του παρόχου ταυτότητας",
"UsedFor": "Χρήση για"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/en/SingleSignOn.json b/packages/client/public/locales/en/SingleSignOn.json
index 0ce4ee2e69..bb79998671 100644
--- a/packages/client/public/locales/en/SingleSignOn.json
+++ b/packages/client/public/locales/en/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Add certificate",
"AdvancedSettings": "Advanced Settings",
"AdvancedSettingsTooltip": "Hide default authentication page and automatically redirect to SSO service.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "The correspondence of the Single Sign-On attributes to the entries of the 'Accounts' section.",
"Binding": "Binding:",
"CertificateExist": "Certificate with same action type already exists",
- "ConfirmationText": "All the data you entered will be lost. Are you sure you want to continue?",
"CustomEntryButton": "Custom login button caption",
"CustomEntryTooltip": "The caption for the button used to login into the space with the Single Sign-On service",
"DownloadMetadataXML": "Download SP metadata XML",
@@ -61,4 +60,4 @@
"UploadXML": "Load metadata from XML to fill the required fields automatically.",
"UploadXMLPlaceholder": "URL to IdP Metadata XML",
"UsedFor": "Use for"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/es/SingleSignOn.json b/packages/client/public/locales/es/SingleSignOn.json
index d76d43bfc9..65435d0a12 100644
--- a/packages/client/public/locales/es/SingleSignOn.json
+++ b/packages/client/public/locales/es/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Añadir certificado",
"AdvancedSettings": "Configuración avanzada",
"AdvancedSettingsTooltip": "Ocultar la página de autenticación predeterminada y redirigir automáticamente al servicio SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "correspondencia de los atributos de Inicio de sesión único con las entradas de la sección «Cuentas».",
"Binding": "Enlace:",
"CertificateExist": "Ya existe un certificado con el mismo tipo de acción.",
- "ConfirmationText": "Se perderán todos los datos introducidos. ¿Está seguro de que desea continuar?",
"CustomEntryButton": "Leyenda personalizada del botón de inicio de sesión",
"CustomEntryTooltip": "Leyenda del botón utilizado para iniciar sesión en el espacio con el servicio de inicio de sesión único.",
"DownloadMetadataXML": "Descargar XML de metadatos SP",
@@ -61,4 +60,4 @@
"UploadXML": "Cargar metadatos desde XML para rellenar automáticamente los campos obligatorios.",
"UploadXMLPlaceholder": "URL al XML de metadatos IdP",
"UsedFor": "Se usa para"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/fi/SingleSignOn.json b/packages/client/public/locales/fi/SingleSignOn.json
index 778cc3c1ab..aa29bf0f46 100644
--- a/packages/client/public/locales/fi/SingleSignOn.json
+++ b/packages/client/public/locales/fi/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Lisää sertifikaatti",
"AdvancedSettings": "Lisäasetukset",
"AdvancedSettingsTooltip": "Piilota oletustodennussivu ja ohjaa automaattisesti SSO-palveluun.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Kertakirjautumisattribuuttien viestintä Tilit-osion merkintöjen kanssa.",
"Binding": "Sitova:",
"CertificateExist": "Saman toimintotyypin sertifikaatti on jo olemassa",
- "ConfirmationText": "Kaikki syöttämäsi tieto menetetään. Haluatko varmasti jatkaa?",
"CustomEntryButton": "Mukautetun sisäänkirjautumispainikkeen teksti",
"CustomEntryTooltip": "Painikkeen kuvateksti, jota käytetään tilaan sisäänkirjautumiseen kertakirjautumispalvelun avulla",
"DownloadMetadataXML": "Lataa SP-metadata XML",
@@ -61,4 +60,4 @@
"UploadXML": "Lataa metadata XML:stä täyttääksesi vaaditut kentät automaattisesti.",
"UploadXMLPlaceholder": "URL:sta IdP:n metadata XML",
"UsedFor": "Käyttää"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/fr/SingleSignOn.json b/packages/client/public/locales/fr/SingleSignOn.json
index 3df8414cfc..66f9746668 100644
--- a/packages/client/public/locales/fr/SingleSignOn.json
+++ b/packages/client/public/locales/fr/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Ajouter un certificat",
"AdvancedSettings": "Paramètres avancés",
"AdvancedSettingsTooltip": "Masquer la page d’authentification par défaut et rediriger automatiquement vers le service SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "La correspondance entre les attributs de l’authentification unique et les entrées de la section \"Comptes\".",
"Binding": "Liaison :",
"CertificateExist": "Le certificat avec le même type d’action existe déjà.",
- "ConfirmationText": "Toutes les données que vous avez saisies seront perdues. Êtes-vous sûr de vouloir continuer ?",
"CustomEntryButton": "Légende du bouton de connexion personnalisée",
"CustomEntryTooltip": "Légende du bouton utilisé pour se connecter à l’espace avec le service d’authentification unique (Single Sign-On)",
"DownloadMetadataXML": "Télécharger le fichier XML des métadonnées SP",
@@ -61,4 +60,4 @@
"UploadXML": "Charger des métadonnées à partir de XML pour remplir automatiquement les champs obligatoires.",
"UploadXMLPlaceholder": "URL vers les métadonnées XML de l’IdP",
"UsedFor": "Utiliser pour"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/hy-AM/SingleSignOn.json b/packages/client/public/locales/hy-AM/SingleSignOn.json
index ad7c621bf2..052dc2789b 100644
--- a/packages/client/public/locales/hy-AM/SingleSignOn.json
+++ b/packages/client/public/locales/hy-AM/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Ավելացնել վկայագիր",
"AdvancedSettings": "Լրացուցիչ կարգավորումներ",
"AdvancedSettingsTooltip": "Թաքցնել լռելյայն նույնականացման էջը և ավտոմատ կերպով վերահղել SSO ծառայությանը:",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Single Sign-On-ի համապատասխանությունը վերագրվում է «Հաշիվներ» բաժնի գրառումներին:",
"Binding": "Կապում․",
"CertificateExist": "Նույն գործողության տեսակով վկայագիրն արդեն գոյություն ունի",
- "ConfirmationText": "Ձեր մուտքագրած բոլոր տվյալները կկորչեն: Վստա՞հ եք, որ ցանկանում եք շարունակել:",
"CustomEntryButton": "Հատուկ մուտքի կոճակի վերնագիր",
"CustomEntryTooltip": "Կոճակի վերնագիր, որն օգտագործվում է Single Sign-On ծառայության միջոցով տարածք մուտք գործելու համար",
"DownloadMetadataXML": "Ներբեռնել SP մետատվյալների XML-ը",
@@ -61,4 +60,4 @@
"UploadXML": "Բեռնեք մետատվյալները XML-ից՝ պահանջվող դաշտերը ավտոմատ կերպով լրացնելու համար:",
"UploadXMLPlaceholder": "URL դեպի IdP Մետատվյալների XML",
"UsedFor": "օգտագործել __ ի համար"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/it/SingleSignOn.json b/packages/client/public/locales/it/SingleSignOn.json
index a2ee767901..06255e0bdd 100644
--- a/packages/client/public/locales/it/SingleSignOn.json
+++ b/packages/client/public/locales/it/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Aggiungi certificato",
"AdvancedSettings": "Impostazioni avanzate",
"AdvancedSettingsTooltip": "Nascondi la pagina di autenticazione predefinita e reindirizza automaticamente al servizio SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "La corrispondenza degli attributi Single Sign-On con le voci della sezione 'Account'.",
"Binding": "Vincolo:",
"CertificateExist": "Il certificato con lo stesso tipo di azione già esiste",
- "ConfirmationText": "Tutti i dati inseriti andranno persi. Sei sicuro di voler continuare?",
"CustomEntryButton": "Didascalia del pulsante di accesso personalizzata",
"CustomEntryTooltip": "Didascalia del pulsante utilizzato per effettuare l’accesso nello spazio con il servizio Single Sign-On",
"DownloadMetadataXML": "Scarica SP file XML per metadati",
@@ -61,4 +60,4 @@
"UploadXML": "Carica i metadati da XML per riempire automaticamente i campi richiesti.",
"UploadXMLPlaceholder": "URL a metadati IdP XML",
"UsedFor": "Utilizza per"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/ja-JP/SingleSignOn.json b/packages/client/public/locales/ja-JP/SingleSignOn.json
index c6723e8229..31aed9511e 100644
--- a/packages/client/public/locales/ja-JP/SingleSignOn.json
+++ b/packages/client/public/locales/ja-JP/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "証明書の追加",
"AdvancedSettings": "詳細設定",
"AdvancedSettingsTooltip": "デフォルトの認証ページを非表示にし、自動的にSSOサービスにリダイレクトする。",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "シングルサインオンの属性と「アカウント」セクションの項目との対応関係。",
"Binding": "バインド",
"CertificateExist": "同じアクションタイプを持つ証明書が既に存在しています。",
- "ConfirmationText": "入力したデータはすべて失われます。このまま続けますか?",
"CustomEntryButton": "カスタムログインボタンのキャプション",
"CustomEntryTooltip": "シングルサインオンサービスを利用してスペースにログインする際に使用するボタンのキャプション",
"DownloadMetadataXML": "SPメタデータXMLのダウンロード",
@@ -61,4 +60,4 @@
"UploadXML": "XMLからメタデータを読み込み、必要な項目を自動で埋める。",
"UploadXMLPlaceholder": "IdPメタデータXMLへのURL",
"UsedFor": "使用目的"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/ko-KR/SingleSignOn.json b/packages/client/public/locales/ko-KR/SingleSignOn.json
index b647b2d1d4..1199c072f7 100644
--- a/packages/client/public/locales/ko-KR/SingleSignOn.json
+++ b/packages/client/public/locales/ko-KR/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "인증서 추가",
"AdvancedSettings": "고급 설정",
"AdvancedSettingsTooltip": "기본 인증 페이지 숨기기 및 SSO 서비스로 자동 리디렉션.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "'계정' 섹션의 항목에 대한싱글 사인온 속성의 대응.",
"Binding": "바인딩:",
"CertificateExist": "동일한 작업 유형의 인증서가 이미 존재합니다",
- "ConfirmationText": "입력한 모든 데이터가 손실됩니다. 정말로 계속하시겠습니까?",
"CustomEntryButton": "사용자 지정 버튼 캡션",
"CustomEntryTooltip": "싱글 사인온 서비스로 공간에 로그인하는 데 사용되는 버튼의 캡션",
"DownloadMetadataXML": "SP 메타데이터 XML 다운로드",
@@ -61,4 +60,4 @@
"UploadXML": "필수 필드를 자동으로 입력하기 위해 XML에서 메타데이터를 로드하세요.",
"UploadXMLPlaceholder": "IdP 메타데이터 XML에 대한 URL",
"UsedFor": "사용"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/lo-LA/SingleSignOn.json b/packages/client/public/locales/lo-LA/SingleSignOn.json
index e908c68997..3bd705c659 100644
--- a/packages/client/public/locales/lo-LA/SingleSignOn.json
+++ b/packages/client/public/locales/lo-LA/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "ເພີ່ມໃບຢັ້ງຢືນ",
"AdvancedSettings": "ຕັ້ງຄ່າຂັ້ນສູງ",
"AdvancedSettingsTooltip": "ເຊື່ອງໜ້າການພິສູດຢືນຢັນເລີ່ມຕົ້ນ ແລະ ປ່ຽນເສັ້ນທາງໄປຫາ ບໍລິການ SSO ໂດຍອັດຕະໂນມັດ.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "ການຕອບສະ ໜອງ ຂອງຄຸນລັກສະນະການເຂົ້າສູ່ລະບົບດຽວຕໍ່ກັບລາຍການຂອງພາກສ່ວນ 'ບັນຊີ'.",
"Binding": "ຜູກມັດ:",
"CertificateExist": "ໃບຢັ້ງຢືນທີ່ມີປະເພດການປະຕິບັດດຽວກັນມີຢູ່ແລ້ວ",
- "ConfirmationText": "ຂໍ້ມູນທັງໝົດທີ່ທ່ານປ້ອນເຂົ້າຈະສູນເສຍໄປ. ທ່ານແນ່ໃຈບໍ່ວ່າຕ້ອງການສືບຕໍ່?",
"CustomEntryButton": "ຄຳບັນຍາຍປຸ່ມເຂົ້າສູ່ລະບົບແບບກຳນົດເອງ",
"CustomEntryTooltip": "ຄຳບັນຍາຍສຳລັບປຸ່ມທີ່ໃຊ້ເພື່ອເຂົ້າສູ່ລະບົບຊ່ອງດ້ວຍການບໍລິການເຂົ້າສູ່ລະບົບຄັ້ງດຽວ",
"DownloadMetadataXML": "ດາວໂຫລດ SP metadata XML",
@@ -61,4 +60,4 @@
"UploadXML": "ໂຫຼດ metadata ຈາກ XML ເພື່ອຕື່ມຂໍ້ມູນໃສ່ຊ່ອງຂໍ້ມູນທີ່ຕ້ອງການໂດຍອັດຕະໂນມັດ.",
"UploadXMLPlaceholder": "URL ໄປຫາ IdP Metadata XML",
"UsedFor": "ໃຊ້ສໍາລັບ"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/lv/SingleSignOn.json b/packages/client/public/locales/lv/SingleSignOn.json
index f8ccb9f2fb..3f98a44c70 100644
--- a/packages/client/public/locales/lv/SingleSignOn.json
+++ b/packages/client/public/locales/lv/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Pievienot sertifikātu",
"AdvancedSettings": "Papildu iestatījumi",
"AdvancedSettingsTooltip": "Slēpt noklusējuma autentifikācijas lapu un automātiski novirzīt uz SSO pakalpojumu.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Vienotās pierakstīšanās atribūtu atbilstība ierakstiem sadaļā Konti (Accounts).",
"Binding": "Saistīšana:",
"CertificateExist": "Sertifikāts ar tādu pašu darbības tipu jau pastāv",
- "ConfirmationText": "Visi ievadītie dati tiks zaudēti. Vai tiešām vēlaties turpināt?",
"CustomEntryButton": "Pielāgots pieteikšanās pogas paraksts",
"CustomEntryTooltip": "Paraksts pogai, ko izmanto, lai pieteiktos telpā, izmantojot vienotās pierakstīšanās pakalpojumu",
"DownloadMetadataXML": "Lejupielādēt SP metadatu XML",
@@ -61,4 +60,4 @@
"UploadXML": "Ielādēt metadatus no XML, lai automātiski aizpildītu nepieciešamos laukus.",
"UploadXMLPlaceholder": "IdP metadatu XML vietrādis URL",
"UsedFor": "Izmantot"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/nl/SingleSignOn.json b/packages/client/public/locales/nl/SingleSignOn.json
index f593c7af87..ad47b43dca 100644
--- a/packages/client/public/locales/nl/SingleSignOn.json
+++ b/packages/client/public/locales/nl/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Certificaat toevoegen",
"AdvancedSettings": "Geavanceerde Instellingen",
"AdvancedSettingsTooltip": "Standaard authenticatiepagina verbergen en automatisch doorverwijzen naar SSO-dienst.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "De correspondentie van de Single Sign-On attributen met de items van de \"Accounts\" sectie.",
"Binding": "Binding:",
"CertificateExist": "Certificaat met hetzelfde actietype bestaat al",
- "ConfirmationText": "Alle ingevoerde gegevens gaan verloren. Weet u zeker dat u door wilt gaan?",
"CustomEntryButton": "Aangepaste aanmeldingsknop bijschrift",
"CustomEntryTooltip": "Het bijschrift voor de knop die wordt gebruikt om in te loggen in de ruimte met de Single Sign-On dienst",
"DownloadMetadataXML": "Download SP metadata XML",
@@ -61,4 +60,4 @@
"UploadXML": "Metagegevens uit XML laden om de vereiste velden automatisch te vullen.",
"UploadXMLPlaceholder": "URL naar IdP Metadata XML",
"UsedFor": "Gebruik voor"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/pl/SingleSignOn.json b/packages/client/public/locales/pl/SingleSignOn.json
index 89c82a3590..5d0fee46cf 100644
--- a/packages/client/public/locales/pl/SingleSignOn.json
+++ b/packages/client/public/locales/pl/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Dodaj certyfikat",
"AdvancedSettings": "Ustawienia zaawansowane",
"AdvancedSettingsTooltip": "Ukryj domyślną stronę uwierzytelniania i automatycznie kieruj do usługi pojedynczego logowania.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Zgodność atrybutów pojedynczego logowania z wpisami sekcji „Konta”.",
"Binding": "Powiązanie:",
"CertificateExist": "Certyfikat o tym samym rodzaju działania już istnieje",
- "ConfirmationText": "Wszystkie wprowadzone dane zostaną utracone. Czy na pewno chcesz kontynuować?",
"CustomEntryButton": "Niestandardowy podpis przycisku logowania",
"CustomEntryTooltip": "Podpis dla przycisku służącego do logowania się w obszarze roboczym za pomocą usługi pojedynczego logowania",
"DownloadMetadataXML": "Pobierz XML z metadanymi usługodawcy",
@@ -61,4 +60,4 @@
"UploadXML": "Wczytaj metadane z XML, aby automatycznie wypełnić wymagane pola.",
"UploadXMLPlaceholder": "Adres URL do XML z metadanymi IdP",
"UsedFor": "Użyj do"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/pt-BR/SingleSignOn.json b/packages/client/public/locales/pt-BR/SingleSignOn.json
index fe28f0503b..78b8e26b11 100644
--- a/packages/client/public/locales/pt-BR/SingleSignOn.json
+++ b/packages/client/public/locales/pt-BR/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Adicionar certificado",
"AdvancedSettings": "Configurações avançadas",
"AdvancedSettingsTooltip": "Oculte a página de autenticação padrão e redirecione automaticamente para o serviço SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "A correspondência dos atributos do Single Sign-On com as entradas da seção 'Contas'.",
"Binding": "Vinculativo:",
"CertificateExist": "Certificado com o mesmo tipo de ação já existe",
- "ConfirmationText": "Todos os dados inseridos serão perdidos. Você tem certeza que quer continuar?",
"CustomEntryButton": "Legenda do botão de login personalizado",
"CustomEntryTooltip": "A legenda do botão usado para fazer login no espaço com o serviço Single Sign-On",
"DownloadMetadataXML": "Baixe o XML de metadados do SP",
@@ -61,4 +60,4 @@
"UploadXML": "Carregar metadados de XML para preencher automaticamente os campos necessários.",
"UploadXMLPlaceholder": "URL para IdP Metadados XML",
"UsedFor": "Use para"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/pt/SingleSignOn.json b/packages/client/public/locales/pt/SingleSignOn.json
index a889fa5771..601d46d985 100644
--- a/packages/client/public/locales/pt/SingleSignOn.json
+++ b/packages/client/public/locales/pt/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Adicionar certificado",
"AdvancedSettings": "Configurações Avançadas",
"AdvancedSettingsTooltip": "Ocultar página de autenticação predefinida e redirecionar automaticamente para o serviço SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "A correspondência dos atributos do Início de Sessão Único às entradas da secção \"Contas”.",
"Binding": "Vinculativo:",
"CertificateExist": "Já existe um certificado com o mesmo tipo de acção",
- "ConfirmationText": "Todos os dados que introduziu serão perdidos. Tem a certeza que quer proceder?",
"CustomEntryButton": "Legenda dos botões personalizados para iniciar sessão",
"CustomEntryTooltip": "A legenda do botão utilizado para aceder ao espaço com o serviço de Início de Sessão Único",
"DownloadMetadataXML": "Transferir a metadata do SP XML",
@@ -61,4 +60,4 @@
"UploadXML": "Carregue os metadados através de um XML para preencher os campos obrigatórios automaticamente.",
"UploadXMLPlaceholder": "URL para o XML com os metadados do IdP",
"UsedFor": "Utilizar para"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/ro/SingleSignOn.json b/packages/client/public/locales/ro/SingleSignOn.json
index fa0248b2b0..49cceec7ef 100644
--- a/packages/client/public/locales/ro/SingleSignOn.json
+++ b/packages/client/public/locales/ro/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Adăugare certificat",
"AdvancedSettings": "Setări avansate",
"AdvancedSettingsTooltip": "Ascundere pagina de autentificare implicită şi redirecționare automată spre serviciu SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Corespondenţa atributelor SSO cu intrările din secţiunea Conturi.",
"Binding": "Legătură:",
"CertificateExist": "Es gibt bereits ein Zertifikat mit gleichem Aktionstyp",
- "ConfirmationText": "Toate datele introduse se vor pierde. Sigur doriţi să continuați?",
"CustomEntryButton": "Etichetă de buton de conectare particularizată",
"CustomEntryTooltip": "Eticheta butonului pentru conectarea la spaţiul cu sistem de autentificare unică (SSO)",
"DownloadMetadataXML": "Descărcare fişier de metadate XML a furnizorului de servicii",
@@ -61,4 +60,4 @@
"UploadXML": "Încărcați metadatele din XML pentru a completa automat câmpurile necesare.",
"UploadXMLPlaceholder": "Adresa URL la fişierul de metadate XML al furnizorului ID",
"UsedFor": "Utilizare pentru"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/ru/SingleSignOn.json b/packages/client/public/locales/ru/SingleSignOn.json
index 26b12802fc..b9a56077fb 100644
--- a/packages/client/public/locales/ru/SingleSignOn.json
+++ b/packages/client/public/locales/ru/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Добавить сертификат",
"AdvancedSettings": "Дополнительно",
"AdvancedSettingsTooltip": "Скрыть страницу аутентификации по умолчанию и автоматически перенаправлять на сервис SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Соответствие атрибутов единого входа записям раздела 'Аккаунты'.",
"Binding": "Привязка:",
"CertificateExist": "Сертификат с таким же типом действия уже существует",
- "ConfirmationText": "Все введенные данные будут потеряны. Вы уверены, что хотите продолжить?",
"CustomEntryButton": "Пользовательская надпись для кнопки входа:",
"CustomEntryTooltip": "Надпись для кнопки, которая используется для входа на портал с помощью сервиса Single Sign-on",
"DownloadMetadataXML": "Скачать XML-файл метаданных поставщика сервиса",
@@ -61,4 +60,4 @@
"UploadXML": "Для автоматического заполнения необходимых полей загрузите метаданные из XML-файла.",
"UploadXMLPlaceholder": "URL адрес XML-файла метаданных",
"UsedFor": "Использовать для"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/si/SingleSignOn.json b/packages/client/public/locales/si/SingleSignOn.json
index 5b15ff5503..d96ca5a6ea 100644
--- a/packages/client/public/locales/si/SingleSignOn.json
+++ b/packages/client/public/locales/si/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "සහතිකයක් යොදන්න",
"AdvancedSettings": "වැඩිදුර සැකසුම්",
"AdvancedSettingsTooltip": "පෙරනිමි ද්වි සාධක පිටුව සඟවා ස්වයංක්රීයව තනි-පිවිසුම් (SSO) සේවාව වෙත හරවා යවන්න.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "තනි පිවිසුම් අනුරූපතා 'ගිණුම්' කොටසේ නිවේශිත වලට ආරෝපණය කරයි.",
"Binding": "බැඳීම:",
"CertificateExist": "සමාන ක්රියාමාර්ග වර්ගයක සහතිකයක් දැනටමත් පවතී",
- "ConfirmationText": "ඔබ ඇතුල් කළ සියළුම දත්ත නැති වී යනු ඇත. ඔබට ඉදිරියට යාමට වුවමනා ද?",
"CustomEntryButton": "අභිරුචි පිවිසුම් බොත්තමේ ශ්රීර්ෂය",
"CustomEntryTooltip": "තනි පිවිසුම් සේවාව හරහා අවකාශයට පිවිසීමට භාවිතා කරන බොත්තම සඳහා ශ්රීර්ෂය",
"DownloadMetadataXML": "SP පාරදත්ත XML බාගන්න",
@@ -58,4 +57,4 @@
"UploadXML": "වුවමනා ක්ෂේත්ර ස්වයංක්රීයව පිරවීමට XML වෙතින් පාරදත්ත පූරණය කරන්න.",
"UploadXMLPlaceholder": "IdP පාරදත්ත XML වෙත ඒ.ස.නි.",
"UsedFor": "භාවිතා වන්නේ"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/sk/SingleSignOn.json b/packages/client/public/locales/sk/SingleSignOn.json
index 961766965a..da61b71a86 100644
--- a/packages/client/public/locales/sk/SingleSignOn.json
+++ b/packages/client/public/locales/sk/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Pridať certifikát",
"AdvancedSettings": "Rozšírené nastavenia",
"AdvancedSettingsTooltip": "Skryť predvolenú autorizačnú stránku a automaticky presmerovať na službu SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Zhoda atribútov jednotného prihlásenia so záznamami v sekcii „Účty“.",
"Binding": "Spojenie:",
"CertificateExist": "Certifikát s rovnakým typom akcie už existuje",
- "ConfirmationText": "Všetky zadané údaje sa stratia. Ste si istý, že chcete pokračovať?",
"CustomEntryButton": "Vlastný popis tlačidla prihlásenia",
"CustomEntryTooltip": "Popis tlačidla, ktoré sa používa na prihlásenie do priestoru so službou jednotného prihlásenia",
"DownloadMetadataXML": "Načítať SP metadáta XML",
@@ -61,4 +60,4 @@
"UploadXML": "Načítajte metadáta z XML a automaticky vyplňte požadované polia.",
"UploadXMLPlaceholder": "URL do IdP Metadáta XML",
"UsedFor": "Použiť pre"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/sl/SingleSignOn.json b/packages/client/public/locales/sl/SingleSignOn.json
index b40a7e436a..0947772edf 100644
--- a/packages/client/public/locales/sl/SingleSignOn.json
+++ b/packages/client/public/locales/sl/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Dodaj certifikat",
"AdvancedSettings": "Napredne nastavitve",
"AdvancedSettingsTooltip": "Skrij privzeto stran za avtentikacijo in samodejno preusmeri na storitev SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Ujemanje atributov enotne prijave z vnosi v razdelku 'Računi'.",
"Binding": "Vezava:",
"CertificateExist": "Certifikat z isto vrsto akcije že obstaja",
- "ConfirmationText": "Vsi vneseni podatki bodo izgubljeni. Ali ste prepričani, da želite nadaljevati?",
"CustomEntryButton": "Prilagojen naslov gumba za prijavo",
"CustomEntryTooltip": "Napis za gumbu za prijavo v prostor s storitvijo enkratne prijave",
"DownloadMetadataXML": "Prenesi SP metapodatke v XML",
@@ -61,4 +60,4 @@
"UploadXML": "Naloži metapodatke iz XML, da se samodejno izpolnijo zahtevana polja.",
"UploadXMLPlaceholder": "URL do IdP Meta podatkov XML",
"UsedFor": "Uporabi za"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/sr-Cyrl-RS/SingleSignOn.json b/packages/client/public/locales/sr-Cyrl-RS/SingleSignOn.json
index 6cdfb19a70..4ffc37a248 100644
--- a/packages/client/public/locales/sr-Cyrl-RS/SingleSignOn.json
+++ b/packages/client/public/locales/sr-Cyrl-RS/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Додај сертификат",
"AdvancedSettings": "Напредна подешавања",
"AdvancedSettingsTooltip": "Сакријте подразумевану страницу за аутентификацију и аутоматски преусмерите на SSO сервис.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Одговарајуће Single Sign-On атрибута са уносима одељка 'Налози'.",
"Binding": "Повезивање:",
"CertificateExist": "Сертификат са истим типом акције већ постоји",
- "ConfirmationText": "Сви подаци које сте унели ће бити изгубљени. Да ли сте сигурни да желите да наставите?",
"CustomEntryButton": "Прилагођена ознака дугмета за пријављивање",
"CustomEntryTooltip": "Ознака дугмета за пријављивање у простор помоћу услуге Single Sign-On",
"DownloadMetadataXML": "Преузми SP метаподатке XML",
@@ -61,4 +60,4 @@
"UploadXML": "Учитајте метаподатке из XML-а да бисте аутоматски попунили потребна поља.",
"UploadXMLPlaceholder": "URL за IdP метаподатке XML",
"UsedFor": "Користи за"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/sr-Latn-RS/SingleSignOn.json b/packages/client/public/locales/sr-Latn-RS/SingleSignOn.json
index 67ca8aed90..1306bdaf77 100644
--- a/packages/client/public/locales/sr-Latn-RS/SingleSignOn.json
+++ b/packages/client/public/locales/sr-Latn-RS/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Dodaj sertifikat",
"AdvancedSettings": "Napredna podešavanja",
"AdvancedSettingsTooltip": "Sakrijte podrazumevanu stranicu za autentifikaciju i automatski preusmerite na SSO servis.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Odgovarajuće Single Sign-On atributa sa unosima odeljka 'Nalozi'.",
"Binding": "Povezivanje:",
"CertificateExist": "Sertifikat sa istim tipom akcije već postoji",
- "ConfirmationText": "Svi podaci koje ste uneli će biti izgubljeni. Da li ste sigurni da želite da nastavite?",
"CustomEntryButton": "Prilagođena oznaka dugmeta za prijavljivanje",
"CustomEntryTooltip": "Oznaka dugmeta za prijavljivanje u prostor pomoću usluge Single Sign-On",
"DownloadMetadataXML": "Preuzmi SP metapodatke XML",
@@ -61,4 +60,4 @@
"UploadXML": "Učitajte metapodatke iz XML-a da biste automatski popunili potrebna polja.",
"UploadXMLPlaceholder": "URL za IdP metapodatke XML",
"UsedFor": "Koristi za"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/tr/SingleSignOn.json b/packages/client/public/locales/tr/SingleSignOn.json
index ad7b8415ef..a3e12c5274 100644
--- a/packages/client/public/locales/tr/SingleSignOn.json
+++ b/packages/client/public/locales/tr/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Sertifika ekle",
"AdvancedSettings": "Gelişmiş Ayarlar",
"AdvancedSettingsTooltip": "Varsayılan kimlik doğrulama sayfasını gizle ve otomatik olarak SSO hizmetine yönlendir.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Tekli Oturum Açma öznitelikleri 'Hesaplar' bölümündeki girişlere karşılık gelir.",
"Binding": "Bağlayıcı:",
"CertificateExist": "Aynı eylem türüne sahip sertifika zaten var",
- "ConfirmationText": "Girdiğiniz tüm veriler kaybolacak. Devam etmek istediğinize emin misiniz?",
"CustomEntryButton": "Özel oturum açma düğmesi başlığı",
"CustomEntryTooltip": "Tek Oturum Açma hizmetiyle alana giriş yapmak için kullanılan düğmenin başlığı",
"DownloadMetadataXML": "SP meta veri XML'sini indirin",
@@ -61,4 +60,4 @@
"UploadXML": "Gerekli alanları otomatik olarak doldurmak için meta verileri XML'den yükleyin.",
"UploadXMLPlaceholder": "IdP Meta Veri XML URL'si",
"UsedFor": "Şunun için kullan"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/uk-UA/SingleSignOn.json b/packages/client/public/locales/uk-UA/SingleSignOn.json
index 8260f003a8..01c4ae7b0d 100644
--- a/packages/client/public/locales/uk-UA/SingleSignOn.json
+++ b/packages/client/public/locales/uk-UA/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Додати сертифікат",
"AdvancedSettings": "Додаткові параметри",
"AdvancedSettingsTooltip": "Приховати сторінку автентифікації за замовчуванням і автоматично переспрямовувати до служби єдиного входу.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Відповідність атрибутів єдиного входу записам розділу «Облікові записи».",
"Binding": "Зв’язування:",
"CertificateExist": "Сертифікат із таким типом дії вже існує",
- "ConfirmationText": "Усі введені вами дані буде втрачено. Ви впевнені, що бажаєте продовжити?",
"CustomEntryButton": "Налаштовуваний надпис на кнопці входу",
"CustomEntryTooltip": "Надпис для кнопки, яка використовується для входу до простору за допомогою служби єдиного входу",
"DownloadMetadataXML": "Завантажити XML-файл метаданих постачальника сервісу",
@@ -61,4 +60,4 @@
"UploadXML": "Завантажте метадані з XML-файлу, щоб автоматично заповнити необхідні поля.",
"UploadXMLPlaceholder": "URL-адреса XML-файлу метаданих постачальника посвідчень",
"UsedFor": "Використовувати для"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/vi/SingleSignOn.json b/packages/client/public/locales/vi/SingleSignOn.json
index 980b565de8..ccc5f12081 100644
--- a/packages/client/public/locales/vi/SingleSignOn.json
+++ b/packages/client/public/locales/vi/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "Thêm chứng chỉ",
"AdvancedSettings": "Cài đặt Nâng cao",
"AdvancedSettingsTooltip": "Ẩn trang xác thực mặc định và tự động chuyển hướng đến dịch vụ SSO.",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "Sự tương ứng của các thuộc tính Đăng nhập một lần với các mục nhập của phần 'Tài khoản.",
"Binding": "Kết hợp:",
"CertificateExist": "Chứng chỉ với cùng loại hành động đã tồn tại",
- "ConfirmationText": "Tất cả dữ liệu bạn đã nhập sẽ bị mất. Bạn có chắc chắn muốn tiếp tục không?",
"CustomEntryButton": "Chú thích nút đăng nhập tùy chỉnh",
"CustomEntryTooltip": "Chú thích cho nút được sử dụng để đăng nhập vào không gian với dịch vụ Đăng nhập một lần",
"DownloadMetadataXML": "Tải siêu dữ liệu SP metadata XML",
@@ -61,4 +60,4 @@
"UploadXML": "Tải siêu dữ liệu từ XML để tự động điền vào các trường bắt buộc.",
"UploadXMLPlaceholder": "URL tới Siêu dữ liệu XML IdP",
"UsedFor": "Sử dụng cho"
-}
+}
\ No newline at end of file
diff --git a/packages/client/public/locales/zh-CN/SingleSignOn.json b/packages/client/public/locales/zh-CN/SingleSignOn.json
index 457e76b313..3f7b429660 100644
--- a/packages/client/public/locales/zh-CN/SingleSignOn.json
+++ b/packages/client/public/locales/zh-CN/SingleSignOn.json
@@ -1,4 +1,4 @@
-{
+{
"AddCertificate": "添加证书",
"AdvancedSettings": "高级设置",
"AdvancedSettingsTooltip": "隐藏默认认证页面并自动重定向至 SSO 服务。",
@@ -6,7 +6,6 @@
"AttributeMatchingTooltip": "单点登录属性与“账户”部分条目的对应关系。",
"Binding": "绑定:",
"CertificateExist": "具有相同操作类型的证书已存在",
- "ConfirmationText": "您所输入的所有数据都将丢失。确定要继续吗?",
"CustomEntryButton": "自定义登录按钮标题",
"CustomEntryTooltip": "用于通过单点登录服务登录空间的按钮文本",
"DownloadMetadataXML": "下载 SP 元数据 XML",
@@ -61,4 +60,4 @@
"UploadXML": "从 XML 中加载元数据以自动填充所需字段。",
"UploadXMLPlaceholder": "IdP 元数据 XML URL",
"UsedFor": "用于"
-}
+}
\ No newline at end of file
diff --git a/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/sub-components/ResetConfirmationModal.js b/packages/client/src/components/dialogs/ResetConfirmationDialog/ResetConfirmationModal.js
similarity index 83%
rename from packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/sub-components/ResetConfirmationModal.js
rename to packages/client/src/components/dialogs/ResetConfirmationDialog/ResetConfirmationModal.js
index 5782288d12..c5780132c0 100644
--- a/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/sub-components/ResetConfirmationModal.js
+++ b/packages/client/src/components/dialogs/ResetConfirmationDialog/ResetConfirmationModal.js
@@ -25,18 +25,16 @@
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import React from "react";
-import { inject, observer } from "mobx-react";
import { useTranslation } from "react-i18next";
-import { Box } from "@docspace/shared/components/box";
import { Button } from "@docspace/shared/components/button";
import { ModalDialog } from "@docspace/shared/components/modal-dialog";
import { Text } from "@docspace/shared/components/text";
-import StyledModalDialog from "../styled-containers/StyledModalDialog";
+import StyledModalDialog from "./StyledModalDialog";
const ResetConfirmationModal = (props) => {
- const { t } = useTranslation(["SingleSignOn", "Common"]);
+ const { t } = useTranslation(["Common"]);
const { closeResetModal, confirmationResetModal, confirmReset } = props;
return (
@@ -49,7 +47,7 @@ const ResetConfirmationModal = (props) => {
{t("Common:Confirmation")}
- {t("ConfirmationText")}
+ {t("Common:ConfirmationText")}
@@ -73,8 +71,4 @@ const ResetConfirmationModal = (props) => {
);
};
-export default inject(({ ssoStore }) => {
- const { closeResetModal, confirmationResetModal, confirmReset } = ssoStore;
-
- return { closeResetModal, confirmationResetModal, confirmReset };
-})(observer(ResetConfirmationModal));
+export default ResetConfirmationModal;
diff --git a/packages/client/src/components/dialogs/ResetConfirmationDialog/StyledModalDialog.js b/packages/client/src/components/dialogs/ResetConfirmationDialog/StyledModalDialog.js
new file mode 100644
index 0000000000..394792d3a0
--- /dev/null
+++ b/packages/client/src/components/dialogs/ResetConfirmationDialog/StyledModalDialog.js
@@ -0,0 +1,64 @@
+// (c) Copyright Ascensio System SIA 2009-2024
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+import styled from "styled-components";
+
+import { ModalDialog } from "@docspace/shared/components/modal-dialog";
+import { mobile } from "@docspace/shared/utils";
+
+const StyledModalDialog = styled(ModalDialog)`
+ .heading {
+ font-size: 21px;
+ }
+
+ .generate {
+ font-weight: 600;
+ }
+
+ .text-area {
+ width: 488px !important;
+ height: 72px !important;
+ margin-top: 4px;
+
+ &-label {
+ font-weight: 600;
+ margin-bottom: 5px;
+ }
+
+ @media ${mobile} {
+ width: 100% !important;
+ }
+ }
+ .text-area-label {
+ margin-top: 16px;
+ }
+
+ .modal-combo {
+ margin: 16px 0 0 0;
+ }
+`;
+
+export default StyledModalDialog;
diff --git a/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/SubmitButton.js b/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/SubmitButton.js
index 683fbfbbe0..43a66b21c6 100644
--- a/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/SubmitButton.js
+++ b/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/SubmitButton.js
@@ -30,7 +30,7 @@ import { useTranslation } from "react-i18next";
import { SaveCancelButtons } from "@docspace/shared/components/save-cancel-buttons";
-import ResetConfirmationModal from "./sub-components/ResetConfirmationModal";
+import ResetConfirmationModal from "SRC_DIR/components/dialogs/ResetConfirmationDialog/ResetConfirmationModal";
const SubmitResetButtons = (props) => {
const { t } = useTranslation(["SingleSignOn", "Settings", "Common"]);
@@ -46,6 +46,8 @@ const SubmitResetButtons = (props) => {
isLoadingXml,
enableSso,
isSSOAvailable,
+ closeResetModal,
+ confirmReset,
} = props;
return (
@@ -69,7 +71,13 @@ const SubmitResetButtons = (props) => {
additionalClassSaveButton="save-button"
additionalClassCancelButton="restore-button"
/>
- {confirmationResetModal && }
+ {confirmationResetModal && (
+
+ )}
>
);
};
@@ -86,6 +94,8 @@ export default inject(({ ssoStore, currentQuotaStore }) => {
hasChanges,
isLoadingXml,
enableSso,
+ closeResetModal,
+ confirmReset,
} = ssoStore;
const { isSSOAvailable } = currentQuotaStore;
@@ -101,5 +111,7 @@ export default inject(({ ssoStore, currentQuotaStore }) => {
isLoadingXml,
enableSso,
isSSOAvailable,
+ closeResetModal,
+ confirmReset,
};
})(observer(SubmitResetButtons));
diff --git a/public/locales/ar-SA/Common.json b/public/locales/ar-SA/Common.json
index aa9d668da1..1b3e9c49a3 100644
--- a/public/locales/ar-SA/Common.json
+++ b/public/locales/ar-SA/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "من نحن",
"AboutCompanyTitle": "نبذة تعريفية عن البرنامج",
"AccessDenied": "المحاولة مرفوضة",
@@ -55,6 +55,7 @@
"CommonFiles": "الملفات المشتركة",
"CompanyName": "اسم الشركة",
"Confirmation": "تأكيد",
+ "ConfirmationText": "سيتم فقدان جميع البيانات التي أدخلتها. هل أنت متأكد أنك ترغب في المتابعة؟",
"ConflictResolveSelectAction": "الرجاء تحديد الإجراء:",
"Connect": "ربط",
"Content": "المحتوى",
@@ -509,4 +510,4 @@
"Yes": "نعم",
"Yesterday": "أمس",
"You": "أنت"
-}
+}
\ No newline at end of file
diff --git a/public/locales/az/Common.json b/public/locales/az/Common.json
index be8de6f1cb..6baca3a7d9 100644
--- a/public/locales/az/Common.json
+++ b/public/locales/az/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Haqqında",
"AboutCompanyTitle": "Proqram haqqında",
"AccessDenied": "Giriş qadağandır",
@@ -55,6 +55,7 @@
"CommonFiles": "Ümumi fayllar",
"CompanyName": "Şirkət adı",
"Confirmation": "Təsdiqləmə",
+ "ConfirmationText": "Daxil etdiyiniz bütün məlumatlar itiriləcək. Davam etmək istədiyinizə əminsiniz?",
"ConflictResolveSelectAction": "Xahiş edirik əməliyyatı seçin:",
"Connect": "Qoşulmaq",
"Content": "Kontent",
@@ -509,4 +510,4 @@
"Yes": "Bəli",
"Yesterday": "Dünən",
"You": "Siz"
-}
+}
\ No newline at end of file
diff --git a/public/locales/bg/Common.json b/public/locales/bg/Common.json
index 961a3772ed..d437cf79b7 100644
--- a/public/locales/bg/Common.json
+++ b/public/locales/bg/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Относно",
"AboutCompanyTitle": "За тази програма",
"AccessDenied": "Достъпът отказан",
@@ -55,6 +55,7 @@
"CommonFiles": "Общи файлове",
"CompanyName": "Име на фирмата",
"Confirmation": "Потвърждение",
+ "ConfirmationText": "Всички въведени от вас данни ще бъдат загубени. Сигурни ли сте, че искате да продължите?",
"ConflictResolveSelectAction": "Моля, изберете действие:",
"Connect": "Свържи",
"Content": "Съдържание",
@@ -509,4 +510,4 @@
"Yes": "Да",
"Yesterday": "Вчера",
"You": "Вие"
-}
+}
\ No newline at end of file
diff --git a/public/locales/cs/Common.json b/public/locales/cs/Common.json
index 41c4874d38..a8c0bf7c4b 100644
--- a/public/locales/cs/Common.json
+++ b/public/locales/cs/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "O nás",
"AboutCompanyTitle": "O tomto programu",
"AccessDenied": "Přístup odepřen",
@@ -55,6 +55,7 @@
"CommonFiles": "Společné soubory",
"CompanyName": "Název společnosti",
"Confirmation": "Potvrzení",
+ "ConfirmationText": "Všechna zadaná data budou ztracena. Určitě chcete pokračovat?",
"ConflictResolveSelectAction": "Prosím, vyberte akci:",
"Connect": "Připojit",
"Content": "Obsah",
@@ -509,4 +510,4 @@
"Yes": "Ano",
"Yesterday": "Včera",
"You": "Vy"
-}
+}
\ No newline at end of file
diff --git a/public/locales/de/Common.json b/public/locales/de/Common.json
index 0c663b1fee..cbfe9f04d2 100644
--- a/public/locales/de/Common.json
+++ b/public/locales/de/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Informationen",
"AboutCompanyTitle": "Über diese Software",
"AccessDenied": "Zugriff verweigert",
@@ -55,6 +55,7 @@
"CommonFiles": "Gemeinsame Dateien",
"CompanyName": "Name des Unternehmens",
"Confirmation": "Bestätigung",
+ "ConfirmationText": "Alle von Ihnen eingegebenen Daten gehen verloren. Sind Sie sicher, dass Sie fortfahren möchten?",
"ConflictResolveSelectAction": "Bitte wählen Sie die Aktion aus:",
"Connect": "Verbinden",
"Content": "Inhalt",
@@ -509,4 +510,4 @@
"Yes": "Ja",
"Yesterday": "Gestern",
"You": "Sie"
-}
+}
\ No newline at end of file
diff --git a/public/locales/el-GR/Common.json b/public/locales/el-GR/Common.json
index 683ff35db8..2bac1fddcf 100644
--- a/public/locales/el-GR/Common.json
+++ b/public/locales/el-GR/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Σχετικά",
"AboutCompanyTitle": "Σχετικά με αυτό το πρόγραμμα",
"AccessDenied": "Απαγόρευση πρόσβασης",
@@ -55,6 +55,7 @@
"CommonFiles": "Κοινά αρχε",
"CompanyName": "Όνομα εταιρείας",
"Confirmation": "Επιβεβαίωση",
+ "ConfirmationText": "Όλα τα δεδομένα που έχετε εισάγει θα χαθούν. Θέλετε σίγουρα να συνεχίσετε;",
"ConflictResolveSelectAction": "Επιλέξτε την ενέργεια",
"Connect": "Σύνδεση",
"Content": "Περιεχόμενο",
@@ -509,4 +510,4 @@
"Yes": "Ναι",
"Yesterday": "Χθες",
"You": "Εσείς"
-}
+}
\ No newline at end of file
diff --git a/public/locales/en/Common.json b/public/locales/en/Common.json
index 61acc3af18..d38ffc9648 100644
--- a/public/locales/en/Common.json
+++ b/public/locales/en/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "About",
"AboutCompanyTitle": "About this program",
"AccessDenied": "Access denied",
@@ -55,6 +55,7 @@
"CommonFiles": "Common files",
"CompanyName": "Company name",
"Confirmation": "Confirmation",
+ "ConfirmationText": "All the data you entered will be lost. Are you sure you want to continue?",
"ConflictResolveSelectAction": "Please select the action:",
"Connect": "Connect",
"Content": "Content",
@@ -509,4 +510,4 @@
"Yes": "Yes",
"Yesterday": "Yesterday",
"You": "You"
-}
+}
\ No newline at end of file
diff --git a/public/locales/es/Common.json b/public/locales/es/Common.json
index e852d72f73..b0a4df3cfb 100644
--- a/public/locales/es/Common.json
+++ b/public/locales/es/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Acerca de",
"AboutCompanyTitle": "Acerca del programa",
"AccessDenied": "Acceso denegado ",
@@ -55,6 +55,7 @@
"CommonFiles": "Archivos comunes",
"CompanyName": "Nombre de empresa",
"Confirmation": "Confirmación",
+ "ConfirmationText": "Se perderán todos los datos introducidos. ¿Está seguro de que desea continuar?",
"ConflictResolveSelectAction": "Por favor, seleccione la acción:",
"Connect": "Conectar",
"Content": "Contenido",
@@ -509,4 +510,4 @@
"Yes": "Sí",
"Yesterday": "Ayer",
"You": "Usted"
-}
+}
\ No newline at end of file
diff --git a/public/locales/fi/Common.json b/public/locales/fi/Common.json
index e41b00dd63..175a2bf32a 100644
--- a/public/locales/fi/Common.json
+++ b/public/locales/fi/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Tietoja",
"AboutCompanyTitle": "Tietoja tästä ohjelmasta",
"AccessDenied": "Pääsy evätty",
@@ -55,6 +55,7 @@
"CommonFiles": "Yleiset kansiot",
"CompanyName": "Yrityksen nimi",
"Confirmation": "Vahvistus",
+ "ConfirmationText": "Kaikki syöttämäsi tieto menetetään. Haluatko varmasti jatkaa?",
"ConflictResolveSelectAction": "Valitse toiminto:",
"Connect": "Yhdistä",
"Content": "Sisältö",
@@ -509,4 +510,4 @@
"Yes": "Kyllä",
"Yesterday": "Eilen",
"You": "Sinä"
-}
+}
\ No newline at end of file
diff --git a/public/locales/fr/Common.json b/public/locales/fr/Common.json
index b25fc44048..c71ebede5b 100644
--- a/public/locales/fr/Common.json
+++ b/public/locales/fr/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "À propos de",
"AboutCompanyTitle": "À propos de ce programme",
"AccessDenied": " Accès refusé",
@@ -55,6 +55,7 @@
"CommonFiles": "Fichiers communs",
"CompanyName": "Nom de l'entreprise",
"Confirmation": "Confirmation",
+ "ConfirmationText": "Toutes les données que vous avez saisies seront perdues. Êtes-vous sûr de vouloir continuer ?",
"ConflictResolveSelectAction": "Veuillez sélectionner une action :",
"Connect": "Connexion",
"Content": "Contenu",
@@ -509,4 +510,4 @@
"Yes": "Oui",
"Yesterday": "Hier",
"You": "Vous"
-}
+}
\ No newline at end of file
diff --git a/public/locales/hy-AM/Common.json b/public/locales/hy-AM/Common.json
index b6e8a5130a..4f1a029d32 100644
--- a/public/locales/hy-AM/Common.json
+++ b/public/locales/hy-AM/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Մասին",
"AboutCompanyTitle": "Ծրագրի մասին",
"AccessDenied": "Մուտքն արգելված է",
@@ -55,6 +55,7 @@
"CommonFiles": "Ընդհանուր ֆայլեր",
"CompanyName": "Ընկերության անվանում",
"Confirmation": "Հաստատում",
+ "ConfirmationText": "Ձեր մուտքագրած բոլոր տվյալները կկորչեն: Վստա՞հ եք, որ ցանկանում եք շարունակել:",
"ConflictResolveSelectAction": "Խնդրում ենք ընտրել գործողությունը:",
"Connect": "Կապակցվել",
"Content": "Բովանդակություն",
@@ -509,4 +510,4 @@
"Yes": "Այո",
"Yesterday": "Երեկ",
"You": "Դու"
-}
+}
\ No newline at end of file
diff --git a/public/locales/it/Common.json b/public/locales/it/Common.json
index 8e3d9eda21..3f7e0116ce 100644
--- a/public/locales/it/Common.json
+++ b/public/locales/it/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Informazioni su",
"AboutCompanyTitle": "Informazioni sul programma",
"AccessDenied": " Accesso negato",
@@ -55,6 +55,7 @@
"CommonFiles": "File comuni",
"CompanyName": "Nome azienda",
"Confirmation": "Conferma",
+ "ConfirmationText": "Tutti i dati inseriti andranno persi. Sei sicuro di voler continuare?",
"ConflictResolveSelectAction": "Ti preghiamo di selezionare l'azione:",
"Connect": "Collega",
"Content": "Contenuto",
@@ -509,4 +510,4 @@
"Yes": "Sì",
"Yesterday": "Ieri",
"You": "Tu"
-}
+}
\ No newline at end of file
diff --git a/public/locales/ja-JP/Common.json b/public/locales/ja-JP/Common.json
index 2cfd2d7873..fda90cc230 100644
--- a/public/locales/ja-JP/Common.json
+++ b/public/locales/ja-JP/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "について",
"AboutCompanyTitle": "本プログラムについて",
"AccessDenied": "アクセス拒否",
@@ -55,6 +55,7 @@
"CommonFiles": "共通のファイル",
"CompanyName": "企業名",
"Confirmation": "確認事項",
+ "ConfirmationText": "入力したデータはすべて失われます。このまま続けますか?",
"ConflictResolveSelectAction": "アクションをお選びください:",
"Connect": "接続",
"Content": "コンテンツ",
@@ -509,4 +510,4 @@
"Yes": "はい",
"Yesterday": "昨日",
"You": "あなた"
-}
+}
\ No newline at end of file
diff --git a/public/locales/ko-KR/Common.json b/public/locales/ko-KR/Common.json
index 12837a9a74..aeca1319d6 100644
--- a/public/locales/ko-KR/Common.json
+++ b/public/locales/ko-KR/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "소개",
"AboutCompanyTitle": "프로그램 소개",
"AccessDenied": "액세스가 거부되었습니다",
@@ -55,6 +55,7 @@
"CommonFiles": "공통 파일",
"CompanyName": "회사 이름",
"Confirmation": "확인",
+ "ConfirmationText": "입력한 모든 데이터가 손실됩니다. 정말로 계속하시겠습니까?",
"ConflictResolveSelectAction": "작업 선택:",
"Connect": "연결",
"Content": "콘텐츠",
@@ -509,4 +510,4 @@
"Yes": "네",
"Yesterday": "어제",
"You": "나"
-}
+}
\ No newline at end of file
diff --git a/public/locales/lo-LA/Common.json b/public/locales/lo-LA/Common.json
index fb81799148..ff03bbc147 100644
--- a/public/locales/lo-LA/Common.json
+++ b/public/locales/lo-LA/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "ກ່ຽວກັບ",
"AboutCompanyTitle": "ກ່ຽວກັບໂປແກລມນີ້",
"AccessDenied": "ປະຕິເສດການເຂົ້າເຖິງ",
@@ -51,6 +51,7 @@
"CommonFiles": "ໄຟລ໌ທົ່ວໄປ",
"CompanyName": "ຊື່ບໍລິສັດ",
"Confirmation": "ການຢັ້ງຢືນຕົວຕົນ",
+ "ConfirmationText": "ຂໍ້ມູນທັງໝົດທີ່ທ່ານປ້ອນເຂົ້າຈະສູນເສຍໄປ. ທ່ານແນ່ໃຈບໍ່ວ່າຕ້ອງການສືບຕໍ່?",
"ConflictResolveSelectAction": "ກະລຸນາເລືອກການດຳເນີນການ",
"Connect": "ຕິດຕໍ່",
"Content": "ເນື້ອຫາ",
@@ -374,4 +375,4 @@
"Warning": "ແຈ້ງເຕືອນ",
"Website": "ເວັບໄຊທ໌",
"Yesterday": "ມື້ວານນີ້"
-}
+}
\ No newline at end of file
diff --git a/public/locales/lv/Common.json b/public/locales/lv/Common.json
index 97673c93e5..51a6af60f3 100644
--- a/public/locales/lv/Common.json
+++ b/public/locales/lv/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Par",
"AboutCompanyTitle": "Par šo programmu",
"AccessDenied": "Pieeja ir liegta",
@@ -55,6 +55,7 @@
"CommonFiles": "Kopīgi faili",
"CompanyName": "Uzņēmuma nosaukums",
"Confirmation": "Apstiprinājums",
+ "ConfirmationText": "Visi ievadītie dati tiks zaudēti. Vai tiešām vēlaties turpināt?",
"ConflictResolveSelectAction": "Lūdzu, atlasiet darbību:",
"Connect": "Savienot",
"Content": "Saturs",
@@ -509,4 +510,4 @@
"Yes": "Jā",
"Yesterday": "어제",
"You": "Jūs"
-}
+}
\ No newline at end of file
diff --git a/public/locales/nl/Common.json b/public/locales/nl/Common.json
index 2991c496e4..e280355d30 100644
--- a/public/locales/nl/Common.json
+++ b/public/locales/nl/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Over",
"AboutCompanyTitle": "Over dit programma",
"AccessDenied": "Toegang geweigerd",
@@ -55,6 +55,7 @@
"CommonFiles": "Algemene bestanden",
"CompanyName": "Bedrijfsnaam",
"Confirmation": "Bevestiging",
+ "ConfirmationText": "Alle ingevoerde gegevens gaan verloren. Weet u zeker dat u door wilt gaan?",
"ConflictResolveSelectAction": "Kies de actie:",
"Connect": "Verbinden",
"Content": "Inhoud",
@@ -509,4 +510,4 @@
"Yes": "Ja",
"Yesterday": "Gisteren",
"You": "U"
-}
+}
\ No newline at end of file
diff --git a/public/locales/pl/Common.json b/public/locales/pl/Common.json
index 1863e57a33..7907beb3ba 100644
--- a/public/locales/pl/Common.json
+++ b/public/locales/pl/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "O",
"AboutCompanyTitle": "O tym programie",
"AccessDenied": "Odmowa dostępu",
@@ -55,6 +55,7 @@
"CommonFiles": "Wspólne pliki",
"CompanyName": "Nama Perusahaan",
"Confirmation": "Potwierdzenie",
+ "ConfirmationText": "Wszystkie wprowadzone dane zostaną utracone. Czy na pewno chcesz kontynuować?",
"ConflictResolveSelectAction": "Wybierz działanie:",
"Connect": "Podłącz",
"Content": "Treść",
@@ -509,4 +510,4 @@
"Yes": "Tak",
"Yesterday": "Wczoraj",
"You": "Ty"
-}
+}
\ No newline at end of file
diff --git a/public/locales/pt-BR/Common.json b/public/locales/pt-BR/Common.json
index 0263297711..b27ed9c3f2 100644
--- a/public/locales/pt-BR/Common.json
+++ b/public/locales/pt-BR/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Sobre",
"AboutCompanyTitle": "Sobre este programa",
"AccessDenied": "Acesso negado",
@@ -55,6 +55,7 @@
"CommonFiles": "Arquivos comuns",
"CompanyName": "Nome da empresa",
"Confirmation": "Confirmação",
+ "ConfirmationText": "Todos os dados inseridos serão perdidos. Você tem certeza que quer continuar?",
"ConflictResolveSelectAction": "Selecione a ação:",
"Connect": "Conectar",
"Content": "Conteúdo",
@@ -509,4 +510,4 @@
"Yes": "Sim",
"Yesterday": "Ontem",
"You": "Você"
-}
+}
\ No newline at end of file
diff --git a/public/locales/pt/Common.json b/public/locales/pt/Common.json
index 1404599e99..572fd9634b 100644
--- a/public/locales/pt/Common.json
+++ b/public/locales/pt/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Sobre",
"AboutCompanyTitle": "Sobre este programa",
"AccessDenied": "Acesso negado",
@@ -55,6 +55,7 @@
"CommonFiles": "Arquivos comuns",
"CompanyName": "Nome da empresa",
"Confirmation": "Confirmação",
+ "ConfirmationText": "Todos os dados que introduziu serão perdidos. Tem a certeza que quer proceder?",
"ConflictResolveSelectAction": "Selecione a ação:",
"Connect": "Ligar",
"Content": "Conteúdo",
@@ -509,4 +510,4 @@
"Yes": "Sim",
"Yesterday": "Ontem",
"You": "Você"
-}
+}
\ No newline at end of file
diff --git a/public/locales/ro/Common.json b/public/locales/ro/Common.json
index e11685fcd3..2085087a1d 100644
--- a/public/locales/ro/Common.json
+++ b/public/locales/ro/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Informații",
"AboutCompanyTitle": "Despre aplicația",
"AccessDenied": "Acces refuzat ",
@@ -55,6 +55,7 @@
"CommonFiles": "Fișiere comune",
"CompanyName": "Numele companiei",
"Confirmation": "Confirmare",
+ "ConfirmationText": "Toate datele introduse se vor pierde. Sigur doriţi să continuați?",
"ConflictResolveSelectAction": "Selectați acțiune:",
"Connect": "Adaugă cont",
"Content": "Conținut",
@@ -509,4 +510,4 @@
"Yes": "Da",
"Yesterday": "Ieri",
"You": "Dvs"
-}
+}
\ No newline at end of file
diff --git a/public/locales/ru/Common.json b/public/locales/ru/Common.json
index 1103421604..383bc97209 100644
--- a/public/locales/ru/Common.json
+++ b/public/locales/ru/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "О программе",
"AboutCompanyTitle": "О программе",
"AccessDenied": "Доступ запрещен",
@@ -55,6 +55,7 @@
"CommonFiles": "Общие файлы",
"CompanyName": "Название компании",
"Confirmation": "Подтверждение",
+ "ConfirmationText": "Все введенные данные будут потеряны. Вы уверены, что хотите продолжить?",
"ConflictResolveSelectAction": "Пожалуйста, выберите действие:",
"Connect": "Подключить",
"Content": "Контент",
@@ -509,4 +510,4 @@
"Yes": "Да",
"Yesterday": "Вчера",
"You": "Вы"
-}
+}
\ No newline at end of file
diff --git a/public/locales/si/Common.json b/public/locales/si/Common.json
index edb6f1ee04..7dbe838614 100644
--- a/public/locales/si/Common.json
+++ b/public/locales/si/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "පිළිබඳව",
"AboutCompanyTitle": "මෙම මෘදුකාංගය ගැන",
"AccessDenied": "ප්රවේශය ප්රතික්ෂේපිතයි",
@@ -51,6 +51,7 @@
"CommonFiles": "සාමාන්ය ගොනු",
"CompanyName": "සමාගමේ නම",
"Confirmation": "තහවුරු කිරීම",
+ "ConfirmationText": "ඔබ ඇතුල් කළ සියළුම දත්ත නැති වී යනු ඇත. ඔබට ඉදිරියට යාමට වුවමනා ද?",
"ConflictResolveSelectAction": "ක්රියාමාර්ගය තෝරන්න:",
"Connect": "සබඳින්න",
"Content": "අන්තර්ගතය",
@@ -457,4 +458,4 @@
"Yes": "ඔව්",
"Yesterday": "ඊයේ",
"You": "ඔබ"
-}
+}
\ No newline at end of file
diff --git a/public/locales/sk/Common.json b/public/locales/sk/Common.json
index aa3cb0f96b..15aebb9ab3 100644
--- a/public/locales/sk/Common.json
+++ b/public/locales/sk/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "O aplikácii",
"AboutCompanyTitle": "O programe",
"AccessDenied": "Prístup bol zamietnutý",
@@ -55,6 +55,7 @@
"CommonFiles": "Spoločné súbory",
"CompanyName": "Meno spoločnosti",
"Confirmation": "Potvrdenie",
+ "ConfirmationText": "Všetky zadané údaje sa stratia. Ste si istý, že chcete pokračovať?",
"ConflictResolveSelectAction": "Vyberte akciu:",
"Connect": "Pripojiť",
"Content": "Obsah",
@@ -509,4 +510,4 @@
"Yes": "Áno",
"Yesterday": "Včera",
"You": "Vy"
-}
+}
\ No newline at end of file
diff --git a/public/locales/sl/Common.json b/public/locales/sl/Common.json
index b135af0330..f8e30ae8e6 100644
--- a/public/locales/sl/Common.json
+++ b/public/locales/sl/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "O nas",
"AboutCompanyTitle": "O tem programu",
"AccessDenied": "Dostop je zavrnjen",
@@ -55,6 +55,7 @@
"CommonFiles": "Skupne datoteke",
"CompanyName": "Ime podjetja",
"Confirmation": "Potrditev",
+ "ConfirmationText": "Vsi vneseni podatki bodo izgubljeni. Ali ste prepričani, da želite nadaljevati?",
"ConflictResolveSelectAction": "Prosim, izberite akcijo:",
"Connect": "Poveži",
"Content": "Vsebina",
@@ -509,4 +510,4 @@
"Yes": "Da",
"Yesterday": "Včeraj",
"You": "Vi"
-}
+}
\ No newline at end of file
diff --git a/public/locales/sr-Cyrl-RS/Common.json b/public/locales/sr-Cyrl-RS/Common.json
index 6c73a169a2..fdfa6a0e70 100644
--- a/public/locales/sr-Cyrl-RS/Common.json
+++ b/public/locales/sr-Cyrl-RS/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "У вези са",
"AboutCompanyTitle": "У вези овог програма",
"AccessDenied": "Приступ одбијен",
@@ -55,6 +55,7 @@
"CommonFiles": "Заједничке датотеке",
"CompanyName": "Име компаније",
"Confirmation": "Конфирмација",
+ "ConfirmationText": "Сви подаци које сте унели ће бити изгубљени. Да ли сте сигурни да желите да наставите?",
"ConflictResolveSelectAction": "Изаберите радњу:",
"Connect": "Повежи",
"Content": "Садржај",
@@ -509,4 +510,4 @@
"Yes": "Да",
"Yesterday": "Јуче",
"You": "Ви"
-}
+}
\ No newline at end of file
diff --git a/public/locales/sr-Latn-RS/Common.json b/public/locales/sr-Latn-RS/Common.json
index f71b0f1b8c..55d459d457 100644
--- a/public/locales/sr-Latn-RS/Common.json
+++ b/public/locales/sr-Latn-RS/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "U vezi sa",
"AboutCompanyTitle": "U vezi ovog programa",
"AccessDenied": "Pristup odbijen",
@@ -55,6 +55,7 @@
"CommonFiles": "Zajedničke datoteke",
"CompanyName": "Ime kompanije",
"Confirmation": "Konfirmacija",
+ "ConfirmationText": "Svi podaci koje ste uneli će biti izgubljeni. Da li ste sigurni da želite da nastavite?",
"ConflictResolveSelectAction": "Molim vas odaberite akciju:",
"Connect": "Poveži",
"Content": "Sadržaj",
@@ -509,4 +510,4 @@
"Yes": "Da",
"Yesterday": "Juče",
"You": "Vi"
-}
+}
\ No newline at end of file
diff --git a/public/locales/tr/Common.json b/public/locales/tr/Common.json
index abb6fb192f..cf6142204d 100644
--- a/public/locales/tr/Common.json
+++ b/public/locales/tr/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Hakkında",
"AboutCompanyTitle": "Bu program hakkında",
"AccessDenied": "Erişim engellendi",
@@ -55,6 +55,7 @@
"CommonFiles": "Ortak dosyalar",
"CompanyName": "Şirket ismi",
"Confirmation": "Onay",
+ "ConfirmationText": "Girdiğiniz tüm veriler kaybolacak. Devam etmek istediğinize emin misiniz?",
"ConflictResolveSelectAction": "Lütfen işlemi seçin:",
"Connect": "Bağlan",
"Content": "İçerik",
@@ -509,4 +510,4 @@
"Yes": "Evet",
"Yesterday": "Dün",
"You": "Siz"
-}
+}
\ No newline at end of file
diff --git a/public/locales/uk-UA/Common.json b/public/locales/uk-UA/Common.json
index 3ed9bd6a5f..1f0cb6242a 100644
--- a/public/locales/uk-UA/Common.json
+++ b/public/locales/uk-UA/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Інформація",
"AboutCompanyTitle": "Про цю програму",
"AccessDenied": "Доступ заборонено",
@@ -55,6 +55,7 @@
"CommonFiles": "Загальні файли",
"CompanyName": "Назва компанії",
"Confirmation": "Підтвердження",
+ "ConfirmationText": "Усі введені вами дані буде втрачено. Ви впевнені, що бажаєте продовжити?",
"ConflictResolveSelectAction": "Оберіть дію:",
"Connect": "Підключити",
"Content": "Зміст",
@@ -509,4 +510,4 @@
"Yes": "Так",
"Yesterday": "Вчора",
"You": "Ви"
-}
+}
\ No newline at end of file
diff --git a/public/locales/vi/Common.json b/public/locales/vi/Common.json
index 439797a076..7205fa11d0 100644
--- a/public/locales/vi/Common.json
+++ b/public/locales/vi/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "Giới thiệu",
"AboutCompanyTitle": "Giới thiệu về chương trình này",
"AccessDenied": "Truy cập bị từ chối",
@@ -55,6 +55,7 @@
"CommonFiles": "Các tập tin chung",
"CompanyName": "Tên công ty",
"Confirmation": "Xác nhận",
+ "ConfirmationText": "Tất cả dữ liệu bạn đã nhập sẽ bị mất. Bạn có chắc chắn muốn tiếp tục không?",
"ConflictResolveSelectAction": "Vui lòng chọn hành động:",
"Connect": "Kết nối",
"Content": "Nội dung",
@@ -509,4 +510,4 @@
"Yes": "Có",
"Yesterday": "Hôm qua",
"You": "Bạn"
-}
+}
\ No newline at end of file
diff --git a/public/locales/zh-CN/Common.json b/public/locales/zh-CN/Common.json
index 40b292119f..69fe41dac4 100644
--- a/public/locales/zh-CN/Common.json
+++ b/public/locales/zh-CN/Common.json
@@ -1,4 +1,4 @@
-{
+{
"About": "关于",
"AboutCompanyTitle": "关于本计划",
"AccessDenied": "拒绝访问",
@@ -55,6 +55,7 @@
"CommonFiles": "公共文件",
"CompanyName": "企业名称",
"Confirmation": "确认",
+ "ConfirmationText": "您所输入的所有数据都将丢失。确定要继续吗?",
"ConflictResolveSelectAction": "请选择操作:",
"Connect": "连接",
"Content": "内容",
@@ -509,4 +510,4 @@
"Yes": "是",
"Yesterday": "昨天",
"You": "您"
-}
+}
\ No newline at end of file
From 7332d45c0386ba4a7ed17276dc1a4aae8e7d569e Mon Sep 17 00:00:00 2001
From: Timofey Boyko
Date: Mon, 12 Aug 2024 15:40:03 +0300
Subject: [PATCH 32/45] Shared:Utils:Common: pass culture to handler logo url
---
packages/login/src/app/(root)/layout.tsx | 7 ++++++-
packages/login/src/components/GreetingContainer.tsx | 12 ++++++++++--
packages/login/src/components/SimpleNav.tsx | 13 ++++++++++---
packages/login/src/types/index.ts | 1 +
packages/shared/utils/common.ts | 3 ++-
5 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/packages/login/src/app/(root)/layout.tsx b/packages/login/src/app/(root)/layout.tsx
index f3de5d58d0..53d1c7ae01 100644
--- a/packages/login/src/app/(root)/layout.tsx
+++ b/packages/login/src/app/(root)/layout.tsx
@@ -35,6 +35,7 @@ import SimpleNav from "@/components/SimpleNav";
import { LoginContent, LoginFormWrapper } from "@/components/Login";
import GreetingContainer from "@/components/GreetingContainer";
import { getColorTheme, getSettings } from "@/utils/actions";
+import { cookies } from "next/headers";
const LanguageComboboxWrapper = dynamic(
() => import("@/components/LanguageCombobox"),
@@ -59,9 +60,12 @@ export default async function Layout({
const isRegisterContainerVisible = objectSettings?.enabledJoin;
+ const culture =
+ cookies().get("asc_language")?.value ?? objectSettings?.culture;
+
return (
-
+
@@ -73,6 +77,7 @@ export default async function Layout({
>
{children}
diff --git a/packages/login/src/components/GreetingContainer.tsx b/packages/login/src/components/GreetingContainer.tsx
index 1d4e96cf8a..528a97e10e 100644
--- a/packages/login/src/components/GreetingContainer.tsx
+++ b/packages/login/src/components/GreetingContainer.tsx
@@ -40,11 +40,19 @@ import { GreetingContainersProps } from "@/types";
import { DEFAULT_PORTAL_TEXT, DEFAULT_ROOM_TEXT } from "@/utils/constants";
import { getInvitationLinkData } from "@/utils";
-const GreetingContainer = ({ greetingSettings }: GreetingContainersProps) => {
+const GreetingContainer = ({
+ greetingSettings,
+ culture,
+}: GreetingContainersProps) => {
const { t } = useTranslation(["Login"]);
const theme = useTheme();
- const logoUrl = getLogoUrl(WhiteLabelLogoType.LoginPage, !theme.isBase);
+ const logoUrl = getLogoUrl(
+ WhiteLabelLogoType.LoginPage,
+ !theme.isBase,
+ false,
+ culture,
+ );
const searchParams = useSearchParams();
diff --git a/packages/login/src/components/SimpleNav.tsx b/packages/login/src/components/SimpleNav.tsx
index 6aa8b78a5a..4d50449a8a 100644
--- a/packages/login/src/components/SimpleNav.tsx
+++ b/packages/login/src/components/SimpleNav.tsx
@@ -61,14 +61,21 @@ const StyledSimpleNav = styled.div`
StyledSimpleNav.defaultProps = { theme: Base };
-interface SimpleNavProps {}
+interface SimpleNavProps {
+ culture?: string;
+}
-const SimpleNav = ({}: SimpleNavProps) => {
+const SimpleNav = ({ culture }: SimpleNavProps) => {
const theme = useTheme();
const isDark = !theme.isBase;
- const logoUrl = getLogoUrl(WhiteLabelLogoType.LightSmall, isDark);
+ const logoUrl = getLogoUrl(
+ WhiteLabelLogoType.LightSmall,
+ isDark,
+ false,
+ culture,
+ );
return (