Web:CreateEditRoomDialog: Added SystemFolders component

This commit is contained in:
Akmal Isomadinov 2023-09-22 16:41:06 +05:00
parent d4211afcab
commit 0d46cd6394
6 changed files with 71 additions and 0 deletions

View File

@ -16,6 +16,8 @@
"MakeRoomPrivateTitle": "Make the Room Private",
"PublicRoomBarDescription": "This room is available to anyone with the link. External users will have View Only permission for all the files.",
"PublicRoomDescription": "Invite users via external links to view documents without registration. You can also embed this room into any web interface.",
"PublicRoomSystemFoldersDescription": "System folders store copies of forms at different stages of completion. Forms that are being filled are stored in In progress folder, and completed forms are stored in Complete folder.",
"PublicRoomSystemFoldersTitle": "System Folders",
"ReviewRoomDescription": "Request a review or comments on the documents",
"ReviewRoomTitle": "Review room",
"RoomEditing": "Room editing",

View File

@ -18,6 +18,8 @@ import { getRoomTypeDefaultTagTranslation } from "../data";
import ImageEditor from "@docspace/components/ImageEditor";
import PreviewTile from "@docspace/components/ImageEditor/PreviewTile";
import Text from "@docspace/components/text";
import SystemFolders from "./SystemFolders";
import { RoomsType } from "@docspace/common/constants";
const StyledSetRoomParams = styled.div`
display: flex;
@ -67,6 +69,8 @@ const SetRoomParams = ({
const onChangeIcon = (icon) => setRoomParams({ ...roomParams, icon: icon });
const isFormRoom = roomParams.type === RoomsType.FormRoom;
return (
<StyledSetRoomParams>
{isEdit ? (
@ -117,6 +121,8 @@ const SetRoomParams = ({
/>
)} */}
{isFormRoom && <SystemFolders t={t} />}
{!isEdit && enableThirdParty && (
<ThirdPartyStorage
t={t}

View File

@ -0,0 +1,5 @@
interface SystemFoldersProps {
t: Function;
}
export default SystemFoldersProps;

View File

@ -0,0 +1,29 @@
import styled from "styled-components";
import Text from "@docspace/components/text";
import ToggleButton from "@docspace/components/toggle-button";
export const SystemFoldersTitle = styled(Text)`
font-weight: 600;
line-height: 20px;
`;
export const SystemFoldersDescription = styled(Text)`
font-weight: 400;
font-size: 12px;
line-height: 16px;
color: ${(props) =>
props.theme.createEditRoomDialog.roomType.dropdownItem.descriptionText};
`;
export const SystemFoldersHeader = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 2px;
`;
export const SystemFoldersToggleButton = styled(ToggleButton)`
width: 30px;
height: 16px;
`;

View File

@ -0,0 +1,28 @@
import React from "react";
import {
SystemFoldersTitle,
SystemFoldersHeader,
SystemFoldersDescription,
SystemFoldersToggleButton,
} from "./SystemFolders.styled";
import type SystemFoldersProps from "./SystemFolders.props";
function SystemFolders({ t }: SystemFoldersProps) {
return (
<section>
<SystemFoldersHeader>
<SystemFoldersTitle>
{t("CreateEditRoomDialog:PublicRoomSystemFoldersTitle")}
</SystemFoldersTitle>
<SystemFoldersToggleButton isChecked isDisabled onChange={() => {}} />
</SystemFoldersHeader>
<SystemFoldersDescription>
{t("CreateEditRoomDialog:PublicRoomSystemFoldersDescription")}
</SystemFoldersDescription>
</section>
);
}
export default SystemFolders;

View File

@ -0,0 +1 @@
export { default } from "./SystemFolders";