react-os-shell 0.2.58 → 0.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -527,6 +527,19 @@ function BugReportProvider({ children }) {
|
|
|
527
527
|
setPreviewUrl(url);
|
|
528
528
|
return () => URL.revokeObjectURL(url);
|
|
529
529
|
}, [screenshot]);
|
|
530
|
+
useEffect(() => {
|
|
531
|
+
if (!open) return;
|
|
532
|
+
const onPaste = (e) => {
|
|
533
|
+
const items = Array.from(e.clipboardData?.items ?? []);
|
|
534
|
+
const imageItem = items.find((it) => it.kind === "file" && it.type.startsWith("image/"));
|
|
535
|
+
if (!imageItem) return;
|
|
536
|
+
const blob = imageItem.getAsFile();
|
|
537
|
+
if (!blob) return;
|
|
538
|
+
setScreenshot(blob);
|
|
539
|
+
};
|
|
540
|
+
document.addEventListener("paste", onPaste);
|
|
541
|
+
return () => document.removeEventListener("paste", onPaste);
|
|
542
|
+
}, [open]);
|
|
530
543
|
const handleSubmit = () => {
|
|
531
544
|
setAnnotating(false);
|
|
532
545
|
setOpen(false);
|
|
@@ -589,7 +602,7 @@ function BugReportProvider({ children }) {
|
|
|
589
602
|
}
|
|
590
603
|
)
|
|
591
604
|
] }),
|
|
592
|
-
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[11px] text-gray-400", children: "Click Annotate to mark up the screenshot before sending." })
|
|
605
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[11px] text-gray-400", children: "Click Annotate to mark up the screenshot before sending. Or paste a different image from the clipboard to replace it." })
|
|
593
606
|
] }),
|
|
594
607
|
!previewUrl && /* @__PURE__ */ jsx(UploadDropZone, { onSelect: (blob) => setScreenshot(blob) }),
|
|
595
608
|
extraFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-3", children: extraFields.map((f) => /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -688,7 +701,7 @@ function UploadDropZone({ onSelect }) {
|
|
|
688
701
|
children: [
|
|
689
702
|
/* @__PURE__ */ jsx("p", { className: "text-gray-700 font-medium", children: "Screenshot capture failed" }),
|
|
690
703
|
/* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-gray-500", children: [
|
|
691
|
-
"Drop an image here, or ",
|
|
704
|
+
"Drop an image here, paste one from the clipboard, or ",
|
|
692
705
|
/* @__PURE__ */ jsx("span", { className: "text-blue-600 underline", children: "click to upload" }),
|
|
693
706
|
". Your description will be sent either way."
|
|
694
707
|
] }),
|
|
@@ -896,7 +909,7 @@ function StatusBadge({ status }) {
|
|
|
896
909
|
}
|
|
897
910
|
|
|
898
911
|
// src/version.ts
|
|
899
|
-
var VERSION = "0.2.
|
|
912
|
+
var VERSION = "0.2.59" ;
|
|
900
913
|
var APP_VERSION = VERSION;
|
|
901
914
|
|
|
902
915
|
// src/changelog.ts
|