Files
moreminimore-vibe/backups/backup-20251218-094212/src/components/ScreenshotSuccessDialog.tsx
Kunthawat Greethong 5660de49de
Some checks failed
CI / test (map[image:macos-latest name:macos], 1, 4) (push) Has been cancelled
CI / test (map[image:macos-latest name:macos], 2, 4) (push) Has been cancelled
CI / test (map[image:macos-latest name:macos], 3, 4) (push) Has been cancelled
CI / test (map[image:macos-latest name:macos], 4, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 1, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 2, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 3, 4) (push) Has been cancelled
CI / test (map[image:windows-latest name:windows], 4, 4) (push) Has been cancelled
CI / merge-reports (push) Has been cancelled
feat: integrate custom features for smart context management
- Added a new integration script to manage custom features related to smart context.
- Implemented handlers for smart context operations (get, update, clear, stats) in ipc.
- Created a SmartContextStore class to manage context snippets and summaries.
- Developed hooks for React to interact with smart context (useSmartContext, useUpdateSmartContext, useClearSmartContext, useSmartContextStats).
- Included backup and restore functionality in the integration script.
- Validated integration by checking for custom modifications and file existence.
2025-12-18 15:56:48 +07:00

43 lines
1.2 KiB
TypeScript

import { DialogTitle } from "@radix-ui/react-dialog";
import { Dialog, DialogContent, DialogHeader } from "./ui/dialog";
import { Button } from "./ui/button";
import { BugIcon } from "lucide-react";
interface ScreenshotSuccessDialogProps {
isOpen: boolean;
onClose: () => void;
handleReportBug: () => Promise<void>;
isLoading: boolean;
}
export function ScreenshotSuccessDialog({
isOpen,
onClose,
handleReportBug,
isLoading,
}: ScreenshotSuccessDialogProps) {
const handleSubmit = async () => {
await handleReportBug();
onClose();
};
return (
<Dialog open={isOpen} onOpenChange={onClose}>
<DialogContent>
<DialogHeader>
<DialogTitle>
Screenshot captured to clipboard! Please paste in GitHub issue.
</DialogTitle>
</DialogHeader>
<Button
variant="default"
onClick={handleSubmit}
className="w-full py-6 border-primary/50 shadow-sm shadow-primary/10 transition-all hover:shadow-md hover:shadow-primary/15"
>
<BugIcon className="mr-2 h-5 w-5" />{" "}
{isLoading ? "Preparing Report..." : "Create GitHub issue"}
</Button>
</DialogContent>
</Dialog>
);
}