diff --git a/scripts/aes.js b/scripts/aes.js index f522460..bae7114 100644 --- a/scripts/aes.js +++ b/scripts/aes.js @@ -16,9 +16,13 @@ let tabs = new TabList({}); let encForm = tabs.createForm({label: "Encryption"}); -let encMsg = encForm.createTextArea({label: "Message"}); +let encMsg = encForm.createTextArea({ + label: "Message", + placeholder: "Type a secret message", +}); let encPass = encForm.createPasswordInput({ label: "Password", + placeholder: "Enter your password", enabledFunc: function() {return !encManualKey.value} }); let encPbkdf2Iters = encForm.createNumberInput({ @@ -122,10 +126,12 @@ let decForm = tabs.createForm({label: "Decryption"}); let decMsg = decForm.createTextArea({ label: "Encrypted message", + placeholder: "Paste the encrypted output", dataType: "json-b64", }); let decPass = decForm.createPasswordInput({ label: "Password", + placeholder: "Enter your password", enabledFunc: function() {return !decManualKey.value} }); let decKey = decForm.createMediumTextBox({ diff --git a/scripts/interface.js b/scripts/interface.js index f47a0b3..396c1d7 100644 --- a/scripts/interface.js +++ b/scripts/interface.js @@ -302,7 +302,7 @@ function bufToB64 (buf) { class FormElement extends InterfaceElement { constructor({tag, fragment, advanced=false, form, - value, dataType, + value, dataType, placeholder, labelTag, label="", enabled=true, enabledFunc, visibleFunc @@ -349,6 +349,7 @@ class FormElement extends InterfaceElement { this.advanced = advanced; if (value !== undefined) this.value = value; + if (placeholder !== undefined) this.handle.placeholder = placeholder; } get value() {