diff --git a/web/assets/nodes.js b/web/assets/nodes.js index bfb11fc..f4ff957 100644 --- a/web/assets/nodes.js +++ b/web/assets/nodes.js @@ -241,9 +241,10 @@ var commandField = query('#pairing-command'); if (commandField) { - // .value, never innerHTML: this is text a person will paste, and it contains a - // code. The server builds it so the console and a shell user get the same command. - commandField.value = result.command || ''; + // textContent, never innerHTML: this is text a person will paste and it contains a + // code. The element is a , so .value does not exist on it - setting it would + // silently do nothing, which is the same failure as the missing toast element. + setText(commandField, result.command || ''); } var codeField = query('#pairing-code'); @@ -416,7 +417,7 @@ } var commandField = query('#pairing-command'); if (commandField) { - commandField.value = ''; + setText(commandField, ''); } }); } @@ -425,7 +426,7 @@ if (copyCommand) { copyCommand.addEventListener('click', function () { var field = query('#pairing-command'); - copyText(field ? field.value : '', 'Command'); + copyText(field ? field.textContent : '', 'Command'); }); } diff --git a/web/uadmin/nodes.html b/web/uadmin/nodes.html index 554e09c..b716530 100644 --- a/web/uadmin/nodes.html +++ b/web/uadmin/nodes.html @@ -146,22 +146,40 @@

Run this on the machine

-
- - - - Read it before running it. It is a script fetched over the network, and the - command below is what fetches it. - +
+
+ Command +
+

+ Paste this into a terminal on the machine you are onboarding. It downloads the + bootstrap; read it if you want to — it is a script fetched over the network. +

+ +
+ + +
-
- -

- - Shown once. It expires, and it is spent by the first machine that uses it. - +
+
+ Six-digit code +
+

+ The bootstrap asks for this. It expires, and it is spent by the first machine + that uses it — so copy it before you log out of this page. +

+
+ + +
+

- - - +