mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
fix(edge): fix formatting of scripts for release [EE-2987] (#6794)
* fix(edge) fix formatting for release [EE-2987] * fix(edge) EE-2987 fix edge agent command formatting Co-authored-by: Simon Meng <simon.meng@portainer.io>
This commit is contained in:
parent
8a6024ce9b
commit
b1b0a76465
4 changed files with 12 additions and 14 deletions
|
@ -21,13 +21,12 @@ export function useCopy(copyText: string, fadeDelay = 1000) {
|
|||
navigator.clipboard.writeText(copyText);
|
||||
} else {
|
||||
// https://stackoverflow.com/a/57192718
|
||||
const inputEl = document.createElement('input');
|
||||
const inputEl = document.createElement('textarea');
|
||||
inputEl.value = copyText;
|
||||
inputEl.type = 'text';
|
||||
document.body.appendChild(inputEl);
|
||||
inputEl.select();
|
||||
document.execCommand('copy');
|
||||
inputEl.type = 'hidden';
|
||||
inputEl.hidden = true;
|
||||
document.body.removeChild(inputEl);
|
||||
}
|
||||
setCopiedSuccessfully(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue