From 6a403e1fd96b12debc71bbc51a4926029fe1018f Mon Sep 17 00:00:00 2001 From: Alain Takoudjou Date: Fri, 11 Dec 2020 18:28:17 +0100 Subject: [PATCH] Set temporary placeholder for input area. Co-authored-by: Juliusz Chroboczek --- static/galene.css | 4 ++++ static/galene.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/static/galene.css b/static/galene.css index 6b6f9e2..b813144 100644 --- a/static/galene.css +++ b/static/galene.css @@ -328,6 +328,10 @@ textarea.form-reply { transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; } +.form-reply::placeholder { + opacity: .7; +} + .select { display: block; width: 100%; diff --git a/static/galene.js b/static/galene.js index d05f907..81e8c36 100644 --- a/static/galene.js +++ b/static/galene.js @@ -1481,6 +1481,11 @@ async function gotJoined(kind, group, perms, message) { displayUsername(); setButtonsVisibility(); + let input = /** @type{HTMLTextAreaElement} */ + (document.getElementById('input')); + input.placeholder = 'Type /help for help'; + setTimeout(() => {input.placeholder = '';}, 8000); + this.request(getSettings().request); if(serverConnection.permissions.present && !findUpMedia('local')) {