Merge branch 'staging' of https://github.com/SillyTavern/SillyTavern into staging
This commit is contained in:
commit
63e5bc9341
|
@ -3510,6 +3510,10 @@
|
|||
<input id="rm_group_automode" type="checkbox" />
|
||||
<span data-i18n="Auto Mode">Auto Mode</span>
|
||||
</label>
|
||||
<label id="rm_group_hidemutedsprites_label" class="checkbox_label whitespacenowrap">
|
||||
<input id="rm_group_hidemutedsprites" type="checkbox" />
|
||||
<span data-i18n="Hide Muted Member Sprites">Hide Muted Member Sprites</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4843,4 +4847,4 @@
|
|||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
|
@ -4,6 +4,7 @@ import { getContext, getApiUrl, modules, extension_settings, ModuleWorkerWrapper
|
|||
import { loadMovingUIState, power_user } from "../../power-user.js";
|
||||
import { registerSlashCommand } from "../../slash-commands.js";
|
||||
import { onlyUnique, debounce, getCharaFilename, trimToEndSentence, trimToStartSentence } from "../../utils.js";
|
||||
import { hideMutedSprites } from "../../group-chats.js";
|
||||
export { MODULE_NAME };
|
||||
|
||||
const MODULE_NAME = 'expressions';
|
||||
|
@ -118,7 +119,7 @@ async function visualNovelSetCharacterSprites(container, name, expression) {
|
|||
const isDisabled = group.disabled_members.includes(avatar);
|
||||
|
||||
// skip disabled characters
|
||||
if (isDisabled) {
|
||||
if (isDisabled && hideMutedSprites) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ import { FILTER_TYPES, FilterHelper } from './filters.js';
|
|||
export {
|
||||
selected_group,
|
||||
is_group_automode_enabled,
|
||||
hideMutedSprites,
|
||||
is_group_generating,
|
||||
group_generation_id,
|
||||
groups,
|
||||
|
@ -92,6 +93,7 @@ export {
|
|||
|
||||
let is_group_generating = false; // Group generation flag
|
||||
let is_group_automode_enabled = false;
|
||||
let hideMutedSprites = true;
|
||||
let groups = [];
|
||||
let selected_group = null;
|
||||
let group_generation_id = null;
|
||||
|
@ -1172,7 +1174,7 @@ function printGroupCandidates() {
|
|||
|
||||
function printGroupMembers() {
|
||||
const storageKey = 'GroupMembers_PerPage';
|
||||
$(".rm_group_members_pagination").each(function() {
|
||||
$(".rm_group_members_pagination").each(function () {
|
||||
$(this).pagination({
|
||||
dataSource: getGroupCharacters({ doFilter: false, onlyMembers: true }),
|
||||
pageRange: 1,
|
||||
|
@ -1258,6 +1260,15 @@ async function onGroupSelfResponsesClick() {
|
|||
}
|
||||
}
|
||||
|
||||
async function onHideMutedSpritesClick(value) {
|
||||
if (openGroupId) {
|
||||
let _thisGroup = groups.find((x) => x.id == openGroupId);
|
||||
_thisGroup.hideMutedSprites = value;
|
||||
console.log(`_thisGroup.hideMutedSprites = ${_thisGroup.hideMutedSprites}`)
|
||||
await editGroup(openGroupId, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
function select_group_chats(groupId, skipAnimation) {
|
||||
openGroupId = groupId;
|
||||
newGroupMembers = [];
|
||||
|
@ -1287,6 +1298,7 @@ function select_group_chats(groupId, skipAnimation) {
|
|||
const groupHasMembers = !!$("#rm_group_members").children().length;
|
||||
$("#rm_group_submit").prop("disabled", !groupHasMembers);
|
||||
$("#rm_group_allow_self_responses").prop("checked", group && group.allow_self_responses);
|
||||
$("#rm_group_hidemutedsprites").prop("checked", group && group.hideMutedSprites);
|
||||
|
||||
// bottom buttons
|
||||
if (openGroupId) {
|
||||
|
@ -1517,6 +1529,7 @@ async function createGroup() {
|
|||
members: members,
|
||||
avatar_url: isValidImageUrl(avatar_url) ? avatar_url : default_avatar,
|
||||
allow_self_responses: allowSelfResponses,
|
||||
hideMutedSprites: hideMutedSprites,
|
||||
activation_strategy: activationStrategy,
|
||||
generation_mode: generationMode,
|
||||
disabled_members: [],
|
||||
|
@ -1784,6 +1797,12 @@ jQuery(() => {
|
|||
is_group_automode_enabled = value;
|
||||
eventSource.once(event_types.GENERATION_STOPPED, stopAutoModeGeneration);
|
||||
});
|
||||
$("#rm_group_hidemutedsprites").on("input", function () {
|
||||
const value = $(this).prop("checked");
|
||||
hideMutedSprites = value;
|
||||
onHideMutedSpritesClick(value);
|
||||
|
||||
});
|
||||
$("#send_textarea").on("keyup", onSendTextareaInput);
|
||||
$("#groupCurrentMemberPopoutButton").on('click', doCurMemberListPopout);
|
||||
$("#rm_group_chat_name").on("input", onGroupNameInput)
|
||||
|
|
Loading…
Reference in New Issue