forked from github/plane
bugfixes
This commit is contained in:
parent
675d21c3f0
commit
be5bc765fc
@ -1,11 +1,8 @@
|
|||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
|
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
// hooks
|
// hooks
|
||||||
import useTheme from "hooks/use-theme";
|
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
import useUser from "hooks/use-user";
|
import useUser from "hooks/use-user";
|
||||||
// components
|
// components
|
||||||
@ -47,7 +44,6 @@ export const CommandPalette: React.FC = () => {
|
|||||||
const { user } = useUser();
|
const { user } = useUser();
|
||||||
|
|
||||||
const { setToastAlert } = useToast();
|
const { setToastAlert } = useToast();
|
||||||
const { toggleCollapsed } = useTheme();
|
|
||||||
|
|
||||||
const { data: issueDetails } = useSWR(
|
const { data: issueDetails } = useSWR(
|
||||||
workspaceSlug && projectId && issueId ? ISSUE_DETAILS(issueId as string) : null,
|
workspaceSlug && projectId && issueId ? ISSUE_DETAILS(issueId as string) : null,
|
||||||
@ -86,8 +82,7 @@ export const CommandPalette: React.FC = () => {
|
|||||||
if (
|
if (
|
||||||
!(e.target instanceof HTMLTextAreaElement) &&
|
!(e.target instanceof HTMLTextAreaElement) &&
|
||||||
!(e.target instanceof HTMLInputElement) &&
|
!(e.target instanceof HTMLInputElement) &&
|
||||||
// !(e.target as Element).classList?.contains("remirror-editor") &&
|
!(e.target as Element).classList?.contains("tiptap-editor-container")
|
||||||
(e.target === document || (e.target instanceof Element && !e.target.closest(".tiptap-editor-container")))
|
|
||||||
) {
|
) {
|
||||||
if ((ctrlKey || metaKey) && keyPressed === "k") {
|
if ((ctrlKey || metaKey) && keyPressed === "k") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -97,8 +92,9 @@ export const CommandPalette: React.FC = () => {
|
|||||||
copyIssueUrlToClipboard();
|
copyIssueUrlToClipboard();
|
||||||
} else if (keyPressed === "b") {
|
} else if (keyPressed === "b") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
toggleCollapsed();
|
store.theme.setSidebarCollapsed();
|
||||||
} else if (keyPressed === "backspace") {
|
} else if (keyPressed === "backspace") {
|
||||||
|
console.log("KEYDOWN")
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setIsBulkDeleteIssuesModalOpen(true);
|
setIsBulkDeleteIssuesModalOpen(true);
|
||||||
}
|
}
|
||||||
@ -120,7 +116,7 @@ export const CommandPalette: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[copyIssueUrlToClipboard, toggleCollapsed]
|
[copyIssueUrlToClipboard]
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -49,8 +49,6 @@ export const WorkspaceHelpSection: React.FC<WorkspaceHelpSectionProps> = ({ setS
|
|||||||
|
|
||||||
const helpOptionsRef = useRef<HTMLDivElement | null>(null);
|
const helpOptionsRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
const { collapsed: sidebarCollapse, toggleCollapsed } = useTheme();
|
|
||||||
|
|
||||||
useOutsideClickDetector(helpOptionsRef, () => setIsNeedHelpOpen(false));
|
useOutsideClickDetector(helpOptionsRef, () => setIsNeedHelpOpen(false));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -60,13 +60,6 @@
|
|||||||
"next-pwa": "^5.6.0",
|
"next-pwa": "^5.6.0",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"prosemirror-commands": "^1.5.2",
|
|
||||||
"prosemirror-keymap": "^1.2.2",
|
|
||||||
"prosemirror-model": "^1.19.3",
|
|
||||||
"prosemirror-schema-list": "^1.3.0",
|
|
||||||
"prosemirror-state": "^1.4.3",
|
|
||||||
"prosemirror-transform": "^1.7.4",
|
|
||||||
"prosemirror-view": "^1.31.7",
|
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-beautiful-dnd": "^13.1.1",
|
"react-beautiful-dnd": "^13.1.1",
|
||||||
"react-color": "^2.19.3",
|
"react-color": "^2.19.3",
|
||||||
@ -75,7 +68,6 @@
|
|||||||
"react-dropzone": "^14.2.3",
|
"react-dropzone": "^14.2.3",
|
||||||
"react-hook-form": "^7.38.0",
|
"react-hook-form": "^7.38.0",
|
||||||
"react-markdown": "^8.0.7",
|
"react-markdown": "^8.0.7",
|
||||||
"remirror": "^2.0.23",
|
|
||||||
"sharp": "^0.32.1",
|
"sharp": "^0.32.1",
|
||||||
"sonner": "^0.6.2",
|
"sonner": "^0.6.2",
|
||||||
"swr": "^2.1.3",
|
"swr": "^2.1.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user