|
1 | 1 | import { useQuery } from "@tanstack/react-query";
|
2 | 2 | import { writeText } from "@tauri-apps/plugin-clipboard-manager";
|
3 |
| -import { CheckIcon, ClipboardCopyIcon, FileAudioIcon, PencilIcon } from "lucide-react"; |
| 3 | +import { ClipboardCopyIcon, FileAudioIcon } from "lucide-react"; |
4 | 4 | import React from "react";
|
5 | 5 |
|
6 | 6 | import { commands as miscCommands } from "@hypr/plugin-misc";
|
7 |
| -import { commands as windowsCommands } from "@hypr/plugin-windows"; |
8 | 7 | import { Button } from "@hypr/ui/components/ui/button";
|
9 | 8 | import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@hypr/ui/components/ui/tooltip";
|
10 | 9 | import { useOngoingSession, useSessions } from "@hypr/utils/contexts";
|
@@ -44,22 +43,22 @@ export const TranscriptBase: React.FC<TranscriptBaseProps> = ({
|
44 | 43 | wrapperProps.queryClient,
|
45 | 44 | );
|
46 | 45 |
|
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 | + // }); |
51 | 50 |
|
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 | + // }; |
63 | 62 |
|
64 | 63 | const handleOpenSession = () => {
|
65 | 64 | if (sessionId) {
|
@@ -109,11 +108,11 @@ export const TranscriptBase: React.FC<TranscriptBaseProps> = ({
|
109 | 108 | </Tooltip>
|
110 | 109 | </TooltipProvider>
|
111 | 110 | ),
|
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>, |
117 | 116 | ].filter(Boolean)}
|
118 | 117 | />
|
119 | 118 | </div>
|
|
0 commit comments