diff --git a/apps/web/core/components/profile/activity/profile-activity-list.tsx b/apps/web/core/components/profile/activity/profile-activity-list.tsx
deleted file mode 100644
index 8684f54827..0000000000
--- a/apps/web/core/components/profile/activity/profile-activity-list.tsx
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-import { useEffect } from "react";
-import { observer } from "mobx-react";
-import Link from "next/link";
-import useSWR from "swr";
-// icons
-import { History, MessageSquare } from "lucide-react";
-import { calculateTimeAgo, getFileURL } from "@plane/utils";
-// hooks
-import { ActivityIcon, ActivityMessage } from "@/components/core/activity";
-import { RichTextEditor } from "@/components/editor/rich-text";
-import { ActivitySettingsLoader } from "@/components/ui/loader/settings/activity";
-// constants
-import { USER_ACTIVITY } from "@/constants/fetch-keys";
-// hooks
-import { useUser } from "@/hooks/store/user";
-// services
-import { UserService } from "@/services/user.service";
-const userService = new UserService();
-
-type Props = {
- cursor: string;
- perPage: number;
- updateResultsCount: (count: number) => void;
- updateTotalPages: (count: number) => void;
- updateEmptyState: (state: boolean) => void;
-};
-
-export const ProfileActivityListPage = observer(function ProfileActivityListPage(props: Props) {
- const { cursor, perPage, updateResultsCount, updateTotalPages, updateEmptyState } = props;
- // store hooks
- const { data: currentUser } = useUser();
-
- const { data: userProfileActivity } = useSWR(
- USER_ACTIVITY({
- cursor,
- }),
- () =>
- userService.getUserActivity({
- cursor,
- per_page: perPage,
- })
- );
-
- useEffect(() => {
- if (!userProfileActivity) return;
-
- // if no results found then show empty state
- if (userProfileActivity.total_results === 0) updateEmptyState(true);
-
- updateTotalPages(userProfileActivity.total_pages);
- updateResultsCount(userProfileActivity.results.length);
- }, [updateResultsCount, updateTotalPages, userProfileActivity, updateEmptyState]);
-
- // TODO: refactor this component
- return (
- <>
- {userProfileActivity ? (
-
- {userProfileActivity.results.map((activityItem: any) => {
- if (activityItem.field === "comment")
- return (
-
-
-
- {activityItem.field ? (
- activityItem.new_value === "restore" &&
- ) : activityItem.actor_detail.avatar_url && activityItem.actor_detail.avatar_url !== "" ? (
-
})
- ) : (
-
- {activityItem.actor_detail.display_name?.[0]}
-
- )}
-
-
-
-
-
-
-
-
- {activityItem.actor_detail.is_bot
- ? activityItem.actor_detail.first_name + " Bot"
- : activityItem.actor_detail.display_name}
-
-
- Commented {calculateTimeAgo(activityItem.created_at)}
-
-
-
-
-
-
-
-
- );
-
- const message = ;
-
- if ("field" in activityItem && activityItem.field !== "updated_by")
- return (
- -
-
-
- <>
-
-
-
-
- {activityItem.field ? (
- activityItem.new_value === "restore" ? (
-
- ) : (
-
- )
- ) : activityItem.actor_detail.avatar_url &&
- activityItem.actor_detail.avatar_url !== "" ? (
-
})
- ) : (
-
- {activityItem.actor_detail.display_name?.[0]}
-
- )}
-
-
-
-
-
-
- {activityItem.field === "archived_at" && activityItem.new_value !== "restore" ? (
-
Plane
- ) : activityItem.actor_detail.is_bot ? (
-
{activityItem.actor_detail.first_name} Bot
- ) : (
-
-
- {currentUser?.id === activityItem.actor_detail.id
- ? "You"
- : activityItem.actor_detail.display_name}
-
-
- )}{" "}
-
- {message}{" "}
-
- {calculateTimeAgo(activityItem.created_at)}
-
-
-
-
- >
-
-
-
- );
- })}
-
- ) : (
-
- )}
- >
- );
-});
diff --git a/apps/web/core/components/settings/profile/content/pages/activity/activity-list.tsx b/apps/web/core/components/settings/profile/content/pages/activity/activity-list.tsx
deleted file mode 100644
index 9c6db81304..0000000000
--- a/apps/web/core/components/settings/profile/content/pages/activity/activity-list.tsx
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-import { useEffect } from "react";
-import { observer } from "mobx-react";
-import Link from "next/link";
-import useSWR from "swr";
-// icons
-import { History, MessageSquare } from "lucide-react";
-import { calculateTimeAgo, getFileURL } from "@plane/utils";
-// hooks
-import { ActivityIcon, ActivityMessage } from "@/components/core/activity";
-import { RichTextEditor } from "@/components/editor/rich-text";
-import { ActivitySettingsLoader } from "@/components/ui/loader/settings/activity";
-// constants
-import { USER_ACTIVITY } from "@/constants/fetch-keys";
-// hooks
-import { useUserProfile } from "@/hooks/store/user/user-user-profile";
-// services
-import { UserService } from "@/services/user.service";
-const userService = new UserService();
-
-type Props = {
- cursor: string;
- perPage: number;
- updateResultsCount: (count: number) => void;
- updateTotalPages: (count: number) => void;
- updateEmptyState: (state: boolean) => void;
-};
-
-export const ActivityProfileSettingsList = observer(function ProfileActivityListPage(props: Props) {
- const { cursor, perPage, updateResultsCount, updateTotalPages, updateEmptyState } = props;
- // store hooks
- const { data: currentUser } = useUserProfile();
-
- const { data: userProfileActivity } = useSWR(
- USER_ACTIVITY({
- cursor,
- }),
- () =>
- userService.getUserActivity({
- cursor,
- per_page: perPage,
- })
- );
-
- useEffect(() => {
- if (!userProfileActivity) return;
-
- // if no results found then show empty state
- if (userProfileActivity.total_results === 0) updateEmptyState(true);
-
- updateTotalPages(userProfileActivity.total_pages);
- updateResultsCount(userProfileActivity.results.length);
- }, [updateResultsCount, updateTotalPages, userProfileActivity, updateEmptyState]);
-
- // TODO: refactor this component
- return (
- <>
- {userProfileActivity ? (
-
- {userProfileActivity.results.map((activityItem: any) => {
- if (activityItem.field === "comment")
- return (
-
-
-
- {activityItem.field ? (
- activityItem.new_value === "restore" &&
- ) : activityItem.actor_detail.avatar_url && activityItem.actor_detail.avatar_url !== "" ? (
-
})
- ) : (
-
- {activityItem.actor_detail.display_name?.[0]}
-
- )}
-
-
-
-
-
-
-
-
- {activityItem.actor_detail.is_bot
- ? activityItem.actor_detail.first_name + " Bot"
- : activityItem.actor_detail.display_name}
-
-
- Commented {calculateTimeAgo(activityItem.created_at)}
-
-
-
-
-
-
-
-
- );
-
- const message = ;
-
- if ("field" in activityItem && activityItem.field !== "updated_by")
- return (
- -
-
-
- <>
-
-
-
-
- {activityItem.field ? (
- activityItem.new_value === "restore" ? (
-
- ) : (
-
- )
- ) : activityItem.actor_detail.avatar_url &&
- activityItem.actor_detail.avatar_url !== "" ? (
-
})
- ) : (
-
- {activityItem.actor_detail.display_name?.[0]}
-
- )}
-
-
-
-
-
-
- {activityItem.field === "archived_at" && activityItem.new_value !== "restore" ? (
-
Plane
- ) : activityItem.actor_detail.is_bot ? (
-
{activityItem.actor_detail.first_name} Bot
- ) : (
-
-
- {currentUser?.id === activityItem.actor_detail.id
- ? "You"
- : activityItem.actor_detail.display_name}
-
-
- )}{" "}
-
- {message}{" "}
-
- {calculateTimeAgo(activityItem.created_at)}
-
-
-
-
- >
-
-
-
- );
- })}
-
- ) : (
-
- )}
- >
- );
-});
diff --git a/apps/web/core/components/settings/profile/content/pages/activity/index.ts b/apps/web/core/components/settings/profile/content/pages/activity/index.ts
deleted file mode 100644
index d980334597..0000000000
--- a/apps/web/core/components/settings/profile/content/pages/activity/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "./root";
diff --git a/apps/web/core/components/settings/profile/content/pages/activity/root.tsx b/apps/web/core/components/settings/profile/content/pages/activity/root.tsx
deleted file mode 100644
index 466c523cd2..0000000000
--- a/apps/web/core/components/settings/profile/content/pages/activity/root.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-import { useState } from "react";
-import { ChevronDown } from "lucide-react";
-import { observer } from "mobx-react";
-import { useTheme } from "next-themes";
-// plane imports
-import { useTranslation } from "@plane/i18n";
-import { Button } from "@plane/propel/button";
-// assets
-import darkActivityAsset from "@/app/assets/empty-state/profile/activity-dark.webp?url";
-import lightActivityAsset from "@/app/assets/empty-state/profile/activity-light.webp?url";
-// components
-import { DetailedEmptyState } from "@/components/empty-state/detailed-empty-state-root";
-import { ProfileSettingsHeading } from "@/components/settings/profile/heading";
-// local imports
-import { ActivityProfileSettingsList } from "./activity-list";
-
-const PER_PAGE = 100;
-
-export const ActivityProfileSettings = observer(function ActivityProfileSettings() {
- // states
- const [pageCount, setPageCount] = useState(1);
- const [totalPages, setTotalPages] = useState(0);
- const [resultsCount, setResultsCount] = useState(0);
- const [isEmpty, setIsEmpty] = useState(false);
- // theme hook
- const { resolvedTheme } = useTheme();
- // plane hooks
- const { t } = useTranslation();
- // derived values
- const resolvedPath = resolvedTheme === "light" ? lightActivityAsset : darkActivityAsset;
-
- const updateTotalPages = (count: number) => setTotalPages(count);
-
- const updateResultsCount = (count: number) => setResultsCount(count);
-
- const updateEmptyState = (isEmpty: boolean) => setIsEmpty(isEmpty);
-
- const handleLoadMore = () => setPageCount((prev) => prev + 1);
-
- const activityPages: React.ReactNode[] = [];
- for (let i = 0; i < pageCount; i++)
- activityPages.push(
-
- );
-
- const isLoadMoreVisible = pageCount < totalPages && resultsCount !== 0;
-
- if (isEmpty) {
- return (
-
- );
- }
-
- return (
-
-
-
{activityPages}
- {isLoadMoreVisible && (
-
- }>
- {t("load_more")}
-
-
- )}
-
- );
-});
diff --git a/apps/web/core/components/settings/profile/content/pages/index.ts b/apps/web/core/components/settings/profile/content/pages/index.ts
index c9e4179c12..c9dfa24d83 100644
--- a/apps/web/core/components/settings/profile/content/pages/index.ts
+++ b/apps/web/core/components/settings/profile/content/pages/index.ts
@@ -13,6 +13,5 @@ export const PROFILE_SETTINGS_PAGES_MAP: Record import("./preferences").then((m) => ({ default: m.PreferencesProfileSettings }))),
notifications: lazy(() => import("./notifications").then((m) => ({ default: m.NotificationsProfileSettings }))),
security: lazy(() => import("./security").then((m) => ({ default: m.SecurityProfileSettings }))),
- activity: lazy(() => import("./activity").then((m) => ({ default: m.ActivityProfileSettings }))),
"api-tokens": lazy(() => import("./api-tokens").then((m) => ({ default: m.APITokensProfileSettings }))),
};
diff --git a/apps/web/core/components/settings/profile/sidebar/item-categories.tsx b/apps/web/core/components/settings/profile/sidebar/item-categories.tsx
index af961069f4..812d732803 100644
--- a/apps/web/core/components/settings/profile/sidebar/item-categories.tsx
+++ b/apps/web/core/components/settings/profile/sidebar/item-categories.tsx
@@ -6,7 +6,7 @@
import type React from "react";
import type { LucideIcon } from "lucide-react";
-import { Activity, Bell, CircleUser, KeyRound, LockIcon, Settings2 } from "lucide-react";
+import { Bell, CircleUser, KeyRound, LockIcon, Settings2 } from "lucide-react";
import { observer } from "mobx-react";
import { useParams } from "react-router";
// plane imports
@@ -25,7 +25,6 @@ import { ProfileSettingsSidebarWorkspaceOptions } from "./workspace-options";
const ICONS: Record> = {
general: CircleUser,
security: LockIcon,
- activity: Activity,
preferences: Settings2,
notifications: Bell,
"api-tokens": KeyRound,
diff --git a/apps/web/core/services/user.service.ts b/apps/web/core/services/user.service.ts
index 6122c432ad..185780c8d9 100644
--- a/apps/web/core/services/user.service.ts
+++ b/apps/web/core/services/user.service.ts
@@ -145,14 +145,6 @@ export class UserService extends APIService {
});
}
- async getUserActivity(params: { per_page: number; cursor?: string }): Promise {
- return this.get("/api/users/me/activities/", { params })
- .then((response) => response?.data)
- .catch((error) => {
- throw error?.response?.data;
- });
- }
-
async changePassword(token: string, data: { old_password?: string; new_password: string }): Promise {
return this.post(`/auth/change-password/`, data, {
headers: {
diff --git a/packages/constants/src/settings/profile.ts b/packages/constants/src/settings/profile.ts
index 67bc006bf6..734dee0d83 100644
--- a/packages/constants/src/settings/profile.ts
+++ b/packages/constants/src/settings/profile.ts
@@ -37,10 +37,6 @@ export const PROFILE_SETTINGS: Record<
key: "security",
i18n_label: "profile.actions.security",
},
- activity: {
- key: "activity",
- i18n_label: "profile.actions.activity",
- },
preferences: {
key: "preferences",
i18n_label: "profile.actions.preferences",
@@ -66,7 +62,6 @@ export const GROUPED_PROFILE_SETTINGS: Record<
PROFILE_SETTINGS["preferences"],
PROFILE_SETTINGS["notifications"],
PROFILE_SETTINGS["security"],
- PROFILE_SETTINGS["activity"],
],
[PROFILE_SETTINGS_CATEGORY.DEVELOPER]: [PROFILE_SETTINGS["api-tokens"]],
};
diff --git a/packages/types/src/settings.ts b/packages/types/src/settings.ts
index 7eb994dd56..c9df62f0a0 100644
--- a/packages/types/src/settings.ts
+++ b/packages/types/src/settings.ts
@@ -8,7 +8,7 @@
import type { EUserProjectRoles } from ".";
import type { EUserWorkspaceRoles } from "./workspace";
-export type TProfileSettingsTabs = "general" | "preferences" | "activity" | "notifications" | "security" | "api-tokens";
+export type TProfileSettingsTabs = "general" | "preferences" | "notifications" | "security" | "api-tokens";
export type TWorkspaceSettingsTabs = "general" | "members" | "billing-and-plans" | "export" | "webhooks";
export type TWorkspaceSettingsItem = {