MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / copyText

Function copyText

frontend/src/utils/clipboard.ts:8–15  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

6const { toClipboard } = useClipboard();
7
8export async function copyText(content: string) {
9 try {
10 await toClipboard(content);
11 MsgSuccess(i18n.global.t('commons.msg.copySuccess'));
12 } catch (e) {
13 MsgError(i18n.global.t('commons.msg.copyFailed'));
14 }
15}

Callers

nothing calls this directly

Calls 2

MsgSuccessFunction · 0.90
MsgErrorFunction · 0.90

Tested by

no test coverage detected