Merge branch 'hotfix/v2.5.1' into develop

This commit is contained in:
Alexey Safronov 2024-05-13 18:23:45 +04:00
commit 5aee9c9982
9 changed files with 112 additions and 19 deletions

View File

@ -93,6 +93,7 @@ const TagDropdown = ({
heightTablet={32}
key={i}
label={tag}
onMouseDown={preventDefault}
onClick={() => addFetchedTag(tag)}
/>
));

View File

@ -71,6 +71,7 @@ const Members = ({
setExternalLink,
withPublicRoomBlock,
fetchMembers,
fetchMoreMembers,
membersIsLoading,
searchValue,
searchResultIsLoading,
@ -96,19 +97,7 @@ const Members = ({
}, [infoPanelSelection, searchValue]);
const loadNextPage = async () => {
const roomId = infoPanelSelection.id;
const fetchedMembers = await fetchMembers(t, false, withoutTitlesAndLinks);
const { users, administrators, expected, groups } = fetchedMembers;
const newMembers = {
roomId: roomId,
administrators: [...infoPanelMembers.administrators, ...administrators],
users: [...infoPanelMembers.users, ...users],
expected: [...infoPanelMembers.expected, ...expected],
groups: [...infoPanelMembers.groups, ...groups],
};
setInfoPanelMembers(newMembers);
await fetchMoreMembers(t, withoutTitlesAndLinks);
};
if (membersIsLoading) return <InfoPanelViewLoader view="members" />;
@ -301,6 +290,7 @@ export default inject(
infoPanelMembers,
setInfoPanelMembers,
fetchMembers,
fetchMoreMembers,
membersIsLoading,
withPublicRoomBlock,
searchValue,
@ -344,6 +334,7 @@ export default inject(
setExternalLink,
withPublicRoomBlock,
fetchMembers,
fetchMoreMembers,
membersIsLoading,
searchValue,
searchResultIsLoading,

View File

@ -89,7 +89,7 @@ const MembersList = (props) => {
});
const listOfTitles = list
.filter((x) => x.props.isTitle)
.filter((x) => x.props.user?.isTitle)
.map((item) => {
return {
displayName: item.props.user.displayName,

View File

@ -47,7 +47,7 @@ const StyledRowContent = styled(RowContent)`
.badges {
flex-direction: row-reverse;
margin-top: 10px;
margin-inline-end: 12px;
.paid-badge {

View File

@ -46,7 +46,7 @@ const StyledRowContent = styled(RowContent)`
.badges {
flex-direction: row-reverse;
margin-top: 9px;
margin-inline-end: 12px;
.paid-badge {

View File

@ -133,8 +133,10 @@ class InfoPanelStore {
};
setSearchValue = (value) => {
if (value !== this.searchValue) {
this.setSearchResultIsLoading(true);
this.searchValue = value;
}
};
resetSearch = () => {
@ -651,6 +653,38 @@ class InfoPanelStore {
};
};
fetchMoreMembers = async (t, withoutTitles) => {
const roomId = this.infoPanelSelection.id;
const oldMembers = this.infoPanelMembers;
const data = await this.filesStore.getRoomMembers(roomId, false);
const newMembers = this.convertMembers(t, data, false, true);
const mergedMembers = {
roomId: roomId,
administrators: [
...oldMembers.administrators,
...newMembers.administrators,
],
users: [...oldMembers.users, ...newMembers.users],
expected: [...oldMembers.expected, ...newMembers.expectedMembers],
groups: [...oldMembers.groups, ...newMembers.groups],
};
if (!withoutTitles) {
this.addMembersTitle(
t,
mergedMembers.administrators,
mergedMembers.users,
mergedMembers.expected,
mergedMembers.groups,
);
}
this.setInfoPanelMembers(mergedMembers);
};
addInfoPanelMembers = (t, members) => {
const convertedMembers = this.convertMembers(t, members);

View File

@ -63,6 +63,8 @@ const Root = ({
fileId,
hash,
}: TResponse) => {
const editorRef = React.useRef<null | HTMLElement>(null);
const documentserverUrl = config?.editorUrl ?? error?.editorUrl;
const fileInfo = config?.file;
@ -141,9 +143,19 @@ const Root = ({
isSharingDialogVisible ||
isVisibleSelectFolderDialog ||
selectFileDialogVisible
)
) {
calculateAsideHeight();
const activeElement = document.activeElement as HTMLElement | null;
if (activeElement && activeElement.tagName === "IFRAME") {
editorRef.current = activeElement;
activeElement.blur();
}
} else if (editorRef.current) {
editorRef.current.focus();
}
if (isSharingDialogVisible) {
setTimeout(calculateAsideHeight, 10);
}

View File

@ -52,6 +52,7 @@ import RoReactSvgUrl from "PUBLIC_DIR/images/flags/ro.react.svg?url";
import RuReactSvgUrl from "PUBLIC_DIR/images/flags/ru.react.svg?url";
import SkReactSvgUrl from "PUBLIC_DIR/images/flags/sk.react.svg?url";
import SlReactSvgUrl from "PUBLIC_DIR/images/flags/sl.react.svg?url";
import SiReactSvgUrl from "PUBLIC_DIR/images/flags/si.react.svg?url";
import SrLatnRSReactSvgUrl from "PUBLIC_DIR/images/flags/sr-Latn-RS.react.svg?url";
import TrReactSvgUrl from "PUBLIC_DIR/images/flags/tr.react.svg?url";
import UkUAReactSvgUrl from "PUBLIC_DIR/images/flags/uk-UA.react.svg?url";
@ -87,6 +88,7 @@ export const flagsIcons = new Map([
["ru.react.svg", RuReactSvgUrl],
["sk.react.svg", SkReactSvgUrl],
["sl.react.svg", SlReactSvgUrl],
["si.react.svg", SiReactSvgUrl],
["sr-Latn-RS.react.svg", SrLatnRSReactSvgUrl],
["tr.react.svg", TrReactSvgUrl],
["uk-UA.react.svg", UkUAReactSvgUrl],

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 63 KiB