From 1fcb86cf068167b7cfe7b62eadfa79076877602e Mon Sep 17 00:00:00 2001 From: Midgard Date: Mon, 30 Mar 2020 17:29:43 +0200 Subject: [PATCH] Improve compose textarea styling --- assets/main.css | 1 + main.js | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/main.css b/assets/main.css index 6e16000..70b781b 100644 --- a/assets/main.css +++ b/assets/main.css @@ -175,6 +175,7 @@ ul#server_selection_list { width: 100%; resize: none; overflow: hidden; + padding: 0.2em 0.3em; } #login { diff --git a/main.js b/main.js index 77bbd13..f15e3a7 100644 --- a/main.js +++ b/main.js @@ -390,11 +390,7 @@ function switchToChannel(client, team, channel) { } } - const [title, elements] = channelNameElements(team, channel); - byId("channel_header").innerHTML = ""; - byId("channel_header").append(...elements); byId("channel_contents").innerText = "Loading…"; - client.channelPosts(channel.id) .then(response => { console.info(`Got channel contents of ${channel.id} (${channel.name})`); @@ -404,6 +400,11 @@ function switchToChannel(client, team, channel) { console.error(error); byId("channel_contents").innerText = `Failed to get channel contents:\n${error.message}`; }); + + const [title, elements] = channelNameElements(team, channel); + byId("channel_header").innerHTML = ""; + byId("channel_header").append(...elements); + byId("compose").setAttribute("placeholder", `Write to ${byId("channel_header").textContent}`); } function updateComposeHeight() {