Skip to content

Commit 45c303d

Browse files
committed
disable editor button
1 parent 93989dc commit 45c303d

File tree

1 file changed

+21
-22
lines changed
  • apps/desktop/src/components/right-panel/views/legacy

1 file changed

+21
-22
lines changed

apps/desktop/src/components/right-panel/views/legacy/base.tsx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { useQuery } from "@tanstack/react-query";
22
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
3-
import { CheckIcon, ClipboardCopyIcon, FileAudioIcon, PencilIcon } from "lucide-react";
3+
import { ClipboardCopyIcon, FileAudioIcon } from "lucide-react";
44
import React from "react";
55

66
import { commands as miscCommands } from "@hypr/plugin-misc";
7-
import { commands as windowsCommands } from "@hypr/plugin-windows";
87
import { Button } from "@hypr/ui/components/ui/button";
98
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@hypr/ui/components/ui/tooltip";
109
import { useOngoingSession, useSessions } from "@hypr/utils/contexts";
@@ -44,22 +43,22 @@ export const TranscriptBase: React.FC<TranscriptBaseProps> = ({
4443
wrapperProps.queryClient,
4544
);
4645

47-
const editing = useQuery({
48-
queryKey: ["editing", sessionId],
49-
queryFn: () => windowsCommands.windowIsVisible({ type: "main" }).then((v) => !v),
50-
});
46+
// const editing = useQuery({
47+
// queryKey: ["editing", sessionId],
48+
// queryFn: () => windowsCommands.windowIsVisible({ type: "main" }).then((v) => !v),
49+
// });
5150

52-
const handleClickToggleEditing = () => {
53-
if (editing.data) {
54-
windowsCommands.windowHide({ type: "transcript", value: sessionId! }).then(() => {
55-
windowsCommands.windowShow({ type: "main" });
56-
});
57-
} else {
58-
windowsCommands.windowHide({ type: "main" }).then(() => {
59-
windowsCommands.windowShow({ type: "transcript", value: sessionId! });
60-
});
61-
}
62-
};
51+
// const handleClickToggleEditing = () => {
52+
// if (editing.data) {
53+
// windowsCommands.windowHide({ type: "transcript", value: sessionId! }).then(() => {
54+
// windowsCommands.windowShow({ type: "main" });
55+
// });
56+
// } else {
57+
// windowsCommands.windowHide({ type: "main" }).then(() => {
58+
// windowsCommands.windowShow({ type: "transcript", value: sessionId! });
59+
// });
60+
// }
61+
// };
6362

6463
const handleOpenSession = () => {
6564
if (sessionId) {
@@ -109,11 +108,11 @@ export const TranscriptBase: React.FC<TranscriptBaseProps> = ({
109108
</Tooltip>
110109
</TooltipProvider>
111110
),
112-
<Button variant="ghost" size="icon" className="p-0" onClick={handleClickToggleEditing}>
113-
{editing.data
114-
? <CheckIcon size={16} className="text-black" />
115-
: <PencilIcon size={16} className="text-black" />}
116-
</Button>,
111+
// <Button variant="ghost" size="icon" className="p-0" onClick={handleClickToggleEditing}>
112+
// {editing.data
113+
// ? <CheckIcon size={16} className="text-black" />
114+
// : <PencilIcon size={16} className="text-black" />}
115+
// </Button>,
117116
].filter(Boolean)}
118117
/>
119118
</div>

0 commit comments

Comments
 (0)