Web: Files: added restore public-room translation
This commit is contained in:
parent
6c6aa0a5e5
commit
bcaa84d175
@ -143,5 +143,7 @@
|
||||
"MoveToPublicRoomTitle": "Move to Public room",
|
||||
"MoveToPublicRoom": "This room and all its contents are available to anyone with the link. Do you want to continue?",
|
||||
"LinkRemovedSuccessfully": "Link removed successfully",
|
||||
"Links": "Links"
|
||||
"Links": "Links",
|
||||
"WantToRestoreTheRoom": "All external links in this room will become active, and its contents will be available to everyone with the link. Do you want to restore the room?",
|
||||
"WantToRestoreTheRooms": "All external links in restored rooms will become active, and their contents will be available to everyone with the room links. Do you want to restore the rooms?"
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import Button from "@docspace/components/button";
|
||||
import ModalDialog from "@docspace/components/modal-dialog";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { RoomsType } from "@docspace/common/constants";
|
||||
|
||||
const StyledModal = styled(ModalDialogContainer)`
|
||||
max-width: 400px;
|
||||
@ -26,6 +27,7 @@ const RestoreRoomDialogComponent = (props) => {
|
||||
setRestoreAllArchive,
|
||||
setArchiveAction,
|
||||
items,
|
||||
hasPublicRoom,
|
||||
} = props;
|
||||
|
||||
useEffect(() => {
|
||||
@ -57,6 +59,12 @@ const RestoreRoomDialogComponent = (props) => {
|
||||
};
|
||||
|
||||
const getDescription = () => {
|
||||
if (hasPublicRoom) {
|
||||
return items.length > 1
|
||||
? t("Files:WantToRestoreTheRooms")
|
||||
: t("Files:WantToRestoreTheRoom");
|
||||
}
|
||||
|
||||
if (restoreAll) return t("ArchiveDialog:RestoreAllRooms");
|
||||
|
||||
return items.length > 1
|
||||
@ -124,6 +132,9 @@ export default inject(
|
||||
? [bufferSelection]
|
||||
: [{ id: selectedFolderStore.id }];
|
||||
|
||||
const hasPublicRoom =
|
||||
items.findIndex((i) => i.roomType === RoomsType.PublicRoom) !== -1;
|
||||
|
||||
return {
|
||||
visible,
|
||||
restoreAll,
|
||||
@ -131,6 +142,7 @@ export default inject(
|
||||
setRestoreAllArchive,
|
||||
setArchiveAction,
|
||||
items,
|
||||
hasPublicRoom,
|
||||
};
|
||||
}
|
||||
)(observer(RestoreRoomDialog));
|
||||
|
@ -152,19 +152,24 @@ const LinkRow = (props) => {
|
||||
withTooltip={expiryDate}
|
||||
tooltipContent={tooltipContent}
|
||||
/>
|
||||
|
||||
<Link
|
||||
isHovered
|
||||
type="action"
|
||||
fontSize="14px"
|
||||
fontWeight={600}
|
||||
onClick={onEditLink}
|
||||
isDisabled={disabled}
|
||||
color={disabled ? "#A3A9AE" : ""}
|
||||
className="external-row-link"
|
||||
>
|
||||
{title}
|
||||
</Link>
|
||||
{isArchiveFolder ? (
|
||||
<Text fontSize="14px" fontWeight={600} className="external-row-link">
|
||||
{title}
|
||||
</Text>
|
||||
) : (
|
||||
<Link
|
||||
isHovered
|
||||
type="action"
|
||||
fontSize="14px"
|
||||
fontWeight={600}
|
||||
onClick={onEditLink}
|
||||
isDisabled={disabled}
|
||||
color={disabled ? "#A3A9AE" : ""}
|
||||
className="external-row-link"
|
||||
>
|
||||
{title}
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{disabled && (
|
||||
<Text color={disabled ? "#A3A9AE" : ""}>{t("Settings:Disabled")}</Text>
|
||||
|
Loading…
Reference in New Issue
Block a user