mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: seo fixes
This commit is contained in:
parent
061717f0af
commit
91910d106c
@ -15,7 +15,7 @@ import { RootStore } from "store/root";
|
||||
export const NavbarTheme = observer(() => {
|
||||
const store: RootStore = useMobxStore();
|
||||
|
||||
const { setTheme, theme } = useTheme();
|
||||
const { setTheme, theme = "light" } = useTheme();
|
||||
|
||||
const handleTheme = () => {
|
||||
store?.theme?.setTheme(store?.theme?.theme === "light" ? "dark" : "light");
|
||||
|
66
apps/space/components/views/project-details.tsx
Normal file
66
apps/space/components/views/project-details.tsx
Normal file
@ -0,0 +1,66 @@
|
||||
import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
// components
|
||||
import { IssueListView } from "components/issues/board-views/list";
|
||||
import { IssueKanbanView } from "components/issues/board-views/kanban";
|
||||
import { IssueCalendarView } from "components/issues/board-views/calendar";
|
||||
import { IssueSpreadsheetView } from "components/issues/board-views/spreadsheet";
|
||||
import { IssueGanttView } from "components/issues/board-views/gantt";
|
||||
import { IssuePeekOverview } from "components/issues/peek-overview";
|
||||
// mobx store
|
||||
import { RootStore } from "store/root";
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
|
||||
export const ProjectDetailsView = () => {
|
||||
const router = useRouter();
|
||||
const { workspace_slug } = router.query;
|
||||
|
||||
const store: RootStore = useMobxStore();
|
||||
|
||||
const activeIssueId = store.issue.activePeekOverviewIssueId;
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full overflow-hidden">
|
||||
{workspace_slug && (
|
||||
<IssuePeekOverview
|
||||
isOpen={Boolean(activeIssueId)}
|
||||
onClose={() => store.issue.setActivePeekOverviewIssueId(null)}
|
||||
issue={store?.issue?.issues?.find((_issue) => _issue.id === activeIssueId) || null}
|
||||
workspaceSlug={workspace_slug.toString()}
|
||||
/>
|
||||
)}
|
||||
|
||||
{store?.issue?.loader && !store.issue.issues ? (
|
||||
<div className="text-sm text-center py-10 text-custom-text-100">Loading...</div>
|
||||
) : (
|
||||
<>
|
||||
{store?.issue?.error ? (
|
||||
<div className="text-sm text-center py-10 bg-custom-background-200 text-custom-text-100">
|
||||
Something went wrong.
|
||||
</div>
|
||||
) : (
|
||||
store?.issue?.currentIssueBoardView && (
|
||||
<>
|
||||
{store?.issue?.currentIssueBoardView === "list" && (
|
||||
<div className="relative w-full h-full overflow-y-auto">
|
||||
<div className="mx-auto px-4">
|
||||
<IssueListView />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{store?.issue?.currentIssueBoardView === "kanban" && (
|
||||
<div className="relative w-full h-full mx-auto px-9 py-5">
|
||||
<IssueKanbanView />
|
||||
</div>
|
||||
)}
|
||||
{store?.issue?.currentIssueBoardView === "calendar" && <IssueCalendarView />}
|
||||
{store?.issue?.currentIssueBoardView === "spreadsheet" && <IssueSpreadsheetView />}
|
||||
{store?.issue?.currentIssueBoardView === "gantt" && <IssueGanttView />}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,8 +1,7 @@
|
||||
export const SITE_NAME = "Plane | Simple, extensible, open-source project management tool.";
|
||||
export const SITE_TITLE = "Plane | Simple, extensible, open-source project management tool.";
|
||||
export const SITE_DESCRIPTION =
|
||||
"Open-source project management tool to manage issues, sprints, and product roadmaps with peace of mind.";
|
||||
export const SITE_NAME = "Plane Deploy | Make your Plane boards and roadmaps pubic with just one-click. ";
|
||||
export const SITE_TITLE = "Plane Deploy | Make your Plane boards public with one-click";
|
||||
export const SITE_DESCRIPTION = "Plane Deploy is a customer feedback management tool built on top of plane.so";
|
||||
export const SITE_KEYWORDS =
|
||||
"software development, plan, ship, software, accelerate, code management, release management, project management, issue tracking, agile, scrum, kanban, collaboration";
|
||||
"software development, customer feedback, software, accelerate, code management, release management, project management, issue tracking, agile, scrum, kanban, collaboration";
|
||||
export const SITE_URL = "https://app.plane.so/";
|
||||
export const TWITTER_USER_NAME = "Plane | Simple, extensible, open-source project management tool.";
|
||||
export const TWITTER_USER_NAME = "planepowers";
|
||||
|
@ -1,27 +1,19 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect } from "react";
|
||||
import type { GetServerSideProps } from "next";
|
||||
import { useRouter } from "next/router";
|
||||
// mobx
|
||||
import { observer } from "mobx-react-lite";
|
||||
// components
|
||||
import { IssueListView } from "components/issues/board-views/list";
|
||||
import { IssueKanbanView } from "components/issues/board-views/kanban";
|
||||
import { IssueCalendarView } from "components/issues/board-views/calendar";
|
||||
import { IssueSpreadsheetView } from "components/issues/board-views/spreadsheet";
|
||||
import { IssueGanttView } from "components/issues/board-views/gantt";
|
||||
import { IssuePeekOverview } from "components/issues/peek-overview";
|
||||
// mobx store
|
||||
import { RootStore } from "store/root";
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
import Head from "next/head";
|
||||
// types
|
||||
import { TIssueBoardKeys } from "store/types";
|
||||
import ProjectLayout from "layouts/project-layout";
|
||||
import { ProjectDetailsView } from "components/views/project-details";
|
||||
|
||||
const WorkspaceProjectPage = () => {
|
||||
const store: RootStore = useMobxStore();
|
||||
const WorkspaceProjectPage = (props: any) => {
|
||||
console.log("props", props);
|
||||
const SITE_TITLE = props?.project_settings?.project_details?.name || "Plane | Deploy";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const activeIssueId = store.issue.activePeekOverviewIssueId;
|
||||
// const activeIssueId = store.issue.activePeekOverviewIssueId;
|
||||
|
||||
const { workspace_slug, project_slug, board, states, labels, priorities } = router.query as {
|
||||
workspace_slug: string;
|
||||
@ -33,124 +25,96 @@ const WorkspaceProjectPage = () => {
|
||||
};
|
||||
|
||||
// updating default board view when we are in the issues page
|
||||
useEffect(() => {
|
||||
if (workspace_slug && project_slug && store?.project?.workspaceProjectSettings) {
|
||||
const workspacePRojectSettingViews = store?.project?.workspaceProjectSettings?.views;
|
||||
const userAccessViews: TIssueBoardKeys[] = [];
|
||||
// useEffect(() => {
|
||||
// if (workspace_slug && project_slug && store?.project?.workspaceProjectSettings) {
|
||||
// const workspaceProjectSettingViews = store?.project?.workspaceProjectSettings?.views;
|
||||
// const userAccessViews: TIssueBoardKeys[] = [];
|
||||
|
||||
Object.keys(workspacePRojectSettingViews).filter((_key) => {
|
||||
if (_key === "list" && workspacePRojectSettingViews.list === true) userAccessViews.push(_key);
|
||||
if (_key === "kanban" && workspacePRojectSettingViews.kanban === true) userAccessViews.push(_key);
|
||||
if (_key === "calendar" && workspacePRojectSettingViews.calendar === true) userAccessViews.push(_key);
|
||||
if (_key === "spreadsheet" && workspacePRojectSettingViews.spreadsheet === true) userAccessViews.push(_key);
|
||||
if (_key === "gantt" && workspacePRojectSettingViews.gantt === true) userAccessViews.push(_key);
|
||||
});
|
||||
// Object.keys(workspaceProjectSettingViews).filter((_key) => {
|
||||
// if (_key === "list" && workspaceProjectSettingViews.list === true) userAccessViews.push(_key);
|
||||
// if (_key === "kanban" && workspaceProjectSettingViews.kanban === true) userAccessViews.push(_key);
|
||||
// if (_key === "calendar" && workspaceProjectSettingViews.calendar === true) userAccessViews.push(_key);
|
||||
// if (_key === "spreadsheet" && workspaceProjectSettingViews.spreadsheet === true) userAccessViews.push(_key);
|
||||
// if (_key === "gantt" && workspaceProjectSettingViews.gantt === true) userAccessViews.push(_key);
|
||||
// });
|
||||
|
||||
let url = `/${workspace_slug}/${project_slug}`;
|
||||
let _board = board;
|
||||
// let url = `/${workspace_slug}/${project_slug}`;
|
||||
// let _board = board;
|
||||
|
||||
if (userAccessViews && userAccessViews.length > 0) {
|
||||
if (!board) {
|
||||
store.issue.setCurrentIssueBoardView(userAccessViews[0]);
|
||||
_board = userAccessViews[0];
|
||||
} else {
|
||||
if (userAccessViews.includes(board)) {
|
||||
if (store.issue.currentIssueBoardView === null) store.issue.setCurrentIssueBoardView(board);
|
||||
else {
|
||||
if (board === store.issue.currentIssueBoardView) {
|
||||
_board = board;
|
||||
} else {
|
||||
_board = board;
|
||||
store.issue.setCurrentIssueBoardView(board);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
store.issue.setCurrentIssueBoardView(userAccessViews[0]);
|
||||
_board = userAccessViews[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (userAccessViews && userAccessViews.length > 0) {
|
||||
// if (!board) {
|
||||
// store.issue.setCurrentIssueBoardView(userAccessViews[0]);
|
||||
// _board = userAccessViews[0];
|
||||
// } else {
|
||||
// if (userAccessViews.includes(board)) {
|
||||
// if (store.issue.currentIssueBoardView === null) store.issue.setCurrentIssueBoardView(board);
|
||||
// else {
|
||||
// if (board === store.issue.currentIssueBoardView) {
|
||||
// _board = board;
|
||||
// } else {
|
||||
// _board = board;
|
||||
// store.issue.setCurrentIssueBoardView(board);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// store.issue.setCurrentIssueBoardView(userAccessViews[0]);
|
||||
// _board = userAccessViews[0];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
_board = _board || "list";
|
||||
url = `${url}?board=${_board}`;
|
||||
// _board = _board || "list";
|
||||
// url = `${url}?board=${_board}`;
|
||||
|
||||
if (states) url = `${url}&states=${states}`;
|
||||
if (labels) url = `${url}&labels=${labels}`;
|
||||
if (priorities) url = `${url}&priorities=${priorities}`;
|
||||
// if (states) url = `${url}&states=${states}`;
|
||||
// if (labels) url = `${url}&labels=${labels}`;
|
||||
// if (priorities) url = `${url}&priorities=${priorities}`;
|
||||
|
||||
url = decodeURIComponent(url);
|
||||
// url = decodeURIComponent(url);
|
||||
|
||||
router.replace(url);
|
||||
}
|
||||
}, [
|
||||
workspace_slug,
|
||||
project_slug,
|
||||
board,
|
||||
router,
|
||||
store?.issue,
|
||||
store?.project?.workspaceProjectSettings,
|
||||
states,
|
||||
labels,
|
||||
priorities,
|
||||
]);
|
||||
// router.replace(url);
|
||||
// }
|
||||
// }, [
|
||||
// workspace_slug,
|
||||
// project_slug,
|
||||
// board,
|
||||
// router,
|
||||
// store?.issue,
|
||||
// store?.project?.workspaceProjectSettings,
|
||||
// states,
|
||||
// labels,
|
||||
// priorities,
|
||||
// ]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!workspace_slug || !project_slug) return;
|
||||
// useEffect(() => {
|
||||
// if (!workspace_slug || !project_slug) return;
|
||||
|
||||
const params = {
|
||||
state: states || null,
|
||||
labels: labels || null,
|
||||
priority: priorities || null,
|
||||
};
|
||||
// const params = {
|
||||
// state: states || null,
|
||||
// labels: labels || null,
|
||||
// priority: priorities || null,
|
||||
// };
|
||||
|
||||
store?.project?.getProjectSettingsAsync(workspace_slug, project_slug);
|
||||
store?.issue?.getIssuesAsync(workspace_slug, project_slug, params);
|
||||
}, [workspace_slug, project_slug, store?.project, store?.issue, states, labels, priorities]);
|
||||
// store?.project?.getProjectSettingsAsync(workspace_slug, project_slug);
|
||||
// store?.issue?.getIssuesAsync(workspace_slug, project_slug, params);
|
||||
// }, [workspace_slug, project_slug, store?.project, store?.issue, states, labels, priorities]);
|
||||
|
||||
return (
|
||||
<ProjectLayout>
|
||||
<div className="relative w-full h-full overflow-hidden">
|
||||
<IssuePeekOverview
|
||||
isOpen={Boolean(activeIssueId)}
|
||||
onClose={() => store.issue.setActivePeekOverviewIssueId(null)}
|
||||
issue={store?.issue?.issues?.find((_issue) => _issue.id === activeIssueId) || null}
|
||||
workspaceSlug={workspace_slug}
|
||||
/>
|
||||
|
||||
{store?.issue?.loader && !store.issue.issues ? (
|
||||
<div className="text-sm text-center py-10 text-custom-text-100">Loading...</div>
|
||||
) : (
|
||||
<>
|
||||
{store?.issue?.error ? (
|
||||
<div className="text-sm text-center py-10 bg-custom-background-200 text-custom-text-100">
|
||||
Something went wrong.
|
||||
</div>
|
||||
) : (
|
||||
store?.issue?.currentIssueBoardView && (
|
||||
<>
|
||||
{store?.issue?.currentIssueBoardView === "list" && (
|
||||
<div className="relative w-full h-full overflow-y-auto">
|
||||
<div className="mx-auto px-4">
|
||||
<IssueListView />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{store?.issue?.currentIssueBoardView === "kanban" && (
|
||||
<div className="relative w-full h-full mx-auto px-9 py-5">
|
||||
<IssueKanbanView />
|
||||
</div>
|
||||
)}
|
||||
{store?.issue?.currentIssueBoardView === "calendar" && <IssueCalendarView />}
|
||||
{store?.issue?.currentIssueBoardView === "spreadsheet" && <IssueSpreadsheetView />}
|
||||
{store?.issue?.currentIssueBoardView === "gantt" && <IssueGanttView />}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<Head>
|
||||
<title>{SITE_TITLE}</title>
|
||||
</Head>
|
||||
<ProjectDetailsView />
|
||||
</ProjectLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default observer(WorkspaceProjectPage);
|
||||
export const getServerSideProps: GetServerSideProps<any> = async ({ query: { workspace_slug, project_slug } }) => {
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_BASE_URL}/api/public/workspaces/${workspace_slug}/project-boards/${project_slug}/settings/`
|
||||
);
|
||||
const project_settings = await res.json();
|
||||
return { props: { project_settings } };
|
||||
};
|
||||
|
||||
export default WorkspaceProjectPage;
|
||||
|
BIN
apps/space/public/favicon/android-chrome-192x192.png
Normal file
BIN
apps/space/public/favicon/android-chrome-192x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
apps/space/public/favicon/android-chrome-512x512.png
Normal file
BIN
apps/space/public/favicon/android-chrome-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
BIN
apps/space/public/favicon/apple-touch-icon.png
Normal file
BIN
apps/space/public/favicon/apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
apps/space/public/favicon/favicon-16x16.png
Normal file
BIN
apps/space/public/favicon/favicon-16x16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
apps/space/public/favicon/favicon-32x32.png
Normal file
BIN
apps/space/public/favicon/favicon-32x32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
apps/space/public/favicon/favicon.ico
Normal file
BIN
apps/space/public/favicon/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 919 B |
1
apps/space/public/favicon/site.webmanifest
Normal file
1
apps/space/public/favicon/site.webmanifest
Normal file
@ -0,0 +1 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
Loading…
Reference in New Issue
Block a user