1
0
Fork 0
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:
itsconquest 2022-04-29 09:44:34 +12:00 committed by GitHub
parent 8a6024ce9b
commit b1b0a76465
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 14 deletions

View file

@ -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);