mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 21:40:18 +02:00
fix: merge conflicts resolved from preview
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import { FileText, FolderPlus, Layers, SquarePlus } from "lucide-react";
|
||||
// plane types
|
||||
// plane imports
|
||||
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
||||
import { TPowerKCreateAction, TPowerKCreateActionKeys } from "@plane/types";
|
||||
// plane ui
|
||||
import { ContrastIcon, DiceIcon, LayersIcon } from "@plane/ui";
|
||||
// lib
|
||||
import { TAppRouterInstance } from "@/lib/n-progress/AppProgressBar";
|
||||
import { store } from "@/lib/store-context";
|
||||
// plane web constants
|
||||
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants";
|
||||
|
||||
export const commonCreateActions = (
|
||||
router: TAppRouterInstance
|
||||
@@ -37,7 +35,7 @@ export const commonCreateActions = (
|
||||
issue: {
|
||||
key: "issue",
|
||||
onClick: () => toggleCreateIssueModal(true),
|
||||
label: "New issue",
|
||||
label: "New work item",
|
||||
icon: LayersIcon,
|
||||
shortcut: "C",
|
||||
shouldRender: canCreateIssue,
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
import { Command } from "cmdk";
|
||||
import { observer } from "mobx-react";
|
||||
import { Check } from "lucide-react";
|
||||
// plane types
|
||||
// plane imports
|
||||
import { ISSUE_PRIORITIES } from "@plane/constants";
|
||||
import { TIssue } from "@plane/types";
|
||||
// plane ui
|
||||
import { PriorityIcon } from "@plane/ui";
|
||||
// constants
|
||||
import { ISSUE_PRIORITIES } from "@/constants/issue";
|
||||
|
||||
type Props = {
|
||||
handleClose: () => void;
|
||||
|
||||
@@ -95,7 +95,7 @@ export const PowerKIssueActionsMenu: React.FC<Props> = observer((props) => {
|
||||
return (
|
||||
<>
|
||||
{!activePage && (
|
||||
<Command.Group heading="Issue actions">
|
||||
<Command.Group heading="Work item actions">
|
||||
<PowerKCommandItem
|
||||
icon={DoubleCircleIcon}
|
||||
label="Change state"
|
||||
@@ -129,10 +129,10 @@ export const PowerKIssueActionsMenu: React.FC<Props> = observer((props) => {
|
||||
handleClose();
|
||||
}}
|
||||
/>
|
||||
<PowerKCommandItem icon={Trash2} label="Delete issue" onSelect={handleDeleteIssue} />
|
||||
<PowerKCommandItem icon={Trash2} label="Delete work item" onSelect={handleDeleteIssue} />
|
||||
<PowerKCommandItem
|
||||
icon={LinkIcon}
|
||||
label="Copy issue URL"
|
||||
label="Copy work item URL"
|
||||
onSelect={() => {
|
||||
copyIssueUrlToClipboard();
|
||||
handleClose();
|
||||
|
||||
@@ -4,17 +4,16 @@ import React, { useCallback, useEffect, useState } from "react";
|
||||
import { Command } from "cmdk";
|
||||
import { observer } from "mobx-react";
|
||||
import { useParams } from "next/navigation";
|
||||
// types
|
||||
// plane imports
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { IWorkspaceSearchResults, TPowerKPageKeys } from "@plane/types";
|
||||
// ui
|
||||
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
|
||||
// components
|
||||
import { EmptyState } from "@/components/empty-state";
|
||||
// constants
|
||||
import { EmptyStateType } from "@/constants/empty-state";
|
||||
import { SimpleEmptyState } from "@/components/empty-state";
|
||||
// hooks
|
||||
import { useCommandPalette } from "@/hooks/store";
|
||||
import useDebounce from "@/hooks/use-debounce";
|
||||
import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path";
|
||||
// plane web constants
|
||||
import { POWER_K_PLACEHOLDER_TEXT, PowerKContextBasedActions } from "@/plane-web/components/command-palette/power-k";
|
||||
// plane web services
|
||||
@@ -56,7 +55,11 @@ export const PowerKModal: React.FC = observer(() => {
|
||||
const { workspaceSlug, projectId } = useParams();
|
||||
// debounce
|
||||
const debouncedSearchTerm = useDebounce(searchTerm, 500);
|
||||
// translation
|
||||
const { t } = useTranslation();
|
||||
// derived values
|
||||
const activePage = pages.length > 0 ? pages[pages.length - 1] : undefined;
|
||||
const resolvedPath = useResolvedAssetPath({ basePath: "/empty-state/search/search" });
|
||||
|
||||
const handleClose = () => {
|
||||
toggleCommandPaletteModal(false);
|
||||
@@ -167,7 +170,7 @@ export const PowerKModal: React.FC = observer(() => {
|
||||
)}
|
||||
{!isLoading && resultsCount === 0 && searchTerm !== "" && debouncedSearchTerm !== "" && (
|
||||
<div className="flex flex-col items-center justify-center px-3 py-8 text-center">
|
||||
<EmptyState type={EmptyStateType.COMMAND_K_SEARCH_EMPTY_STATE} layout="screen-simple" />
|
||||
<SimpleEmptyState title={t("command_k.empty_state.search.title")} assetPath={resolvedPath} />
|
||||
</div>
|
||||
)}
|
||||
{(isLoading || isSearching) && <PowerKLoader />}
|
||||
|
||||
@@ -3,10 +3,13 @@ import { Command } from "cmdk";
|
||||
import { observer } from "mobx-react";
|
||||
import Link from "next/link";
|
||||
import { useParams, useRouter } from "next/navigation";
|
||||
// plane imports
|
||||
import { EUserPermissionsLevel, WORKSPACE_SETTINGS_LINKS } from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
// components
|
||||
import { SettingIcon } from "@/components/icons";
|
||||
// hooks
|
||||
import { useUserPermissions } from "@/hooks/store";
|
||||
// plane web constants
|
||||
import { EUserPermissionsLevel, WORKSPACE_SETTINGS_LINKS } from "@/plane-web/constants";
|
||||
// plane web helpers
|
||||
import { shouldRenderSettingLink } from "@/plane-web/helpers/workspace.helper";
|
||||
|
||||
@@ -19,6 +22,8 @@ export const PowerKWorkspaceSettingsMenu: React.FC<Props> = observer((props) =>
|
||||
// navigation
|
||||
const { workspaceSlug } = useParams();
|
||||
const router = useRouter();
|
||||
// translation
|
||||
const { t } = useTranslation();
|
||||
// store hooks
|
||||
const { allowPermissions } = useUserPermissions();
|
||||
|
||||
@@ -37,8 +42,8 @@ export const PowerKWorkspaceSettingsMenu: React.FC<Props> = observer((props) =>
|
||||
className="focus:outline-none"
|
||||
>
|
||||
<Link href={`/${workspaceSlug}${setting.href}`} className="flex items-center gap-2 text-custom-text-200">
|
||||
<setting.Icon className="flex-shrink-0 size-4 text-custom-text-200" />
|
||||
{setting.label}
|
||||
<SettingIcon className="flex-shrink-0 size-4 text-custom-text-200" />
|
||||
{t(setting.i18n_label)}
|
||||
</Link>
|
||||
</Command.Item>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user