Merge branch 'release/v2.6.0' of https://github.com/ONLYOFFICE/DocSpace-client into release/v2.6.0

This commit is contained in:
Timofey Boyko 2024-07-16 12:53:13 +03:00
commit 4698c7a7e9
12 changed files with 59 additions and 23 deletions

View File

@ -10,6 +10,7 @@
"ExpectUsers": "Expect users",
"FeedLinkWasDeleted": "Link was deleted",
"FeedLocationLabel": "Folder «{{folderTitle}}»",
"FeedLocationRoomLabel": "Room «{{folderTitle}}»",
"FileConverted": "File converted.",
"FileCopied": "Files copied.",
"FileCreated": "File created.",
@ -28,6 +29,7 @@
"GroupsEmptyScreenText": "See group details here",
"HistoryEmptyScreenText": "Activity history will be shown here",
"HistoryRoomCreated": "<1>«{{roomTitle}}»</1> room created",
"HistoryRoomCopied": "<1>«{{roomTitle}}»</1> room copied",
"HistoryThirdParty": "History display is not available for public rooms with connected third-party storages",
"InfoBanner": "The list of invited users includes the owner and/or admins of this {{productName}} with full access to all rooms. The owner and/or administrator cannot be assigned other access rights. Once added to the room, they will be notified of all changes.",
"ItemsSelected": "Items selected",

View File

