mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add more safeties
This commit is contained in:
@ -315,7 +315,7 @@ function checkOnlineStatus() {
|
|||||||
$("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message
|
$("#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
|
$("#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
|
$("#send_but").css("display", "inline"); //on connect, send button shows up
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -921,7 +921,7 @@ async function Generate(type, automatic_trigger) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected_group) {
|
if (selected_group && !is_group_generating) {
|
||||||
generateGroupWrapper(false);
|
generateGroupWrapper(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2844,6 +2844,10 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("click", ".character_select", function () {
|
$(document).on("click", ".character_select", function () {
|
||||||
|
if (selected_group && is_group_generating) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this_chid !== $(this).attr("chid")) {
|
if (this_chid !== $(this).attr("chid")) {
|
||||||
//if clicked on a different character from what was currently selected
|
//if clicked on a different character from what was currently selected
|
||||||
if (!is_send_press) {
|
if (!is_send_press) {
|
||||||
|
@ -20,6 +20,7 @@ import {
|
|||||||
} from "../script.js";
|
} from "../script.js";
|
||||||
|
|
||||||
import { LoadLocal, SaveLocal, ClearLocal, CheckLocal, LoadLocalBool } from "./f-localStorage.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 NavToggle = document.getElementById("nav-toggle");
|
||||||
var PanelPin = document.getElementById("rm_button_panel_pin");
|
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_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
|
$("#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
|
$("#send_but").css("display", "inline"); //on connect, send button shows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,6 +533,11 @@ function select_group_chats(chat_id) {
|
|||||||
|
|
||||||
$("#rm_group_delete").off();
|
$("#rm_group_delete").off();
|
||||||
$("#rm_group_delete").on("click", function () {
|
$("#rm_group_delete").on("click", function () {
|
||||||
|
if (is_group_generating) {
|
||||||
|
callPopup('<h3>Not so fast! Wait for the characters to stop typing before deleting the group.</h3>', 'text');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$("#dialogue_popup").data("group_id", chat_id);
|
$("#dialogue_popup").data("group_id", chat_id);
|
||||||
callPopup("<h3>Delete the group?</h3>", "del_group");
|
callPopup("<h3>Delete the group?</h3>", "del_group");
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user