diff --git a/apiserver/plane/api/serializers/project.py b/apiserver/plane/api/serializers/project.py index 18983c7be..1f7a973c1 100644 --- a/apiserver/plane/api/serializers/project.py +++ b/apiserver/plane/api/serializers/project.py @@ -88,6 +88,7 @@ class ProjectLiteSerializer(BaseSerializer): "cover_image", "icon_prop", "emoji", + "description", ] read_only_fields = fields diff --git a/apps/app/components/notifications/notification-card.tsx b/apps/app/components/notifications/notification-card.tsx index 9733a0f5b..1987c7155 100644 --- a/apps/app/components/notifications/notification-card.tsx +++ b/apps/app/components/notifications/notification-card.tsx @@ -53,7 +53,9 @@ export const NotificationCard: React.FC = (props) => { onClick={() => { markNotificationReadStatus(notification.id); router.push( - `/${workspaceSlug}/projects/${notification.project}/issues/${notification.data.issue.id}` + `/${workspaceSlug}/projects/${notification.project}/${ + notification.data.issue_activity.field === "archived_at" ? "archived-issues" : "issues" + }/${notification.data.issue.id}` ); }} className={`group w-full flex items-center gap-4 p-3 pl-6 relative cursor-pointer ${ diff --git a/apps/space/app/[workspace_slug]/[project_slug]/layout.tsx b/apps/space/app/[workspace_slug]/[project_slug]/layout.tsx index 8cc3ee8c8..fde4f5d99 100644 --- a/apps/space/app/[workspace_slug]/[project_slug]/layout.tsx +++ b/apps/space/app/[workspace_slug]/[project_slug]/layout.tsx @@ -1,11 +1,34 @@ -"use client"; - // next imports import Link from "next/link"; import Image from "next/image"; +import { Metadata, ResolvingMetadata } from "next"; // components import IssueNavbar from "components/issues/navbar"; import IssueFilter from "components/issues/filters-render"; +// service +import ProjectService from "services/project.service"; + +type LayoutProps = { + params: { workspace_slug: string; project_slug: string }; +}; + +export async function generateMetadata({ params }: LayoutProps): Promise { + // read route params + const { workspace_slug, project_slug } = params; + const projectServiceInstance = new ProjectService(); + + const project = await projectServiceInstance?.getProjectSettingsAsync(workspace_slug, project_slug); + + return { + title: `${project?.project_details?.name} | ${workspace_slug}`, + description: `${project?.project_details?.description || `${project?.project_details?.name} | ${workspace_slug}`}`, + icons: `data:image/svg+xml,${ + typeof project?.project_details?.emoji != "object" + ? String.fromCodePoint(parseInt(project?.project_details?.emoji)) + : "✈️" + }`, + }; +} const RootLayout = ({ children }: { children: React.ReactNode }) => (
diff --git a/apps/space/app/page.tsx b/apps/space/app/page.tsx index c1b2926b3..6a18b7283 100644 --- a/apps/space/app/page.tsx +++ b/apps/space/app/page.tsx @@ -3,7 +3,7 @@ import React from "react"; const HomePage = () => ( -
Plane Space
+
Plane Deploy
); export default HomePage; diff --git a/apps/space/components/issues/navbar/index.tsx b/apps/space/components/issues/navbar/index.tsx index 0207aaee2..71a2fabcc 100644 --- a/apps/space/components/issues/navbar/index.tsx +++ b/apps/space/components/issues/navbar/index.tsx @@ -1,5 +1,7 @@ "use client"; +// next imports +import Image from "next/image"; // components import { NavbarSearch } from "./search"; import { NavbarIssueBoardView } from "./issue-board-view"; @@ -12,6 +14,18 @@ import { observer } from "mobx-react-lite"; import { useMobxStore } from "lib/mobx/store-provider"; import { RootStore } from "store/root"; +const renderEmoji = (emoji: string | { name: string; color: string }) => { + if (!emoji) return; + + if (typeof emoji === "object") + return ( + + {emoji.name} + + ); + else return isNaN(parseInt(emoji)) ? emoji : String.fromCodePoint(parseInt(emoji)); +}; + const IssueNavbar = observer(() => { const store: RootStore = useMobxStore(); @@ -20,7 +34,11 @@ const IssueNavbar = observer(() => { {/* project detail */}
- {store?.project?.project && store?.project?.project?.icon ? store?.project?.project?.icon : "😊"} + {store?.project?.project && store?.project?.project?.emoji ? ( + renderEmoji(store?.project?.project?.emoji) + ) : ( + plane logo + )}
{store?.project?.project?.name || `...`} diff --git a/apps/space/package.json b/apps/space/package.json index 4af31d312..c2eaa8af1 100644 --- a/apps/space/package.json +++ b/apps/space/package.json @@ -1,5 +1,5 @@ { - "name": "plane-space", + "name": "plane-deploy", "version": "0.0.1", "private": true, "scripts": { diff --git a/apps/space/store/types/project.ts b/apps/space/store/types/project.ts index a55f30be0..41f4c2f44 100644 --- a/apps/space/store/types/project.ts +++ b/apps/space/store/types/project.ts @@ -8,6 +8,7 @@ export interface IProject { id: string; identifier: string; name: string; + description: string; icon: string; cover_image: string | null; icon_prop: string | null;