-
+
{integration.title}
- {workspaceIntegrations ? (
- isInstalled ? (
-
- Installed
-
- ) : (
-
- {" "}
- Not Installed
-
- )
- ) : null}
+ {workspaceIntegrations
+ ? isInstalled &&
+ : null}
-
+
{workspaceIntegrations
? isInstalled
? integrationDetails[integration.provider].installed
@@ -135,12 +126,12 @@ export const SingleIntegrationCard: React.FC = ({ integration }) => {
{workspaceIntegrations ? (
isInstalled ? (
-
- {deletingIntegration ? "Removing..." : "Remove installation"}
+
+ {deletingIntegration ? "Uninstalling..." : "Uninstall"}
) : (
- {isInstalling ? "Installing..." : "Add installation"}
+ {isInstalling ? "Installing..." : "Install"}
)
) : (
diff --git a/web/components/ui/integration-and-import-export-banner.tsx b/web/components/ui/integration-and-import-export-banner.tsx
index 541c49efcad..aa79abaf354 100644
--- a/web/components/ui/integration-and-import-export-banner.tsx
+++ b/web/components/ui/integration-and-import-export-banner.tsx
@@ -6,7 +6,7 @@ type Props = {
};
export const IntegrationAndImportExportBanner: React.FC = ({ bannerName, description }) => (
-
+
{bannerName}
{description && (
diff --git a/web/pages/[workspaceSlug]/settings/billing.tsx b/web/pages/[workspaceSlug]/settings/billing.tsx
index 6731cd33f3f..aaa64f97eda 100644
--- a/web/pages/[workspaceSlug]/settings/billing.tsx
+++ b/web/pages/[workspaceSlug]/settings/billing.tsx
@@ -8,7 +8,8 @@ import useSWR from "swr";
import workspaceService from "services/workspace.service";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import { SettingsHeader } from "components/workspace";
+// component
+import { SettingsSidebar } from "components/project";
// ui
import { SecondaryButton } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
@@ -42,14 +43,17 @@ const BillingSettings: NextPage = () => {
}
>
-
-
-
+
+
+
+
+
-
Billing & Plans
-
Free launch preview
+
+
Billing & Plan
+
-
+
Current plan
diff --git a/web/pages/[workspaceSlug]/settings/exports.tsx b/web/pages/[workspaceSlug]/settings/exports.tsx
index 7f98d36184f..b825e0cea59 100644
--- a/web/pages/[workspaceSlug]/settings/exports.tsx
+++ b/web/pages/[workspaceSlug]/settings/exports.tsx
@@ -6,10 +6,9 @@ import useSWR from "swr";
import workspaceService from "services/workspace.service";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import { SettingsHeader } from "components/workspace";
// components
import ExportGuide from "components/exporter/guide";
-import { IntegrationAndImportExportBanner } from "components/ui";
+import { SettingsSidebar } from "components/project";
// ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// types
@@ -41,10 +40,16 @@ const ImportExport: NextPage = () => {
}
>
-
-
-
-
+
);
diff --git a/web/pages/[workspaceSlug]/settings/imports.tsx b/web/pages/[workspaceSlug]/settings/imports.tsx
index a0a46f0bc9d..205923f7c0b 100644
--- a/web/pages/[workspaceSlug]/settings/imports.tsx
+++ b/web/pages/[workspaceSlug]/settings/imports.tsx
@@ -6,10 +6,9 @@ import useSWR from "swr";
import workspaceService from "services/workspace.service";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import { SettingsHeader } from "components/workspace";
// components
import IntegrationGuide from "components/integration/guide";
-import { IntegrationAndImportExportBanner } from "components/ui";
+import { SettingsSidebar } from "components/project";
// ui
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// types
@@ -41,15 +40,19 @@ const ImportExport: NextPage = () => {
}
>
-
-
-
-
+
+
+
+
+
+
+
Imports
+
+
+
+
Previous Imports
+
+
);
diff --git a/web/pages/[workspaceSlug]/settings/index.tsx b/web/pages/[workspaceSlug]/settings/index.tsx
index bd7ea1bd9b1..ffad4a55c6f 100644
--- a/web/pages/[workspaceSlug]/settings/index.tsx
+++ b/web/pages/[workspaceSlug]/settings/index.tsx
@@ -16,14 +16,16 @@ import useUserAuth from "hooks/use-user-auth";
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
// components
import { ImageUploadModal } from "components/core";
-import { DeleteWorkspaceModal, SettingsHeader } from "components/workspace";
+import { DeleteWorkspaceModal } from "components/workspace";
+import { SettingsSidebar } from "components/project";
// ui
-import { Spinner, Input, CustomSelect, SecondaryButton, DangerButton } from "components/ui";
+import { Disclosure, Transition } from "@headlessui/react";
+import { Spinner, Input, CustomSelect, DangerButton, PrimaryButton, Icon } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons
-import { LinkIcon } from "@heroicons/react/24/outline";
+import { Pencil } from "lucide-react";
// helpers
-import { copyTextToClipboard, truncateText } from "helpers/string.helper";
+import { truncateText } from "helpers/string.helper";
// types
import type { IWorkspace } from "types";
import type { NextPage } from "next";
@@ -135,6 +137,7 @@ const WorkspaceSettings: NextPage = () => {
logo: "",
};
});
+ setIsImageUploadModalOpen(false);
})
.catch(() => {
setToastAlert({
@@ -162,6 +165,8 @@ const WorkspaceSettings: NextPage = () => {
setIsImageUploadModalOpen(false)}
+ isRemoving={isImageRemoving}
+ handleDelete={() => handleDelete(activeWorkspace?.logo)}
onSuccess={(imageUrl) => {
setIsImageUploading(true);
setValue("logo", imageUrl);
@@ -178,67 +183,109 @@ const WorkspaceSettings: NextPage = () => {
data={activeWorkspace ?? null}
user={user}
/>
-
-
+
+
+
+
{activeWorkspace ? (
-
-
-
-
Logo
-
- Max file size is 5MB. Supported file types are .jpg and .png.
-
+
+
+
+
setIsImageUploadModalOpen(true)}
+ disabled={!isAdmin}
+ >
+ {watch("logo") && watch("logo") !== null && watch("logo") !== "" ? (
+
+
+
+ ) : (
+
+ {activeWorkspace?.name?.charAt(0) ?? "N"}
+
+ )}
+
-
-
+
+
{watch("name")}
+
{`${
+ typeof window !== "undefined" &&
+ window.location.origin.replace("http://", "").replace("https://", "")
+ }/${activeWorkspace.slug}`}
+
setIsImageUploadModalOpen(true)}
disabled={!isAdmin}
>
{watch("logo") && watch("logo") !== null && watch("logo") !== "" ? (
-
-
-
+ <>
+
+ Edit logo
+ >
) : (
-
- {activeWorkspace?.name?.charAt(0) ?? "N"}
-
+ "Upload logo"
)}
- {isAdmin && (
-
- {
- setIsImageUploadModalOpen(true);
- }}
- >
- {isImageUploading ? "Uploading..." : "Upload"}
-
- {activeWorkspace.logo && activeWorkspace.logo !== "" && (
- handleDelete(activeWorkspace.logo)}
- loading={isImageRemoving}
- >
- {isImageRemoving ? "Removing..." : "Remove"}
-
- )}
-
- )}
-
-
-
URL
-
Your workspace URL.
-
-
-
+
+
+
+
+
Workspace Name
+
+
+
+
+
Company Size
+ (
+ c === value) ?? "Select organization size"
+ }
+ width="w-full"
+ input
+ disabled={!isAdmin}
+ >
+ {ORGANIZATION_SIZE?.map((item) => (
+
+ {item}
+
+ ))}
+
+ )}
+ />
+
+
+
+
Workspace URL
{
disabled
/>
-
- copyTextToClipboard(
- `${typeof window !== "undefined" && window.location.origin}/${
- activeWorkspace.slug
- }`
- ).then(() => {
- setToastAlert({
- type: "success",
- title: "Link Copied!",
- message: "Workspace link copied to clipboard.",
- });
- })
- }
- outline
- >
-
-
-
-
-
-
-
Name
-
Give a name to your workspace.
-
-
-
-
-
Organization Size
-
What size is your organization?
-
-
- (
- c === value) ?? "Select organization size"
- }
- width="w-full"
- input
- disabled={!isAdmin}
- >
- {ORGANIZATION_SIZE?.map((item) => (
-
- {item}
-
- ))}
-
- )}
- />
+ >
+ {isSubmitting ? "Updating..." : "Update Workspace"}
+
- {isAdmin && (
- <>
-
-
+ {({ open }) => (
+
+
- {isSubmitting ? "Updating..." : "Update Workspace"}
-
-
-
-
-
Danger Zone
-
- The danger zone of the workspace delete page is a critical area that requires
- careful consideration and attention. When deleting a workspace, all of the
- data and resources within that workspace will be permanently removed and
- cannot be recovered.
-
-
-
- setIsOpen(true)} outline>
- Delete the workspace
-
-
+
Delete Workspace
+
+
+
+
+
+
+
+ The danger zone of the project delete page is a critical area that
+ requires careful consideration and attention. When deleting a project, all
+ of the data and resources within that project will be permanently removed
+ and cannot be recovered.
+
+
+ setIsOpen(true)}
+ className="!text-sm"
+ outline
+ >
+ Delete my project
+
+
+
+
+
- >
- )}
+ )}
+
) : (
-
+
)}
diff --git a/web/pages/[workspaceSlug]/settings/integrations.tsx b/web/pages/[workspaceSlug]/settings/integrations.tsx
index 1b7a540c424..99508512fd0 100644
--- a/web/pages/[workspaceSlug]/settings/integrations.tsx
+++ b/web/pages/[workspaceSlug]/settings/integrations.tsx
@@ -9,9 +9,9 @@ import workspaceService from "services/workspace.service";
import IntegrationService from "services/integration";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import { SettingsHeader } from "components/workspace";
// components
import { SingleIntegrationCard } from "components/integration";
+import { SettingsSidebar } from "components/project";
// ui
import { IntegrationAndImportExportBanner, Loader } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
@@ -48,19 +48,21 @@ const WorkspaceIntegrations: NextPage = () => {
}
>
-
-
-
+
+
+
+
+
-
+
{appIntegrations ? (
appIntegrations.map((integration) => (
))
) : (
-
-
-
+
+
+
)}
diff --git a/web/pages/[workspaceSlug]/settings/members.tsx b/web/pages/[workspaceSlug]/settings/members.tsx
index 9090e1c1729..f0fdf90dc57 100644
--- a/web/pages/[workspaceSlug]/settings/members.tsx
+++ b/web/pages/[workspaceSlug]/settings/members.tsx
@@ -13,15 +13,15 @@ import useUser from "hooks/use-user";
import useWorkspaceMembers from "hooks/use-workspace-members";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import { SettingsHeader } from "components/workspace";
// components
import ConfirmWorkspaceMemberRemove from "components/workspace/confirm-workspace-member-remove";
import SendWorkspaceInvitationModal from "components/workspace/send-workspace-invitation-modal";
+import { SettingsSidebar } from "components/project";
// ui
-import { CustomMenu, CustomSelect, Loader } from "components/ui";
+import { CustomMenu, CustomSelect, Icon, Loader, PrimaryButton } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons
-import { PlusIcon } from "@heroicons/react/24/outline";
+import { XMarkIcon } from "components/icons";
// types
import type { NextPage } from "next";
// fetch-keys
@@ -143,9 +143,8 @@ const MembersSettings: NextPage = () => {
});
})
.finally(() => {
- mutateMembers(
- (prevData: any) =>
- prevData?.filter((item: any) => item.id !== selectedRemoveMember)
+ mutateMembers((prevData: any) =>
+ prevData?.filter((item: any) => item.id !== selectedRemoveMember)
);
});
}
@@ -187,19 +186,14 @@ const MembersSettings: NextPage = () => {
user={user}
onSuccess={handleInviteModalSuccess}
/>
-
-
-
-
-
Members
-
setInviteModal(true)}
- >
-
- Add Member
-
+
+
+
+
+
+
+
Members
+
setInviteModal(true)}>Add Member
{!workspaceMembers || !workspaceInvitations ? (
@@ -209,23 +203,30 @@ const MembersSettings: NextPage = () => {
) : (
-
+
{members.length > 0
? members.map((member) => (
-
+
{member.avatar && member.avatar !== "" ? (
-
-
-
+
+
+
+
+
) : member.display_name || member.email ? (
-
- {(member.display_name || member.email)?.charAt(0)}
-
+
+
+ {(member.display_name || member.email)?.charAt(0)}
+
+
) : (
?
@@ -244,14 +245,16 @@ const MembersSettings: NextPage = () => {
) : (
-
{member.display_name || member.email}
+
+ {member.display_name || member.email}
+
)}
{isOwner && (
-
{member.email}
+
{member.email}
)}
-
+
{!member?.status && (
Pending
@@ -263,9 +266,22 @@ const MembersSettings: NextPage = () => {
)}
+
+ {ROLE[member.role as keyof typeof ROLE]}
+
+ {member.memberId !== user?.id && (
+
+ )}
+
+ }
value={member.role}
- onChange={(value: any) => {
+ onChange={(value: 5 | 10 | 15 | 20 | undefined) => {
if (!workspaceSlug) return;
mutateMembers(
@@ -323,7 +339,14 @@ const MembersSettings: NextPage = () => {
}
}}
>
- {user?.id === member.memberId ? "Leave" : "Remove member"}
+
+
+
+
+ {" "}
+ {user?.id === member.memberId ? "Leave" : "Remove member"}
+
+
From 2028b39d739de53749595b8914760aad3d0de4a3 Mon Sep 17 00:00:00 2001
From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Date: Fri, 15 Sep 2023 12:16:34 +0530
Subject: [PATCH 3/5] style: project settings and image upload modal
improvement
---
.../core/modals/image-upload-modal.tsx | 38 +++---
web/components/project/settings-sidebar.tsx | 127 ++++++++++++++----
.../projects/[projectId]/settings/index.tsx | 108 +++++++--------
.../projects/[projectId]/settings/members.tsx | 2 +-
4 files changed, 182 insertions(+), 93 deletions(-)
diff --git a/web/components/core/modals/image-upload-modal.tsx b/web/components/core/modals/image-upload-modal.tsx
index 14e4844de68..df4f21e12b7 100644
--- a/web/components/core/modals/image-upload-modal.tsx
+++ b/web/components/core/modals/image-upload-modal.tsx
@@ -1,6 +1,5 @@
import React, { useCallback, useState } from "react";
-import NextImage from "next/image";
import { useRouter } from "next/router";
// react-dropzone
@@ -12,7 +11,7 @@ import fileServices from "services/file.service";
// hooks
import useWorkspaceDetails from "hooks/use-workspace-details";
// ui
-import { PrimaryButton, SecondaryButton } from "components/ui";
+import { DangerButton, PrimaryButton, SecondaryButton } from "components/ui";
// icons
import { UserCircleIcon } from "components/icons";
@@ -21,6 +20,8 @@ type Props = {
onClose: () => void;
isOpen: boolean;
onSuccess: (url: string) => void;
+ isRemoving: boolean;
+ handleDelete: () => void;
userImage?: boolean;
};
@@ -29,6 +30,8 @@ export const ImageUploadModal: React.FC
= ({
onSuccess,
isOpen,
onClose,
+ isRemoving,
+ handleDelete,
userImage,
}) => {
const [image, setImage] = useState(null);
@@ -148,12 +151,10 @@ export const ImageUploadModal: React.FC = ({
>
Edit
-
>
) : (
@@ -182,15 +183,22 @@ export const ImageUploadModal: React.FC = ({
File formats supported- .jpeg, .jpg, .png, .webp, .svg
-
-
Cancel
-
- {isImageUploading ? "Uploading..." : "Upload & Save"}
-
+
+
+
+ {isRemoving ? "Removing..." : "Remove"}
+
+
+
+
Cancel
+
+ {isImageUploading ? "Uploading..." : "Upload & Save"}
+
+
diff --git a/web/components/project/settings-sidebar.tsx b/web/components/project/settings-sidebar.tsx
index 9da5c10586f..a147c8a3aad 100644
--- a/web/components/project/settings-sidebar.tsx
+++ b/web/components/project/settings-sidebar.tsx
@@ -2,7 +2,11 @@ import React from "react";
import { useRouter } from "next/router";
import Link from "next/link";
-export const SettingsSidebar = () => {
+type Props = {
+ profilePage?: boolean;
+};
+
+export const SettingsSidebar: React.FC
= ({ profilePage = false }) => {
const router = useRouter();
const { workspaceSlug, projectId } = router.query;
@@ -43,30 +47,107 @@ export const SettingsSidebar = () => {
href: `/${workspaceSlug}/projects/${projectId}/settings/automations`,
},
];
+
+ const workspaceLinks: Array<{
+ label: string;
+ href: string;
+ }> = [
+ {
+ label: "General",
+ href: `/${workspaceSlug}/settings`,
+ },
+ {
+ label: "Members",
+ href: `/${workspaceSlug}/settings/members`,
+ },
+ {
+ label: "Billing & Plans",
+ href: `/${workspaceSlug}/settings/billing`,
+ },
+ {
+ label: "Integrations",
+ href: `/${workspaceSlug}/settings/integrations`,
+ },
+ {
+ label: "Imports",
+ href: `/${workspaceSlug}/settings/imports`,
+ },
+ {
+ label: "Exports",
+ href: `/${workspaceSlug}/settings/exports`,
+ },
+ ];
+
+ const profileLinks: Array<{
+ label: string;
+ href: string;
+ }> = [
+ {
+ label: "Profile",
+ href: `/${workspaceSlug}/me/profile`,
+ },
+ {
+ label: "Activity",
+ href: `/${workspaceSlug}/me/profile/activity`,
+ },
+ {
+ label: "Preferences",
+ href: `/${workspaceSlug}/me/profile/preferences`,
+ },
+ ];
+
return (
-
-
SETTINGS
-
- {projectLinks.map((link) => (
-
-
-
- {link.label}
-
-
-
- ))}
+
+
+ {!projectId && (
+
+ )}
);
};
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx
index 612d21c145c..a31295fcccb 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx
@@ -25,7 +25,6 @@ import {
TextArea,
Loader,
CustomSelect,
- SecondaryButton,
DangerButton,
Icon,
PrimaryButton,
@@ -67,7 +66,7 @@ const GeneralSettings: NextPage = () => {
: null
);
- const { data: memberDetails, error } = useSWR(
+ const { data: memberDetails } = useSWR(
workspaceSlug && projectId ? USER_PROJECT_VIEW(projectId.toString()) : null,
workspaceSlug && projectId
? () => projectService.projectMemberMe(workspaceSlug.toString(), projectId.toString())
@@ -388,59 +387,60 @@ const GeneralSettings: NextPage = () => {
)}
-
-
- {({ open }) => (
-
-
- Danger Zone
-
-
-
-
-
-
-
- The danger zone of the project delete page is a critical area that
- requires careful consideration and attention. When deleting a project, all
- of the data and resources within that project will be permanently removed
- and cannot be recovered.
-
-
- {projectDetails ? (
-
- setSelectedProject(projectDetails.id ?? null)}
- className="!text-sm"
- outline
- >
- Delete my project
-
-
- ) : (
-
-
-
- )}
+ {isAdmin && (
+
+ {({ open }) => (
+
+
+ Delete Project
+
+
+
+
+
+
+
+ The danger zone of the project delete page is a critical area that
+ requires careful consideration and attention. When deleting a project,
+ all of the data and resources within that project will be permanently
+ removed and cannot be recovered.
+
+
+ {projectDetails ? (
+
+ setSelectedProject(projectDetails.id ?? null)}
+ className="!text-sm"
+ outline
+ >
+ Delete my project
+
+
+ ) : (
+
+
+
+ )}
+
-
-
-
-
- )}
-
+
+
+
+ )}
+
+ )}
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx
index 8a4d807861e..9c0474fa6ce 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/members.tsx
@@ -390,7 +390,7 @@ const MembersSettings: NextPage = () => {
)}
-
+
{!member.member && (
Pending
From 462ecba3e09a404ee02c7b3eba65bdd42aa7da87 Mon Sep 17 00:00:00 2001
From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Date: Fri, 15 Sep 2023 12:27:19 +0530
Subject: [PATCH 4/5] style: profile setting ui revamp
---
web/components/core/activity.tsx | 32 +-
web/components/web-view/activity-message.tsx | 30 +-
.../[workspaceSlug]/me/profile/activity.tsx | 321 +++++++------
.../[workspaceSlug]/me/profile/index.tsx | 430 +++++++++---------
4 files changed, 393 insertions(+), 420 deletions(-)
diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx
index c8f6377b789..4a20c15e817 100644
--- a/web/components/core/activity.tsx
+++ b/web/components/core/activity.tsx
@@ -90,14 +90,14 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
archived_at: {
message: (activity) => {
if (activity.new_value === "restore") return "restored the issue.";
else return "archived the issue.";
},
- icon:
,
+ icon:
,
},
attachment: {
message: (activity, showIssue) => {
@@ -136,7 +136,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
blocking: {
message: (activity) => {
@@ -224,7 +224,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
description: {
message: (activity, showIssue) => (
@@ -239,7 +239,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
estimate_point: {
message: (activity, showIssue) => {
@@ -271,14 +271,14 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
issue: {
message: (activity) => {
if (activity.verb === "created") return "created the issue.";
else return "deleted an issue.";
},
- icon:
,
+ icon:
,
},
labels: {
message: (activity, showIssue) => {
@@ -327,7 +327,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
link: {
message: (activity, showIssue) => {
@@ -398,7 +398,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
modules: {
message: (activity, showIssue, workspaceSlug) => {
@@ -448,7 +448,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
name: {
message: (activity, showIssue) => (
@@ -463,7 +463,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
parent: {
message: (activity, showIssue) => {
@@ -496,7 +496,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
priority: {
message: (activity, showIssue) => (
@@ -514,7 +514,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
start_date: {
message: (activity, showIssue) => {
@@ -548,7 +548,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
state: {
message: (activity, showIssue) => (
@@ -564,7 +564,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
target_date: {
message: (activity, showIssue) => {
@@ -598,7 +598,7 @@ const activityDetails: {
>
);
},
- icon:
,
+ icon:
,
},
};
diff --git a/web/components/web-view/activity-message.tsx b/web/components/web-view/activity-message.tsx
index 956dfb9043a..7100cadc4d0 100644
--- a/web/components/web-view/activity-message.tsx
+++ b/web/components/web-view/activity-message.tsx
@@ -73,7 +73,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
archived_at: {
@@ -81,7 +81,7 @@ const activityDetails: {
if (activity.new_value === "restore") return "restored the issue.";
else return "archived the issue.";
},
- icon:
,
+ icon:
,
},
attachment: {
@@ -99,7 +99,7 @@ const activityDetails: {
{showIssue &&
}
>
),
- icon:
,
+ icon:
,
},
blocking: {
@@ -156,7 +156,7 @@ const activityDetails: {
>
),
- icon:
,
+ icon:
,
},
description: {
@@ -172,7 +172,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
estimate_point: {
@@ -190,7 +190,7 @@ const activityDetails: {
)}
>
),
- icon:
,
+ icon:
,
},
issue: {
@@ -198,7 +198,7 @@ const activityDetails: {
if (activity.verb === "created") return "created the issue.";
else return "deleted an issue.";
},
- icon:
,
+ icon:
,
},
labels: {
@@ -225,7 +225,7 @@ const activityDetails: {
)}
>
),
- icon:
,
+ icon:
,
},
link: {
@@ -255,7 +255,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
modules: {
@@ -279,7 +279,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
name: {
@@ -295,7 +295,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
parent: {
@@ -314,7 +314,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
priority: {
@@ -333,7 +333,7 @@ const activityDetails: {
.
>
),
- icon:
,
+ icon:
,
},
start_date: {
@@ -351,7 +351,7 @@ const activityDetails: {
)}
>
),
- icon:
,
+ icon:
,
},
state: {
@@ -389,7 +389,7 @@ const activityDetails: {
)}
>
),
- icon:
,
+ icon:
,
},
};
diff --git a/web/pages/[workspaceSlug]/me/profile/activity.tsx b/web/pages/[workspaceSlug]/me/profile/activity.tsx
index 20f2784272c..6313e950731 100644
--- a/web/pages/[workspaceSlug]/me/profile/activity.tsx
+++ b/web/pages/[workspaceSlug]/me/profile/activity.tsx
@@ -7,7 +7,6 @@ import Link from "next/link";
import userService from "services/user.service";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import SettingsNavbar from "layouts/settings-navbar";
// components
import { ActivityIcon, ActivityMessage } from "components/core";
import { TipTapEditor } from "components/tiptap";
@@ -20,6 +19,7 @@ import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
import { USER_ACTIVITY } from "constants/fetch-keys";
// helper
import { timeAgo } from "helpers/date-time.helper";
+import { SettingsSidebar } from "components/project";
const ProfileActivity = () => {
const router = useRouter();
@@ -38,186 +38,179 @@ const ProfileActivity = () => {
}
>
-
-
-
-
Profile Settings
-
- This information will be visible to only you.
-
-
-
+
+
+
+
{userActivity ? (
-
-
- {userActivity.results.map((activityItem: any, activityIdx: number) => {
- if (activityItem.field === "comment") {
- return (
-
-
-
- {activityItem.field ? (
- activityItem.new_value === "restore" && (
-
- )
- ) : activityItem.actor_detail.avatar &&
- activityItem.actor_detail.avatar !== "" ? (
-
- ) : (
-
- {activityItem.actor_detail.display_name?.charAt(0)}
-
- )}
+
+
+
Acitivity
+
+
+
+ {userActivity.results.map((activityItem: any, activityIdx: number) => {
+ if (activityItem.field === "comment") {
+ return (
+
+
+
+ {activityItem.field ? (
+ activityItem.new_value === "restore" && (
+
+ )
+ ) : activityItem.actor_detail.avatar &&
+ activityItem.actor_detail.avatar !== "" ? (
+
+ ) : (
+
+ {activityItem.actor_detail.display_name?.charAt(0)}
+
+ )}
-
-
-
-
-
-
-
- {activityItem.actor_detail.is_bot
- ? activityItem.actor_detail.first_name + " Bot"
- : activityItem.actor_detail.display_name}
-
-
- Commented {timeAgo(activityItem.created_at)}
-
+
+
+
-
-
+
+
+
+ {activityItem.actor_detail.is_bot
+ ? activityItem.actor_detail.first_name + " Bot"
+ : activityItem.actor_detail.display_name}
+
+
+ Commented {timeAgo(activityItem.created_at)}
+
+
+
+
+
-
- );
- }
+ );
+ }
- const message =
- activityItem.verb === "created" &&
- activityItem.field !== "cycles" &&
- activityItem.field !== "modules" &&
- activityItem.field !== "attachment" &&
- activityItem.field !== "link" &&
- activityItem.field !== "estimate" ? (
-
- created{" "}
-
-
- this issue.
-
-
-
- ) : activityItem.field ? (
-
- ) : (
- "created the issue."
- );
+ const message =
+ activityItem.verb === "created" &&
+ activityItem.field !== "cycles" &&
+ activityItem.field !== "modules" &&
+ activityItem.field !== "attachment" &&
+ activityItem.field !== "link" &&
+ activityItem.field !== "estimate" ? (
+
+ created{" "}
+
+
+ this issue.
+
+
+
+ ) : activityItem.field ? (
+
+ ) : (
+ "created the issue."
+ );
- if ("field" in activityItem && activityItem.field !== "updated_by") {
- return (
-
-
- {userActivity.results.length > 1 &&
- activityIdx !== userActivity.results.length - 1 ? (
-
- ) : null}
-
- <>
-
-
-
-
- {activityItem.field ? (
- activityItem.new_value === "restore" ? (
-
+
+
+ <>
+
+
+
+
+ {activityItem.field ? (
+ activityItem.new_value === "restore" ? (
+
+ ) : (
+
+ )
+ ) : activityItem.actor_detail.avatar &&
+ activityItem.actor_detail.avatar !== "" ? (
+
) : (
-
- )
- ) : activityItem.actor_detail.avatar &&
- activityItem.actor_detail.avatar !== "" ? (
-
- ) : (
-
- {activityItem.actor_detail.display_name?.charAt(0)}
-
- )}
+
+ {activityItem.actor_detail.display_name?.charAt(0)}
+
+ )}
+
-
-
-
- {activityItem.field === "archived_at" &&
- activityItem.new_value !== "restore" ? (
-
Plane
- ) : activityItem.actor_detail.is_bot ? (
-
- {activityItem.actor_detail.first_name} Bot
+
-
- >
+ >
+
-
-
- );
- }
- })}
-
-
+
+ );
+ }
+ })}
+
+
+
) : (
diff --git a/web/pages/[workspaceSlug]/me/profile/index.tsx b/web/pages/[workspaceSlug]/me/profile/index.tsx
index 6c0af1bc27d..6b083143eb4 100644
--- a/web/pages/[workspaceSlug]/me/profile/index.tsx
+++ b/web/pages/[workspaceSlug]/me/profile/index.tsx
@@ -1,4 +1,6 @@
import React, { useEffect, useState } from "react";
+import { useRouter } from "next/router";
+import Link from "next/link";
// react-hook-form
import { Controller, useForm } from "react-hook-form";
@@ -10,21 +12,15 @@ import useUserAuth from "hooks/use-user-auth";
import useToast from "hooks/use-toast";
// layouts
import { WorkspaceAuthorizationLayout } from "layouts/auth-layout";
-import SettingsNavbar from "layouts/settings-navbar";
// components
import { ImagePickerPopover, ImageUploadModal } from "components/core";
+import { SettingsSidebar } from "components/project";
// ui
-import {
- CustomSearchSelect,
- CustomSelect,
- DangerButton,
- Input,
- SecondaryButton,
- Spinner,
-} from "components/ui";
+import { CustomSearchSelect, CustomSelect, Input, PrimaryButton, Spinner } from "components/ui";
import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs";
// icons
import { UserIcon } from "@heroicons/react/24/outline";
+import { UserCircle } from "lucide-react";
// types
import type { NextPage } from "next";
import type { IUser } from "types";
@@ -46,6 +42,9 @@ const Profile: NextPage = () => {
const [isRemoving, setIsRemoving] = useState(false);
const [isImageUploadModalOpen, setIsImageUploadModalOpen] = useState(false);
+ const router = useRouter();
+ const { workspaceSlug } = router.query;
+
const {
register,
handleSubmit,
@@ -126,6 +125,7 @@ const Profile: NextPage = () => {
if (!prevData) return prevData;
return { ...prevData, avatar: "" };
}, false);
+ setIsRemoving(false);
})
.catch(() => {
setToastAlert({
@@ -155,6 +155,8 @@ const Profile: NextPage = () => {
setIsImageUploadModalOpen(false)}
+ isRemoving={isRemoving}
+ handleDelete={() => handleDelete(myProfile?.avatar, true)}
onSuccess={(url) => {
setValue("avatar", url);
handleSubmit(onSubmit)();
@@ -164,81 +166,49 @@ const Profile: NextPage = () => {
userImage
/>
{myProfile ? (
-
-
-
-
Profile Settings
-
- This information will be visible to only you.
-
+