mirror of
https://github.com/makeplane/plane.git
synced 2025-12-28 16:06:33 +01:00
fix: eslint errors and warnings (#8149)
This commit is contained in:
committed by
GitHub
parent
83fdebf64d
commit
8307badae5
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { isEmpty } from "lodash-es";
|
import { isEmpty } from "lodash-es";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { AlertCircle, CheckCircle2 } from "lucide-react";
|
import { AlertCircle, CheckCircle2 } from "lucide-react";
|
||||||
|
|
||||||
type TBanner = {
|
type TBanner = {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
@@ -62,10 +61,6 @@ export const ExtendedSidebarItem = observer(function ExtendedSidebarItem(props:
|
|||||||
|
|
||||||
const handleLinkClick = () => toggleExtendedSidebar(true);
|
const handleLinkClick = () => toggleExtendedSidebar(true);
|
||||||
|
|
||||||
if (!allowPermissions(item.access as any, EUserPermissionsLevel.WORKSPACE, workspaceSlug.toString())) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const itemHref =
|
const itemHref =
|
||||||
item.key === "your_work"
|
item.key === "your_work"
|
||||||
? `/${workspaceSlug.toString()}${item.href}${data?.id}`
|
? `/${workspaceSlug.toString()}${item.href}${data?.id}`
|
||||||
@@ -151,6 +146,10 @@ export const ExtendedSidebarItem = observer(function ExtendedSidebarItem(props:
|
|||||||
);
|
);
|
||||||
}, [isLastChild, handleOnNavigationItemDrop, disableDrag, disableDrop, item.key]);
|
}, [isLastChild, handleOnNavigationItemDrop, disableDrag, disableDrop, item.key]);
|
||||||
|
|
||||||
|
if (!allowPermissions(item.access as any, EUserPermissionsLevel.WORKSPACE, workspaceSlug.toString())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
id={`sidebar-${item.key}`}
|
id={`sidebar-${item.key}`}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useCallback, useMemo } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Pencil, ExternalLink, Link, Trash2 } from "lucide-react";
|
import { Pencil, ExternalLink, Link, Trash2 } from "lucide-react";
|
||||||
@@ -30,8 +29,7 @@ export const ProjectLinkDetail = observer(function ProjectLinkDetail(props: TPro
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
// derived values
|
// derived values
|
||||||
const linkDetail = getLinkById(linkId);
|
const linkDetail = getLinkById(linkId);
|
||||||
|
const linkUrl = linkDetail?.url;
|
||||||
if (!linkDetail) return null;
|
|
||||||
|
|
||||||
// handlers
|
// handlers
|
||||||
const handleEdit = useCallback(
|
const handleEdit = useCallback(
|
||||||
@@ -43,18 +41,19 @@ export const ProjectLinkDetail = observer(function ProjectLinkDetail(props: TPro
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleCopyText = useCallback(() => {
|
const handleCopyText = useCallback(() => {
|
||||||
copyTextToClipboard(linkDetail.url).then(() => {
|
if (!linkUrl) return;
|
||||||
|
copyTextToClipboard(linkUrl).then(() => {
|
||||||
setToast({
|
setToast({
|
||||||
type: TOAST_TYPE.SUCCESS,
|
type: TOAST_TYPE.SUCCESS,
|
||||||
title: t("link_copied"),
|
title: t("link_copied"),
|
||||||
message: t("view_link_copied_to_clipboard"),
|
message: t("view_link_copied_to_clipboard"),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, [linkDetail.url, t]);
|
}, [linkUrl, t]);
|
||||||
|
|
||||||
const handleOpenInNewTab = useCallback(() => {
|
const handleOpenInNewTab = useCallback(() => {
|
||||||
window.open(linkDetail.url, "_blank", "noopener,noreferrer");
|
window.open(linkUrl, "_blank", "noopener,noreferrer");
|
||||||
}, [linkDetail.url]);
|
}, [linkUrl]);
|
||||||
|
|
||||||
const handleDelete = useCallback(() => {
|
const handleDelete = useCallback(() => {
|
||||||
linkOperations.remove(linkId);
|
linkOperations.remove(linkId);
|
||||||
@@ -91,6 +90,8 @@ export const ProjectLinkDetail = observer(function ProjectLinkDetail(props: TPro
|
|||||||
[handleEdit, handleOpenInNewTab, handleCopyText, handleDelete, t]
|
[handleEdit, handleOpenInNewTab, handleCopyText, handleDelete, t]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!linkDetail) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LinkItemBlock
|
<LinkItemBlock
|
||||||
title={linkDetail.title || linkDetail.url}
|
title={linkDetail.title || linkDetail.url}
|
||||||
|
|||||||
@@ -89,8 +89,6 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!issue) return <></>;
|
|
||||||
|
|
||||||
const issueOperations: TIssueOperations = useMemo(
|
const issueOperations: TIssueOperations = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars, arrow-body-style
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars, arrow-body-style
|
||||||
@@ -164,6 +162,8 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro
|
|||||||
[inboxIssue]
|
[inboxIssue]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!issue) return <></>;
|
||||||
|
|
||||||
if (!issue?.project_id || !issue?.id) return <></>;
|
if (!issue?.project_id || !issue?.id) return <></>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Check, ListFilter } from "lucide-react";
|
import { Check, ListFilter } from "lucide-react";
|
||||||
|
// plane imports
|
||||||
import type { TActivityFilters, TActivityFilterOption } from "@plane/constants";
|
import type { TActivityFilters, TActivityFilterOption } from "@plane/constants";
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
import { Button } from "@plane/propel/button";
|
import { Button } from "@plane/propel/button";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { RotateCcw } from "lucide-react";
|
import { RotateCcw } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// icons
|
// icons
|
||||||
import { MembersPropertyIcon } from "@plane/propel/icons";
|
import { MembersPropertyIcon } from "@plane/propel/icons";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Paperclip } from "lucide-react";
|
import { Paperclip } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { CycleIcon } from "@plane/propel/icons";
|
import { CycleIcon } from "@plane/propel/icons";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { WorkItemsIcon } from "@plane/propel/icons";
|
import { WorkItemsIcon } from "@plane/propel/icons";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { AlignLeft } from "lucide-react";
|
import { AlignLeft } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { EstimatePropertyIcon } from "@plane/propel/icons";
|
import { EstimatePropertyIcon } from "@plane/propel/icons";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
// hooks
|
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { generateWorkItemLink } from "@plane/utils";
|
import { generateWorkItemLink } from "@plane/utils";
|
||||||
|
// hooks
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
// ui
|
|
||||||
|
|
||||||
type TIssueLink = {
|
type TIssueLink = {
|
||||||
activityId: string;
|
activityId: string;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { IntakeIcon } from "@plane/propel/icons";
|
import { IntakeIcon } from "@plane/propel/icons";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
|
|
||||||
type TIssueLabelPill = { name?: string; color?: string };
|
type TIssueLabelPill = { name?: string; color?: string };
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { LabelPropertyIcon } from "@plane/propel/icons";
|
import { LabelPropertyIcon } from "@plane/propel/icons";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { MessageSquare } from "lucide-react";
|
import { MessageSquare } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { ModuleIcon } from "@plane/propel/icons";
|
import { ModuleIcon } from "@plane/propel/icons";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Type } from "lucide-react";
|
import { Type } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { ParentPropertyIcon } from "@plane/propel/icons";
|
import { ParentPropertyIcon } from "@plane/propel/icons";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { PriorityPropertyIcon } from "@plane/propel/icons";
|
import { PriorityPropertyIcon } from "@plane/propel/icons";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { CalendarDays } from "lucide-react";
|
import { CalendarDays } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { StatePropertyIcon } from "@plane/propel/icons";
|
import { StatePropertyIcon } from "@plane/propel/icons";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// helpers
|
// helpers
|
||||||
import { getValidKeysFromObject } from "@plane/utils";
|
import { getValidKeysFromObject } from "@plane/utils";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import uniq from "lodash-es/uniq";
|
import uniq from "lodash-es/uniq";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { memo } from "react";
|
import { memo } from "react";
|
||||||
import { ArrowUpWideNarrow, ArrowDownWideNarrow } from "lucide-react";
|
import { ArrowUpWideNarrow, ArrowDownWideNarrow } from "lucide-react";
|
||||||
// plane package imports
|
// plane package imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState, Fragment, useEffect } from "react";
|
import { useState, Fragment, useEffect } from "react";
|
||||||
import { TwitterPicker } from "react-color";
|
import { TwitterPicker } from "react-color";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { CloseIcon } from "@plane/propel/icons";
|
import { CloseIcon } from "@plane/propel/icons";
|
||||||
// types
|
// types
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// components
|
// components
|
||||||
import { LabelListItem } from "./label-list-item";
|
import { LabelListItem } from "./label-list-item";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
// components
|
// components
|
||||||
import type { TLabelOperations } from "../root";
|
import type { TLabelOperations } from "../root";
|
||||||
import { IssueLabelSelect } from "./label-select";
|
import { IssueLabelSelect } from "./label-select";
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
// hooks
|
|
||||||
// ui
|
|
||||||
import { Pencil, Trash2, ExternalLink } from "lucide-react";
|
import { Pencil, Trash2, ExternalLink } from "lucide-react";
|
||||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { getIconForLink, copyTextToClipboard, calculateTimeAgo } from "@plane/utils";
|
import { getIconForLink, copyTextToClipboard, calculateTimeAgo } from "@plane/utils";
|
||||||
// icons
|
// hooks
|
||||||
// types
|
|
||||||
// helpers
|
|
||||||
//
|
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
import { useMember } from "@/hooks/store/use-member";
|
import { useMember } from "@/hooks/store/use-member";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
|
// types
|
||||||
import type { TLinkOperationsModal } from "./create-update-link-modal";
|
import type { TLinkOperationsModal } from "./create-update-link-modal";
|
||||||
|
|
||||||
export type TIssueLinkDetail = {
|
export type TIssueLinkDetail = {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Pencil, Trash2, Copy, Link } from "lucide-react";
|
import { Pencil, Trash2, Copy, Link } from "lucide-react";
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import type { TIssueServiceType } from "@plane/types";
|
import type { TIssueServiceType } from "@plane/types";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// computed
|
// computed
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useCallback, useMemo, useState } from "react";
|
import { useCallback, useMemo, useState } from "react";
|
||||||
import { Plus } from "lucide-react";
|
import { Plus } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { MinusCircle } from "lucide-react";
|
import { MinusCircle } from "lucide-react";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// ui
|
// ui
|
||||||
import { CustomMenu } from "@plane/ui";
|
import { CustomMenu } from "@plane/ui";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import type { TIssue } from "@plane/types";
|
import type { TIssue } from "@plane/types";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
|
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
|
||||||
@@ -8,13 +7,9 @@ import { EmojiReactionGroup, EmojiReactionPicker } from "@plane/propel/emoji-rea
|
|||||||
import type { EmojiReactionType } from "@plane/propel/emoji-reaction";
|
import type { EmojiReactionType } from "@plane/propel/emoji-reaction";
|
||||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||||
import type { IUser } from "@plane/types";
|
import type { IUser } from "@plane/types";
|
||||||
// components
|
|
||||||
import { cn, formatTextList } from "@plane/utils";
|
|
||||||
// helper
|
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
import { useMember } from "@/hooks/store/use-member";
|
import { useMember } from "@/hooks/store/use-member";
|
||||||
// types
|
|
||||||
|
|
||||||
export type TIssueCommentReaction = {
|
export type TIssueCommentReaction = {
|
||||||
workspaceSlug: string;
|
workspaceSlug: string;
|
||||||
@@ -50,7 +45,7 @@ export const IssueCommentReaction = observer(function IssueCommentReaction(props
|
|||||||
type: TOAST_TYPE.SUCCESS,
|
type: TOAST_TYPE.SUCCESS,
|
||||||
message: "Reaction created successfully",
|
message: "Reaction created successfully",
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
setToast({
|
setToast({
|
||||||
title: "Error!",
|
title: "Error!",
|
||||||
type: TOAST_TYPE.ERROR,
|
type: TOAST_TYPE.ERROR,
|
||||||
@@ -67,7 +62,7 @@ export const IssueCommentReaction = observer(function IssueCommentReaction(props
|
|||||||
type: TOAST_TYPE.SUCCESS,
|
type: TOAST_TYPE.SUCCESS,
|
||||||
message: "Reaction removed successfully",
|
message: "Reaction removed successfully",
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
setToast({
|
setToast({
|
||||||
title: "Error!",
|
title: "Error!",
|
||||||
type: TOAST_TYPE.ERROR,
|
type: TOAST_TYPE.ERROR,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
|
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
|
||||||
@@ -10,7 +9,7 @@ import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
|||||||
import type { IUser } from "@plane/types";
|
import type { IUser } from "@plane/types";
|
||||||
// hooks
|
// hooks
|
||||||
// ui
|
// ui
|
||||||
import { cn, formatTextList } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
// helpers
|
// helpers
|
||||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||||
import { useMember } from "@/hooks/store/use-member";
|
import { useMember } from "@/hooks/store/use-member";
|
||||||
@@ -68,7 +67,7 @@ export const IssueReaction = observer(function IssueReaction(props: TIssueReacti
|
|||||||
type: TOAST_TYPE.SUCCESS,
|
type: TOAST_TYPE.SUCCESS,
|
||||||
message: "Reaction removed successfully",
|
message: "Reaction removed successfully",
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
setToast({
|
setToast({
|
||||||
title: "Error!",
|
title: "Error!",
|
||||||
type: TOAST_TYPE.ERROR,
|
type: TOAST_TYPE.ERROR,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
|
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ export const CycleCalendarLayout = observer(function CycleCalendarLayout() {
|
|||||||
const { currentProjectCompletedCycleIds } = useCycle();
|
const { currentProjectCompletedCycleIds } = useCycle();
|
||||||
const { workspaceSlug, projectId, cycleId } = useParams();
|
const { workspaceSlug, projectId, cycleId } = useParams();
|
||||||
|
|
||||||
const { issues } = useIssues(EIssuesStoreType.CYCLE);
|
const {
|
||||||
|
issues: { addIssueToCycle },
|
||||||
if (!cycleId) return null;
|
} = useIssues(EIssuesStoreType.CYCLE);
|
||||||
|
|
||||||
const isCompletedCycle =
|
const isCompletedCycle =
|
||||||
cycleId && currentProjectCompletedCycleIds ? currentProjectCompletedCycleIds.includes(cycleId.toString()) : false;
|
cycleId && currentProjectCompletedCycleIds ? currentProjectCompletedCycleIds.includes(cycleId.toString()) : false;
|
||||||
@@ -23,11 +23,13 @@ export const CycleCalendarLayout = observer(function CycleCalendarLayout() {
|
|||||||
const addIssuesToView = useCallback(
|
const addIssuesToView = useCallback(
|
||||||
(issueIds: string[]) => {
|
(issueIds: string[]) => {
|
||||||
if (!workspaceSlug || !projectId || !cycleId) throw new Error();
|
if (!workspaceSlug || !projectId || !cycleId) throw new Error();
|
||||||
return issues.addIssueToCycle(workspaceSlug.toString(), projectId.toString(), cycleId.toString(), issueIds);
|
return addIssueToCycle(workspaceSlug.toString(), projectId.toString(), cycleId.toString(), issueIds);
|
||||||
},
|
},
|
||||||
[issues?.addIssueToCycle, workspaceSlug, projectId, cycleId]
|
[addIssueToCycle, workspaceSlug, projectId, cycleId]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!cycleId) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseCalendarRoot
|
<BaseCalendarRoot
|
||||||
QuickActions={CycleIssueQuickActions}
|
QuickActions={CycleIssueQuickActions}
|
||||||
|
|||||||
@@ -12,18 +12,20 @@ import { BaseCalendarRoot } from "../base-calendar-root";
|
|||||||
export const ModuleCalendarLayout = observer(function ModuleCalendarLayout() {
|
export const ModuleCalendarLayout = observer(function ModuleCalendarLayout() {
|
||||||
const { workspaceSlug, projectId, moduleId } = useParams();
|
const { workspaceSlug, projectId, moduleId } = useParams();
|
||||||
|
|
||||||
const { issues } = useIssues(EIssuesStoreType.MODULE);
|
const {
|
||||||
|
issues: { addIssuesToModule },
|
||||||
if (!moduleId) return null;
|
} = useIssues(EIssuesStoreType.MODULE);
|
||||||
|
|
||||||
const addIssuesToView = useCallback(
|
const addIssuesToView = useCallback(
|
||||||
(issueIds: string[]) => {
|
(issueIds: string[]) => {
|
||||||
if (!workspaceSlug || !projectId || !moduleId) throw new Error();
|
if (!workspaceSlug || !projectId || !moduleId) throw new Error();
|
||||||
return issues.addIssuesToModule(workspaceSlug.toString(), projectId.toString(), moduleId.toString(), issueIds);
|
return addIssuesToModule(workspaceSlug.toString(), projectId.toString(), moduleId.toString(), issueIds);
|
||||||
},
|
},
|
||||||
[issues?.addIssuesToModule, workspaceSlug, projectId, moduleId]
|
[addIssuesToModule, workspaceSlug, projectId, moduleId]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!moduleId) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseCalendarRoot
|
<BaseCalendarRoot
|
||||||
QuickActions={ModuleIssueQuickActions}
|
QuickActions={ModuleIssueQuickActions}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { observer } from "mobx-react";
|
|||||||
import { ArrowUpToLine, Clipboard, History } from "lucide-react";
|
import { ArrowUpToLine, Clipboard, History } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||||
import type { TContextMenuItem } from "@plane/ui";
|
|
||||||
import { ToggleSwitch } from "@plane/ui";
|
import { ToggleSwitch } from "@plane/ui";
|
||||||
|
import type { TContextMenuItem } from "@plane/ui";
|
||||||
import { copyTextToClipboard } from "@plane/utils";
|
import { copyTextToClipboard } from "@plane/utils";
|
||||||
// hooks
|
// hooks
|
||||||
import { useAppRouter } from "@/hooks/use-app-router";
|
import { useAppRouter } from "@/hooks/use-app-router";
|
||||||
@@ -18,8 +18,8 @@ import type { EPageStoreType } from "@/plane-web/hooks/store";
|
|||||||
// store
|
// store
|
||||||
import type { TPageInstance } from "@/store/pages/base-page";
|
import type { TPageInstance } from "@/store/pages/base-page";
|
||||||
// local imports
|
// local imports
|
||||||
import type { TPageActions } from "../../dropdowns";
|
|
||||||
import { PageActions } from "../../dropdowns";
|
import { PageActions } from "../../dropdowns";
|
||||||
|
import type { TPageActions } from "../../dropdowns";
|
||||||
import { ExportPageModal } from "../../modals/export-page-modal";
|
import { ExportPageModal } from "../../modals/export-page-modal";
|
||||||
import { PAGE_NAVIGATION_PANE_TABS_QUERY_PARAM } from "../../navigation-pane";
|
import { PAGE_NAVIGATION_PANE_TABS_QUERY_PARAM } from "../../navigation-pane";
|
||||||
|
|
||||||
@@ -45,8 +45,8 @@ export const PageOptionsDropdown = observer(function PageOptionsDropdown(props:
|
|||||||
// query params
|
// query params
|
||||||
const { updateQueryParams } = useQueryParams();
|
const { updateQueryParams } = useQueryParams();
|
||||||
// menu items list
|
// menu items list
|
||||||
const EXTRA_MENU_OPTIONS = useMemo(function EXTRA_MENU_OPTIONS() {
|
const EXTRA_MENU_OPTIONS: (TContextMenuItem & { key: TPageActions })[] = useMemo(
|
||||||
return [
|
() => [
|
||||||
{
|
{
|
||||||
key: "full-screen",
|
key: "full-screen",
|
||||||
action: () => handleFullWidth(!isFullWidth),
|
action: () => handleFullWidth(!isFullWidth),
|
||||||
@@ -108,8 +108,9 @@ export const PageOptionsDropdown = observer(function PageOptionsDropdown(props:
|
|||||||
icon: ArrowUpToLine,
|
icon: ArrowUpToLine,
|
||||||
shouldRender: true,
|
shouldRender: true,
|
||||||
},
|
},
|
||||||
];
|
],
|
||||||
});
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Earth, Info, Lock, Minus } from "lucide-react";
|
import { Earth, Info, Lock, Minus } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Logo } from "@plane/propel/emoji-icon-picker";
|
import { Logo } from "@plane/propel/emoji-icon-picker";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// types
|
// types
|
||||||
import type { TPageNavigationTabs } from "@plane/types";
|
import type { TPageNavigationTabs } from "@plane/types";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { useState, useRef, useEffect } from "react";
|
import { useState, useRef, useEffect } from "react";
|
||||||
import { Search } from "lucide-react";
|
import { Search } from "lucide-react";
|
||||||
import { useOutsideClickDetector } from "@plane/hooks";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
// types
|
// types
|
||||||
import type { TPageNavigationTabs } from "@plane/types";
|
import type { TPageNavigationTabs } from "@plane/types";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// ui
|
// ui
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
@@ -30,7 +30,7 @@ export const DeletePageModal = observer(function DeletePageModal(props: TConfirm
|
|||||||
const [isDeleting, setIsDeleting] = useState(false);
|
const [isDeleting, setIsDeleting] = useState(false);
|
||||||
// store hooks
|
// store hooks
|
||||||
const { removePage } = usePageStore(storeType);
|
const { removePage } = usePageStore(storeType);
|
||||||
if (!page || !page.id) return null;
|
|
||||||
// derived values
|
// derived values
|
||||||
const { id: pageId, name } = page;
|
const { id: pageId, name } = page;
|
||||||
|
|
||||||
@@ -43,6 +43,7 @@ export const DeletePageModal = observer(function DeletePageModal(props: TConfirm
|
|||||||
const { pageId: routePageId } = useParams();
|
const { pageId: routePageId } = useParams();
|
||||||
|
|
||||||
const handleDelete = async () => {
|
const handleDelete = async () => {
|
||||||
|
if (!pageId) return;
|
||||||
setIsDeleting(true);
|
setIsDeleting(true);
|
||||||
await removePage({ pageId })
|
await removePage({ pageId })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -80,6 +81,8 @@ export const DeletePageModal = observer(function DeletePageModal(props: TConfirm
|
|||||||
setIsDeleting(false);
|
setIsDeleting(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!page || !page.id) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AlertModalCore
|
<AlertModalCore
|
||||||
handleClose={handleClose}
|
handleClose={handleClose}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const PagesListMainContent = observer(function PagesListMainContent(props
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
// store hooks
|
// store hooks
|
||||||
const { currentProjectDetails } = useProject();
|
const { currentProjectDetails } = useProject();
|
||||||
const { isAnyPageAvailable, getCurrentProjectFilteredPageIdsByTab, getCurrentProjectPageIdsByTab, filters, loader } =
|
const { isAnyPageAvailable, getCurrentProjectFilteredPageIdsByTab, getCurrentProjectPageIdsByTab, loader } =
|
||||||
usePageStore(storeType);
|
usePageStore(storeType);
|
||||||
const { allowPermissions } = useUserPermissions();
|
const { allowPermissions } = useUserPermissions();
|
||||||
const { createPage } = usePageStore(EPageStoreType.PROJECT);
|
const { createPage } = usePageStore(EPageStoreType.PROJECT);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState, Fragment } from "react";
|
import { useState, Fragment } from "react";
|
||||||
import { Search } from "lucide-react";
|
import { Search } from "lucide-react";
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
|
|||||||
@@ -8,11 +8,8 @@ import { useTranslation } from "@plane/i18n";
|
|||||||
import { EmptyStateCompact } from "@plane/propel/empty-state";
|
import { EmptyStateCompact } from "@plane/propel/empty-state";
|
||||||
import { Loader, Card } from "@plane/ui";
|
import { Loader, Card } from "@plane/ui";
|
||||||
import { calculateTimeAgo, getFileURL } from "@plane/utils";
|
import { calculateTimeAgo, getFileURL } from "@plane/utils";
|
||||||
// assets
|
|
||||||
import recentActivityEmptyState from "@/app/assets/empty-state/recent_activity.svg?url";
|
|
||||||
// components
|
// components
|
||||||
import { ActivityMessage, IssueLink } from "@/components/core/activity";
|
import { ActivityMessage, IssueLink } from "@/components/core/activity";
|
||||||
import { ProfileEmptyState } from "@/components/ui/profile-empty-state";
|
|
||||||
// constants
|
// constants
|
||||||
import { USER_PROFILE_ACTIVITY } from "@/constants/fetch-keys";
|
import { USER_PROFILE_ACTIVITY } from "@/constants/fetch-keys";
|
||||||
// helpers
|
// helpers
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
// helpers
|
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
import { SidebarHamburgerToggle } from "@/components/core/sidebar/sidebar-menu-hamburger-toggle";
|
import { SidebarHamburgerToggle } from "@/components/core/sidebar/sidebar-menu-hamburger-toggle";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { STATE_TRACKER_EVENTS, STATE_GROUPS } from "@plane/constants";
|
import { STATE_TRACKER_EVENTS, STATE_GROUPS } from "@plane/constants";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useEffect, useState, useMemo } from "react";
|
import { useEffect, useState, useMemo } from "react";
|
||||||
import { TwitterPicker } from "react-color";
|
import { TwitterPicker } from "react-color";
|
||||||
import { Button } from "@plane/propel/button";
|
import { Button } from "@plane/propel/button";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { STATE_TRACKER_EVENTS } from "@plane/constants";
|
import { STATE_TRACKER_EVENTS } from "@plane/constants";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState, useRef } from "react";
|
import { useState, useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Plus } from "lucide-react";
|
import { Plus } from "lucide-react";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Loader } from "lucide-react";
|
import { Loader } from "lucide-react";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { Fragment, useCallback, useEffect, useRef, useState } from "react";
|
import { Fragment, useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import type { IState, TStateGroups, TStateOperationsCallbacks } from "@plane/types";
|
import type { IState, TStateGroups, TStateOperationsCallbacks } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||||
import { getAssetIdFromUrl, checkURLValidity } from "@plane/utils";
|
import { getAssetIdFromUrl, checkURLValidity } from "@plane/utils";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
// components
|
// components
|
||||||
import { Loader } from "@plane/ui";
|
import { Loader } from "@plane/ui";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
import { Info, Lock } from "lucide-react";
|
import { Info, Lock } from "lucide-react";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { Fragment } from "react";
|
import { Fragment } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Search } from "lucide-react";
|
import { Search } from "lucide-react";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { PROJECT_TRACKER_EVENTS } from "@plane/constants";
|
import { PROJECT_TRACKER_EVENTS } from "@plane/constants";
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
||||||
type Props = React.ComponentProps<"button"> & {
|
type Props = React.ComponentProps<"button"> & {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
import { Search } from "lucide-react";
|
import { Search } from "lucide-react";
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ function AppSidebarButtonItem({ children, onClick, disabled = false, className }
|
|||||||
// MAIN COMPONENT
|
// MAIN COMPONENT
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
type AppSidebarItemComponent = React.FC<AppSidebarItemProps> & {
|
export type AppSidebarItemComponent = React.FC<AppSidebarItemProps> & {
|
||||||
Label: React.FC<AppSidebarItemLabelProps>;
|
Label: React.FC<AppSidebarItemLabelProps>;
|
||||||
Icon: React.FC<AppSidebarItemIconProps>;
|
Icon: React.FC<AppSidebarItemIconProps>;
|
||||||
Link: React.FC<AppSidebarLinkItemProps>;
|
Link: React.FC<AppSidebarLinkItemProps>;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
// helpers
|
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
||||||
type TSidebarNavItem = {
|
type TSidebarNavItem = {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import { usePathname } from "next/navigation";
|
|||||||
import { createRoot } from "react-dom/client";
|
import { createRoot } from "react-dom/client";
|
||||||
// plane types
|
// plane types
|
||||||
import type { InstructionType } from "@plane/types";
|
import type { InstructionType } from "@plane/types";
|
||||||
// plane ui
|
|
||||||
import { DropIndicator } from "@plane/ui";
|
|
||||||
// components
|
// components
|
||||||
import { StickyNote } from "../sticky";
|
import { StickyNote } from "../sticky";
|
||||||
// helpers
|
// helpers
|
||||||
@@ -33,11 +31,10 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const StickyDNDWrapper = observer(function StickyDNDWrapper(props: Props) {
|
export const StickyDNDWrapper = observer(function StickyDNDWrapper(props: Props) {
|
||||||
const { stickyId, workspaceSlug, itemWidth, isLastChild, isInFirstRow, isInLastRow, handleDrop, handleLayout } =
|
const { stickyId, workspaceSlug, itemWidth, isLastChild, handleDrop, handleLayout } = props;
|
||||||
props;
|
|
||||||
// states
|
// states
|
||||||
const [isDragging, setIsDragging] = useState(false);
|
const [isDragging, setIsDragging] = useState(false);
|
||||||
const [instruction, setInstruction] = useState<InstructionType | undefined>(undefined);
|
const [_instruction, setInstruction] = useState<InstructionType | undefined>(undefined);
|
||||||
// refs
|
// refs
|
||||||
const elementRef = useRef<HTMLDivElement>(null);
|
const elementRef = useRef<HTMLDivElement>(null);
|
||||||
// navigation
|
// navigation
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import type { FC } from "react";
|
|
||||||
import React from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// ui
|
// ui
|
||||||
import { DragHandle } from "@plane/ui";
|
import { DragHandle } from "@plane/ui";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
// ui
|
// ui
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import type { IIssueLabel } from "@plane/types";
|
import type { IIssueLabel } from "@plane/types";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
// plane types
|
// plane types
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
// hooks
|
// hooks
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
import { useState } from "react";
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
// ui
|
// ui
|
||||||
import { WORKSPACE_SETTINGS_TRACKER_EVENTS } from "@plane/constants";
|
import { WORKSPACE_SETTINGS_TRACKER_EVENTS } from "@plane/constants";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { observer } from "mobx-react";
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { ENotificationLoader, ENotificationQueryParamType } from "@plane/constants";
|
import { ENotificationLoader, ENotificationQueryParamType } from "@plane/constants";
|
||||||
import { useTranslation } from "@plane/i18n";
|
|
||||||
import { EmptyStateCompact } from "@plane/propel/empty-state";
|
import { EmptyStateCompact } from "@plane/propel/empty-state";
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
// components
|
// components
|
||||||
@@ -25,8 +24,6 @@ type NotificationsRootProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const NotificationsRoot = observer(function NotificationsRoot({ workspaceSlug }: NotificationsRootProps) {
|
export const NotificationsRoot = observer(function NotificationsRoot({ workspaceSlug }: NotificationsRootProps) {
|
||||||
// plane hooks
|
|
||||||
const { t } = useTranslation();
|
|
||||||
// hooks
|
// hooks
|
||||||
const { currentWorkspace } = useWorkspace();
|
const { currentWorkspace } = useWorkspace();
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { ENotificationTab } from "@plane/constants";
|
import { ENotificationTab } from "@plane/constants";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { ENotificationFilterType, FILTER_TYPE_OPTIONS } from "@plane/constants";
|
import { ENotificationFilterType, FILTER_TYPE_OPTIONS } from "@plane/constants";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Check } from "lucide-react";
|
import { Check } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { ListFilter } from "lucide-react";
|
import { ListFilter } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// components
|
// components
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { CheckCheck, RefreshCw } from "lucide-react";
|
import { CheckCheck, RefreshCw } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import type { FC } from "react";
|
|
||||||
// plane imports
|
// plane imports
|
||||||
import type { TNotification } from "@plane/types";
|
import type { TNotification } from "@plane/types";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Clock } from "lucide-react";
|
import { Clock } from "lucide-react";
|
||||||
@@ -55,7 +54,9 @@ export const NotificationItem = observer(function NotificationItem(props: TNotif
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (notification?.is_inbox_issue === false) {
|
if (notification?.is_inbox_issue === false) {
|
||||||
!getIsIssuePeeked(issueId) && setPeekIssue({ workspaceSlug, projectId, issueId });
|
if (!getIsIssuePeeked(issueId)) {
|
||||||
|
setPeekIssue({ workspaceSlug, projectId, issueId });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { ArchiveRestore } from "lucide-react";
|
import { ArchiveRestore } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC, ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { FC } from "react";
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { MessageSquare } from "lucide-react";
|
import { MessageSquare } from "lucide-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user