@ -91,7 +91,7 @@ const ConfirmRoute = ({
if (doAuthenticated == AuthenticatedAction.Redirect)
return window.location.replace(defaultPage);
if (doAuthenticated == AuthenticatedAction.Logout) logout();
if (doAuthenticated == AuthenticatedAction.Logout) logout(false);
}
const { search } = location;

View File

@ -132,6 +132,7 @@ const CategoryFilterMobile = ({
withHeaderArrow={!!openedMenuItem}
headerArrowAction={onHeaderArrowClick}
label={openedMenuItem?.label || t("Categories")}
style={{ paddingLeft: "0" }}
/>
{!openedMenuItem && [
@ -140,6 +141,7 @@ const CategoryFilterMobile = ({
className="dropdown-item"
label={t("FormGallery:ViewAllTemplates")}
onClick={onViewAllTemplates}
style={{ paddingLeft: "0" }}
/>,
<DropDownItem
isSeparator
@ -155,6 +157,7 @@ const CategoryFilterMobile = ({
className={`item-by-${item.key}`}
label={item.label}
onClick={() => onOpenMenuItem(item)}
style={{ paddingLeft: "0" }}
isSubMenu
/>
))
@ -163,6 +166,7 @@ const CategoryFilterMobile = ({
key={category.id}
label={getCategoryTitle(category)}
onClick={() => onFilterByCategory(category)}
style={{ paddingLeft: "0" }}
/>
))}
</Scrollbar>

View File

@ -109,6 +109,11 @@ export const feedInfo = [
targetType: `${FeedTarget.Room}`,
actionType: `${FeedAction.Rename}`,
},
{
key: "RoomCopied",
targetType: `${FeedTarget.Room}`,
actionType: `${FeedAction.Copy}`,
},
// ROOM TAGS
{
key: "AddedRoomTags",

View File

@ -46,11 +46,18 @@ const HistoryMainTextFolderInfo = ({
)
return null;
const destination =
feed.data.parentType === 0 || feed.data.toParentType === 0
? t("FeedLocationLabel", {
folderTitle: feed.data.parentTitle || feed.data.toFolderTitle,
})
: t("FeedLocationRoomLabel", {
folderTitle: feed.data.parentTitle || feed.data.toFolderTitle,
});
return (
<StyledHistoryBlockMessage className="message">
<span className="folder-label">
{` ${t("FeedLocationLabel", { folderTitle: feed.data.parentTitle || feed.data.toFolderTitle })}`}
</span>
<span className="folder-label">{destination}</span>
</StyledHistoryBlockMessage>
);
};

View File

@ -43,6 +43,16 @@ export const useFeedTranslation = (
components={{ 1: <strong /> }}
/>
);
case "RoomCopied":
return (
<Trans
t={t}
ns="InfoPanel"
i18nKey="HistoryRoomCopied"
values={{ roomTitle: feed.data.title }}
components={{ 1: <strong /> }}
/>
);
case "RoomRenamed":
return (
<Trans

View File

@ -711,12 +711,12 @@ export default inject(
const isArchive = rootFolderType === FolderType.Archive;
const sharedItem = navigationPath.find((r) => r.shared);
const isShared = shared || navigationPath.find((r) => r.shared);
const showNavigationButton =
isLoading || !security?.CopyLink || isPublicRoom || isArchive
? false
: security?.Read && (shared || sharedItem);
: security?.Read && isShared;
return {
showText: settingsStore.showText,

View File

@ -39,6 +39,7 @@ const StyledContainer = styled.div`
width: 800px;
overflow: hidden;
background-color: ${(props) => props.theme.sdkPresets.previewBackgroundColor};
margin-bottom: 16px;
`;
StyledContainer.defaultProps = { theme: Base };

View File

@ -74,7 +74,7 @@ const UserInput = styled.div`
const StyledDropDown = styled(DropDown)`
${(props) => props.width && `width: ${props.width}px`};
left: 0;
inset-inline-start: 0;
.list-item {
display: flex;
@ -95,16 +95,14 @@ const SearchItemText = styled(Text)`
text-overflow: ellipsis;
overflow: hidden;
font-size: ${(props) =>
props.theme.getCorrectFontSize(
props.primary ? "14px" : props.info ? "11px" : "12px",
)};
props.primary ? "14px" : props.info ? "11px" : "12px"};
font-weight: ${(props) => (props.primary || props.info ? "600" : "400")};
color: ${(props) =>
(props.primary && !props.disabled) || props.info
? props.theme.text.color
: props.theme.text.emailColor};
${(props) => props.info && `margin-left: auto`}
${(props) => props.info && `margin-inline-start: auto`}
`;
SearchItemText.defaultProps = { theme: Base };

View File

@ -29,6 +29,7 @@ import debounce from "lodash.debounce";
import { TextInput } from "@docspace/shared/components/text-input";
import { HelpButton } from "@docspace/shared/components/help-button";
import { Label } from "@docspace/shared/components/label";
import { Text } from "@docspace/shared/components/text";
import { LabelGroup, ControlsGroup } from "../presets/StyledPresets";

View File

@ -1389,14 +1389,17 @@ class ContextOptionsStore {
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom;
const { shared, navigationPath } = this.selectedFolderStore;
const { navigationPath } = this.selectedFolderStore;
if (item.isRoom && withOpen) {
withOpen = navigationPath.findIndex((f) => f.id === item.id) === -1;
}
const isArchive = item.rootFolderType === FolderType.Archive;
const isShared = shared || navigationPath.findIndex((r) => r.shared) > -1;
const hasShareLinkRights = item.shared
? item.security?.Read
: item.security?.EditAccess;
const optionsModel = [
{
@ -1552,20 +1555,14 @@ class ContextOptionsStore {
label: t("Files:CopyLink"),
icon: InvitationLinkReactSvgUrl,
onClick: () => this.onCopyLink(item, t),
disabled:
(isPublicRoomType && item.security?.Read && !isArchive) ||
!item.security?.CopyLink,
disabled: isPublicRoomType && hasShareLinkRights,
},
{
id: "option_copy-external-link",
key: "external-link",
label: t("Files:CopySharedLink"),
icon: TabletLinkReactSvgUrl,
disabled:
this.publicRoomStore.isPublicRoom ||
isArchive ||
!item.security?.Read ||
!isPublicRoomType,
disabled: !hasShareLinkRights,
onClick: () => this.onCreateAndCopySharedLink(item, t),
// onLoad: () => this.onLoadLinks(t, item),
},

View File

@ -2047,6 +2047,7 @@ class FilesStore {
const canDelete = !isEditing && item.security?.Delete;
const canCopy = item.security?.Copy;
const canCopyLink = item.security?.CopyLink;
const canDuplicate = item.security?.Duplicate;
const canDownload = item.security?.Download;
const canEmbed = item.security?.Embed;
@ -2360,7 +2361,7 @@ class FilesStore {
fileOptions = this.removeOptions(fileOptions, ["open-location"]);
}
if (isMyFolder || isRecycleBinFolder) {
if (isMyFolder || isRecycleBinFolder || !canCopyLink) {
fileOptions = this.removeOptions(fileOptions, [
"link-for-room-members",
]);
@ -2403,7 +2404,6 @@ class FilesStore {
item.roomType === RoomsType.PublicRoom ||
item.roomType === RoomsType.FormRoom ||
item.roomType === RoomsType.CustomRoom;
const isCustomRoomType = item.roomType === RoomsType.CustomRoom;
let roomOptions = [
"select",
@ -2433,6 +2433,17 @@ class FilesStore {
roomOptions = this.removeOptions(roomOptions, optionsToRemove);
}
if (isArchiveFolder) {
roomOptions = this.removeOptions(roomOptions, [
"external-link",
"link-for-room-members",
]);
}
if (!isPublicRoomType || this.publicRoomStore.isPublicRoom) {
roomOptions = this.removeOptions(roomOptions, ["external-link"]);
}
if (!canEditRoom) {
roomOptions = this.removeOptions(roomOptions, [
"edit-room",