chore(p2p): make commands easier to copy-paste (#3273)

chore(p2p): make box easier to copy-paste

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-08-19 19:58:17 +02:00 committed by GitHub
parent bb6d06f0d1
commit 73c9b3598d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 54 additions and 21 deletions

View file

@ -47,6 +47,16 @@
preflight: false,
},
};
function copyClipboard(token) {
navigator.clipboard.writeText(token)
.then(() => {
console.log('Text copied to clipboard:', token);
alert('Text copied to clipboard!');
})
.catch(err => {
console.error('Failed to copy token:', err);
});
}
</script>
<link href="/static/assets/fontawesome/css/fontawesome.css" rel="stylesheet" />
<link href="/static/assets/fontawesome/css/brands.css" rel="stylesheet" />