mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
1e152c666c
* chore: moved app & space from apps to root * chore: modified workspace configuration * chore: modified dockerfiles for space and web * chore: modified icons for space * feat: updated files for new svg icons supported by next-images * chore: added /spaces base path for next * chore: added compose config for space * chore: updated husky configuration * chore: updated workflows for new configuration * chore: changed app name to web * fix: resolved build errors with web * chore: reset file tracing root for both projects * chore: added nginx config for deploy * fix: eslint and tsconfig settings for space app * husky setup fixes based on new dir * eslint fixes * prettier formatting --------- Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com>
96 lines
2.8 KiB
TypeScript
96 lines
2.8 KiB
TypeScript
// types
|
|
import {
|
|
IWorkspaceDefaultSearchResult,
|
|
IWorkspaceIssueSearchResult,
|
|
IWorkspaceProjectSearchResult,
|
|
IWorkspaceSearchResult,
|
|
} from "types";
|
|
|
|
export const commandGroups: {
|
|
[key: string]: {
|
|
icon: string;
|
|
itemName: (item: any) => React.ReactNode;
|
|
path: (item: any) => string;
|
|
title: string;
|
|
};
|
|
} = {
|
|
cycle: {
|
|
icon: "contrast",
|
|
itemName: (cycle: IWorkspaceDefaultSearchResult) => (
|
|
<h6>
|
|
<span className="text-custom-text-200 text-xs">{cycle.project__identifier}</span>
|
|
{"- "}
|
|
{cycle.name}
|
|
</h6>
|
|
),
|
|
path: (cycle: IWorkspaceDefaultSearchResult) =>
|
|
`/${cycle?.workspace__slug}/projects/${cycle?.project_id}/cycles/${cycle?.id}`,
|
|
title: "Cycles",
|
|
},
|
|
issue: {
|
|
icon: "stack",
|
|
itemName: (issue: IWorkspaceIssueSearchResult) => (
|
|
<h6>
|
|
<span className="text-custom-text-200 text-xs">{issue.project__identifier}</span>
|
|
{"- "}
|
|
{issue.name}
|
|
</h6>
|
|
),
|
|
path: (issue: IWorkspaceIssueSearchResult) =>
|
|
`/${issue?.workspace__slug}/projects/${issue?.project_id}/issues/${issue?.id}`,
|
|
title: "Issues",
|
|
},
|
|
issue_view: {
|
|
icon: "photo_filter",
|
|
itemName: (view: IWorkspaceDefaultSearchResult) => (
|
|
<h6>
|
|
<span className="text-custom-text-200 text-xs">{view.project__identifier}</span>
|
|
{"- "}
|
|
{view.name}
|
|
</h6>
|
|
),
|
|
path: (view: IWorkspaceDefaultSearchResult) =>
|
|
`/${view?.workspace__slug}/projects/${view?.project_id}/views/${view?.id}`,
|
|
title: "Views",
|
|
},
|
|
module: {
|
|
icon: "dataset",
|
|
itemName: (module: IWorkspaceDefaultSearchResult) => (
|
|
<h6>
|
|
<span className="text-custom-text-200 text-xs">{module.project__identifier}</span>
|
|
{"- "}
|
|
{module.name}
|
|
</h6>
|
|
),
|
|
path: (module: IWorkspaceDefaultSearchResult) =>
|
|
`/${module?.workspace__slug}/projects/${module?.project_id}/modules/${module?.id}`,
|
|
title: "Modules",
|
|
},
|
|
page: {
|
|
icon: "article",
|
|
itemName: (page: IWorkspaceDefaultSearchResult) => (
|
|
<h6>
|
|
<span className="text-custom-text-200 text-xs">{page.project__identifier}</span>
|
|
{"- "}
|
|
{page.name}
|
|
</h6>
|
|
),
|
|
path: (page: IWorkspaceDefaultSearchResult) =>
|
|
`/${page?.workspace__slug}/projects/${page?.project_id}/pages/${page?.id}`,
|
|
title: "Pages",
|
|
},
|
|
project: {
|
|
icon: "work",
|
|
itemName: (project: IWorkspaceProjectSearchResult) => project?.name,
|
|
path: (project: IWorkspaceProjectSearchResult) =>
|
|
`/${project?.workspace__slug}/projects/${project?.id}/issues/`,
|
|
title: "Projects",
|
|
},
|
|
workspace: {
|
|
icon: "grid_view",
|
|
itemName: (workspace: IWorkspaceSearchResult) => workspace?.name,
|
|
path: (workspace: IWorkspaceSearchResult) => `/${workspace?.slug}/`,
|
|
title: "Workspaces",
|
|
},
|
|
};
|