diff --git a/dev/init.js b/dev/init.js
index 5567427..c0488a7 100644
--- a/dev/init.js
+++ b/dev/init.js
@@ -109,7 +109,7 @@ async function sendMessage(message, optionalFiles) {
async function reportMessage(messageId, payload, message) {
console.log("messageId " + messageId);
console.log("message " + message);
- console.log("payload :>> ", JSON.parse(payload));
+ console.log("payload :>> ", payload);
}
const chat = TarkaChat.init({
diff --git a/src/layout.html b/src/layout.html
index 9bf11e2..faa6577 100644
--- a/src/layout.html
+++ b/src/layout.html
@@ -10,13 +10,14 @@
diff --git a/src/main.js b/src/main.js
index 9c50ceb..1d99a6e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -194,6 +194,11 @@ export default {
const msgInput = document.querySelector("#tarka-chat .chat-input");
const cancelButton = document.querySelector(".cancel-btn");
const reportButton = document.querySelector(".report-btn");
+ const reportText = document.querySelector(".report-dialog .report-text");
+
+ reportText.addEventListener("input", (e) => {
+ reportButton.disabled = reportText.value === "";
+ });
cancelButton.addEventListener("click", () => {
const messageContainer = document.querySelector(
@@ -201,8 +206,8 @@ export default {
);
const footer = document.querySelector(".footer");
const reportDialog = document.querySelector(".report-dialog");
- const reportText = document.querySelector(".report-dialog .report-text");
reportText.value = "";
+ reportButton.disabled = true;
reportDialog.style.display = "none";
messageContainer.classList.remove("blur-background");
footer.classList.remove("blur-background");
@@ -226,6 +231,8 @@ export default {
JSON.parse(wrapper.getAttribute("data-payload")),
reportMessageInput.value,
);
+ reportText.value = "";
+ reportButton.disabled = true;
reportDialog.style.display = "none";
messageContainer.classList.remove("blur-background");
footer.classList.remove("blur-background");
diff --git a/src/style.scss b/src/style.scss
index f110217..6461b16 100644
--- a/src/style.scss
+++ b/src/style.scss
@@ -294,6 +294,10 @@
margin-left: 10px;
border: 1px solid var(--primary-primary, #9500b3);
border-radius: 5px;
+
+ &:disabled {
+ background-color: grey;
+ }
}
}
}