diff --git a/public/script.js b/public/script.js index 050dc6767..c83864aa3 100644 --- a/public/script.js +++ b/public/script.js @@ -315,7 +315,7 @@ function checkOnlineStatus() { $("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message $("#send_form").css("background-color", "rgba(0,0,0,0.7)"); //on connect, form BG changes to transprent black - if (!is_send_press) { + if (!is_send_press && !(selected_group && is_group_generating)) { $("#send_but").css("display", "inline"); //on connect, send button shows up } @@ -921,7 +921,7 @@ async function Generate(type, automatic_trigger) { return; } - if (selected_group) { + if (selected_group && !is_group_generating) { generateGroupWrapper(false); return; } @@ -2844,6 +2844,10 @@ $(document).ready(function () { }); $(document).on("click", ".character_select", function () { + if (selected_group && is_group_generating) { + return; + } + if (this_chid !== $(this).attr("chid")) { //if clicked on a different character from what was currently selected if (!is_send_press) { diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 894a056ad..94bbdebc8 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -20,6 +20,7 @@ import { } from "../script.js"; import { LoadLocal, SaveLocal, ClearLocal, CheckLocal, LoadLocalBool } from "./f-localStorage.js"; +import { selected_group, is_group_generating } from "./group-chats.js"; var NavToggle = document.getElementById("nav-toggle"); var PanelPin = document.getElementById("rm_button_panel_pin"); @@ -192,7 +193,7 @@ function RA_checkOnlineStatus() { $("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message $("#send_form").css("background-color", "rgba(0,0,0,0.7)"); //on connect, form BG changes to transprent black - if (!is_send_press) { + if (!is_send_press && !(selected_group && is_group_generating)) { $("#send_but").css("display", "inline"); //on connect, send button shows } } diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 0bb69ea72..0a302500f 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -533,6 +533,11 @@ function select_group_chats(chat_id) { $("#rm_group_delete").off(); $("#rm_group_delete").on("click", function () { + if (is_group_generating) { + callPopup('

Not so fast! Wait for the characters to stop typing before deleting the group.

', 'text'); + return; + } + $("#dialogue_popup").data("group_id", chat_id); callPopup("

Delete the group?

", "del_group"); });