From e3cb0ed13e0c282064b3bebc553677be4b54618d Mon Sep 17 00:00:00 2001 From: kunalv17 <116634168+kunalv17@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:21:08 +0530 Subject: [PATCH] feat/added toggle for pages in settings features (#576) * feat/added toggle for pages in settings features * style:changed pages icon --- apps/app/components/icons/document-icon.tsx | 6 ++- .../project/single-sidebar-project.tsx | 3 +- .../[projectId]/settings/features.tsx | 39 ++++++++++++++++--- apps/app/types/projects.d.ts | 5 ++- 4 files changed, 43 insertions(+), 10 deletions(-) diff --git a/apps/app/components/icons/document-icon.tsx b/apps/app/components/icons/document-icon.tsx index f7c1b0062..a9c599578 100644 --- a/apps/app/components/icons/document-icon.tsx +++ b/apps/app/components/icons/document-icon.tsx @@ -2,7 +2,7 @@ import React from "react"; import type { Props } from "./types"; -export const DocumentIcon: React.FC = ({ width = "24", height = "24", className }) => ( +export const DocumentIcon: React.FC = ({ width = "24", height = "24", className, color }) => ( = ({ width = "24", height = "24", cla fill="currentColor" xmlns="http://www.w3.org/2000/svg" > - + ); diff --git a/apps/app/components/project/single-sidebar-project.tsx b/apps/app/components/project/single-sidebar-project.tsx index 812fe0c96..8d25ad3ea 100644 --- a/apps/app/components/project/single-sidebar-project.tsx +++ b/apps/app/components/project/single-sidebar-project.tsx @@ -145,7 +145,8 @@ export const SingleSidebarProject: React.FC = ({ if ( (item.name === "Cycles" && !project.cycle_view) || (item.name === "Modules" && !project.module_view) || - (item.name === "Views" && !project.issue_views_view) + (item.name === "Views" && !project.issue_views_view) || + (item.name === "Pages" && !project.page_view) ) return; diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx index 6b3cd31f5..e8a414401 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/features.tsx @@ -17,6 +17,7 @@ import { SecondaryButton } from "components/ui"; import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; // icons import { ContrastIcon, PeopleGroupIcon, ViewListIcon } from "components/icons"; +import { DocumentTextIcon } from "@heroicons/react/24/outline"; // types import { IProject, UserAuth } from "types"; import type { NextPage, GetServerSidePropsContext } from "next"; @@ -65,7 +66,6 @@ const FeaturesSettings: NextPage = (props) => { .then((res) => { mutate(PROJECT_DETAILS(projectId as string)); mutate(PROJECTS_LIST(workspaceSlug as string)); - setToastAlert({ title: "Success!", type: "success", @@ -96,7 +96,7 @@ const FeaturesSettings: NextPage = (props) => {
- +

Cycles

@@ -125,7 +125,7 @@ const FeaturesSettings: NextPage = (props) => {

- +

Modules

@@ -154,11 +154,11 @@ const FeaturesSettings: NextPage = (props) => {

- +

Views

- Modules are enabled for all the projects in this workspace. Access it from the + Views are enabled for all the projects in this workspace. Access it from the navigation bar.

@@ -181,6 +181,35 @@ const FeaturesSettings: NextPage = (props) => { />
+
+
+ +
+

Pages

+

+ Pages are enabled for all the projects in this workspace. Access them from the + navigation bar. +

+
+
+ +