Client:EmptyView Added new option
This commit is contained in:
parent
09800779d5
commit
b0fa048c58
@ -3,6 +3,8 @@
|
||||
"CollaboratorEmptyTitle": "The room is empty.",
|
||||
"CreateDocument": "Create a new document",
|
||||
"CreateDocumentDescription": "Take advantage of vast word processing functionality.",
|
||||
"CreateForm": "Create a new PDF form",
|
||||
"CreateFormDescription": "Collect votes, get opinions and store data using PDF forms",
|
||||
"CreateNewFileDescription": "Start working in the room by creating files or folders",
|
||||
"CreateNewFileTitle": "Create a new file",
|
||||
"CreatePresentation": "Create a new presentation",
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
ShareAccessRights,
|
||||
} from "@docspace/shared/enums";
|
||||
|
||||
import UploadPDFFormIcon from "PUBLIC_DIR/images/emptyview/upload.pdf.form.svg";
|
||||
import CreateNewFormIcon from "PUBLIC_DIR/images/emptyview/create.new.form.svg";
|
||||
import CreateNewSpreadsheetIcon from "PUBLIC_DIR/images/emptyview/create.new.spreadsheet.svg";
|
||||
import CreateNewPresentation from "PUBLIC_DIR/images/emptyview/create.new.presentation.svg";
|
||||
@ -232,6 +233,15 @@ export const getOptions = (
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
const createForm = {
|
||||
title: t("EmptyView:CreateForm"),
|
||||
description: t("EmptyView:CreateFormDescription"),
|
||||
icon: <UploadPDFFormIcon />,
|
||||
key: "create-form-option",
|
||||
onClick: () => actions.onCreate("pdf"),
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
const createRoom = {
|
||||
title: t("EmptyView:CreateRoomTitleOption"),
|
||||
description: t("EmptyView:CreateRoomDescriotionOption"),
|
||||
@ -316,6 +326,7 @@ export const getOptions = (
|
||||
createDoc,
|
||||
createSpreadsheet,
|
||||
createPresentation,
|
||||
createForm,
|
||||
])
|
||||
.with([FolderType.Recent, P._], () => ({
|
||||
...actions.onGoToPersonal(),
|
||||
@ -360,6 +371,7 @@ export const getOptions = (
|
||||
createDoc,
|
||||
createSpreadsheet,
|
||||
createPresentation,
|
||||
createForm,
|
||||
])
|
||||
.otherwise(() => []);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import { useNavigate, LinkProps } from "react-router-dom";
|
||||
|
||||
import {
|
||||
Events,
|
||||
FileExtensions,
|
||||
FilesSelectorFilterTypes,
|
||||
FilterType,
|
||||
RoomSearchArea,
|
||||
@ -216,10 +217,13 @@ export const useOptions = (
|
||||
(extension: ExtensiontionType, withoutDialog?: boolean) => {
|
||||
const event: CreateEvent = new Event(Events.CREATE);
|
||||
|
||||
const edit = extension === FileExtensions.PDF;
|
||||
|
||||
const payload = {
|
||||
id: -1,
|
||||
extension,
|
||||
withoutDialog,
|
||||
edit,
|
||||
};
|
||||
event.payload = payload;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user