From feab14a5be8e69120bb31e2ea6a1c69a3e141593 Mon Sep 17 00:00:00 2001 From: Radon Date: Mon, 20 Jan 2025 17:41:36 -0600 Subject: [PATCH] changes --- content/root.css | 3 +++ content/root.js | 9 +++++++++ readme.md | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/content/root.css b/content/root.css index 6d3e92c..aaef1bd 100644 --- a/content/root.css +++ b/content/root.css @@ -290,6 +290,7 @@ button.scroll { border-radius: 4px; border: none; background-color: var(--input-button-inactive-bg); + fill: var(--input-button-inactive-fg); padding: 10px; cursor: pointer; } @@ -302,10 +303,12 @@ button.scroll:hover { width: 14px; height: 14px; fill: var(--var-input-button-inactive-fg); + color: var(--var-input-button-inactive-fg); } .scroll-icon:hover { fill: var(--var-input-button-active-fg); + color: var(--var-input-button-active-fg); } .radchat { diff --git a/content/root.js b/content/root.js index 77df7ba..1b6773d 100644 --- a/content/root.js +++ b/content/root.js @@ -290,6 +290,7 @@ async function setUsername() { } } +let lastMessage = ""; async function sendMessage() { const messageInput = document.getElementById("message"); const message = messageInput.value; @@ -298,6 +299,7 @@ async function sendMessage() { } try { + lastMessage = message; const response = await fetch("/messages", { method: "PUT", headers: { @@ -393,6 +395,13 @@ function initializeTheme() { } } +document.addEventListener("keyup", function (event) { + const inputPanel = document.getElementById("message"); + if (inputPanel.contains(event.target) && event.key === "ArrowUp") { + inputPanel.value = lastMessage; + } +}); + async function initialize() { usersPanel = document.getElementById("users-panel"); if (usersPanel) { diff --git a/readme.md b/readme.md index 4e19dab..32c11e4 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,9 @@ # Changes To Make ## Frontend ### High Priority -- Change light mode scroll down arrow svg fill color? to the buttom inactive fg color +- Nothing yet ### Mid Priority -- Up arrow in textarea should bring up last input +- Nothing yet ### Low Priority - Mobile formatting @media - First click of user list does not register