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" />
|
<input id="rm_group_automode" type="checkbox" />
|
||||||
<span data-i18n="Auto Mode">Auto Mode</span>
|
<span data-i18n="Auto Mode">Auto Mode</span>
|
||||||
</label>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { getContext, getApiUrl, modules, extension_settings, ModuleWorkerWrapper
|
||||||
import { loadMovingUIState, power_user } from "../../power-user.js";
|
import { loadMovingUIState, power_user } from "../../power-user.js";
|
||||||
import { registerSlashCommand } from "../../slash-commands.js";
|
import { registerSlashCommand } from "../../slash-commands.js";
|
||||||
import { onlyUnique, debounce, getCharaFilename, trimToEndSentence, trimToStartSentence } from "../../utils.js";
|
import { onlyUnique, debounce, getCharaFilename, trimToEndSentence, trimToStartSentence } from "../../utils.js";
|
||||||
|
import { hideMutedSprites } from "../../group-chats.js";
|
||||||
export { MODULE_NAME };
|
export { MODULE_NAME };
|
||||||
|
|
||||||
const MODULE_NAME = 'expressions';
|
const MODULE_NAME = 'expressions';
|
||||||
|
@ -118,7 +119,7 @@ async function visualNovelSetCharacterSprites(container, name, expression) {
|
||||||
const isDisabled = group.disabled_members.includes(avatar);
|
const isDisabled = group.disabled_members.includes(avatar);
|
||||||
|
|
||||||
// skip disabled characters
|
// skip disabled characters
|
||||||
if (isDisabled) {
|
if (isDisabled && hideMutedSprites) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ import { FILTER_TYPES, FilterHelper } from './filters.js';
|
||||||
export {
|
export {
|
||||||
selected_group,
|
selected_group,
|
||||||
is_group_automode_enabled,
|
is_group_automode_enabled,
|
||||||
|
hideMutedSprites,
|
||||||
is_group_generating,
|
is_group_generating,
|
||||||
group_generation_id,
|
group_generation_id,
|
||||||
groups,
|
groups,
|
||||||
|
@ -92,6 +93,7 @@ export {
|
||||||
|
|
||||||
let is_group_generating = false; // Group generation flag
|
let is_group_generating = false; // Group generation flag
|
||||||
let is_group_automode_enabled = false;
|
let is_group_automode_enabled = false;
|
||||||
|
let hideMutedSprites = true;
|
||||||
let groups = [];
|
let groups = [];
|
||||||
let selected_group = null;
|
let selected_group = null;
|
||||||
let group_generation_id = null;
|
let group_generation_id = null;
|
||||||
|
@ -1172,7 +1174,7 @@ function printGroupCandidates() {
|
||||||
|
|
||||||
function printGroupMembers() {
|
function printGroupMembers() {
|
||||||
const storageKey = 'GroupMembers_PerPage';
|
const storageKey = 'GroupMembers_PerPage';
|
||||||
$(".rm_group_members_pagination").each(function() {
|
$(".rm_group_members_pagination").each(function () {
|
||||||
$(this).pagination({
|
$(this).pagination({
|
||||||
dataSource: getGroupCharacters({ doFilter: false, onlyMembers: true }),
|
dataSource: getGroupCharacters({ doFilter: false, onlyMembers: true }),
|
||||||
pageRange: 1,
|
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) {
|
function select_group_chats(groupId, skipAnimation) {
|
||||||
openGroupId = groupId;
|
openGroupId = groupId;
|
||||||
newGroupMembers = [];
|
newGroupMembers = [];
|
||||||
|
@ -1287,6 +1298,7 @@ function select_group_chats(groupId, skipAnimation) {
|
||||||
const groupHasMembers = !!$("#rm_group_members").children().length;
|
const groupHasMembers = !!$("#rm_group_members").children().length;
|
||||||
$("#rm_group_submit").prop("disabled", !groupHasMembers);
|
$("#rm_group_submit").prop("disabled", !groupHasMembers);
|
||||||
$("#rm_group_allow_self_responses").prop("checked", group && group.allow_self_responses);
|
$("#rm_group_allow_self_responses").prop("checked", group && group.allow_self_responses);
|
||||||
|
$("#rm_group_hidemutedsprites").prop("checked", group && group.hideMutedSprites);
|
||||||
|
|
||||||
// bottom buttons
|
// bottom buttons
|
||||||
if (openGroupId) {
|
if (openGroupId) {
|
||||||
|
@ -1517,6 +1529,7 @@ async function createGroup() {
|
||||||
members: members,
|
members: members,
|
||||||
avatar_url: isValidImageUrl(avatar_url) ? avatar_url : default_avatar,
|
avatar_url: isValidImageUrl(avatar_url) ? avatar_url : default_avatar,
|
||||||
allow_self_responses: allowSelfResponses,
|
allow_self_responses: allowSelfResponses,
|
||||||
|
hideMutedSprites: hideMutedSprites,
|
||||||
activation_strategy: activationStrategy,
|
activation_strategy: activationStrategy,
|
||||||
generation_mode: generationMode,
|
generation_mode: generationMode,
|
||||||
disabled_members: [],
|
disabled_members: [],
|
||||||
|
@ -1784,6 +1797,12 @@ jQuery(() => {
|
||||||
is_group_automode_enabled = value;
|
is_group_automode_enabled = value;
|
||||||
eventSource.once(event_types.GENERATION_STOPPED, stopAutoModeGeneration);
|
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);
|
$("#send_textarea").on("keyup", onSendTextareaInput);
|
||||||
$("#groupCurrentMemberPopoutButton").on('click', doCurMemberListPopout);
|
$("#groupCurrentMemberPopoutButton").on('click', doCurMemberListPopout);
|
||||||
$("#rm_group_chat_name").on("input", onGroupNameInput)
|
$("#rm_group_chat_name").on("input", onGroupNameInput)
|
||||||
|
|
Loading…
Reference in New Issue