MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / copyWithFeedback

Function copyWithFeedback

src/utils/clipboard.ts:69–80  ·  view source on GitHub ↗
(
  text: string,
  setCopied: (copied: boolean) => void,
  deps: CopyWithFeedbackDeps = {}
)

Source from the content-addressed store, hash-verified

67}
68
69export async function copyWithFeedback(
70 text: string,
71 setCopied: (copied: boolean) => void,
72 deps: CopyWithFeedbackDeps = {}
73): Promise<void> {
74 const success = await copyToClipboard(text, deps);
75 if (!success) return;
76
77 setCopied(true);
78 const schedule = deps.setTimeout ?? setTimeout;
79 schedule(() => setCopied(false), deps.feedbackDuration ?? COPY_FEEDBACK_DURATION);
80}
81
82export async function copyScreenshotToClipboard(
83 getScreenshotBlob: (() => Promise<Blob | null>) | null | undefined,

Callers 6

clipboard.test.tsFile · 0.90
SharePanel.tsxFile · 0.85
ShareButtonInnerFunction · 0.85
handleCopyLinkFunction · 0.85
handleCopyEmbedUrlFunction · 0.85
handleCopyEmbedHtmlFunction · 0.85

Calls 1

copyToClipboardFunction · 0.85

Tested by

no test coverage detected