mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix group candidates search. Fix tag exclusion filter display
This commit is contained in:
@@ -3274,7 +3274,7 @@
|
|||||||
<div class="inline-drawer-content">
|
<div class="inline-drawer-content">
|
||||||
<div name="Unadded Char List" class="flex-container flexFlowColumn overflowYAuto flex1">
|
<div name="Unadded Char List" class="flex-container flexFlowColumn overflowYAuto flex1">
|
||||||
<div id="rm_group_add_members_header">
|
<div id="rm_group_add_members_header">
|
||||||
<input id="rm_group_filter" class="text_pole margin0" type="search" data-i18n="[placeholder]Filter..." placeholder="Filter..." maxlength="100" />
|
<input id="rm_group_filter" class="text_pole margin0" type="search" data-i18n="[placeholder]Search..." placeholder="Search..." maxlength="100" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rm_tag_controls">
|
<div class="rm_tag_controls">
|
||||||
<div class="tags rm_tag_filter"></div>
|
<div class="tags rm_tag_filter"></div>
|
||||||
|
@@ -63,8 +63,8 @@ import {
|
|||||||
getCropPopup,
|
getCropPopup,
|
||||||
system_avatar,
|
system_avatar,
|
||||||
} from "../script.js";
|
} from "../script.js";
|
||||||
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect, tag_map } from './tags.js';
|
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect, tag_map, printTagFilters } from './tags.js';
|
||||||
import { FilterHelper } from './filters.js';
|
import { FILTER_TYPES, FilterHelper } from './filters.js';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
selected_group,
|
selected_group,
|
||||||
@@ -1276,16 +1276,8 @@ function openCharacterDefinition(characterSelect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function filterGroupMembers() {
|
function filterGroupMembers() {
|
||||||
const searchValue = $(this).val().trim().toLowerCase();
|
const searchValue = $(this).val().toLowerCase();
|
||||||
|
groupCandidatesFilter.setFilterData(FILTER_TYPES.SEARCH, searchValue);
|
||||||
if (!searchValue) {
|
|
||||||
$("#rm_group_add_members .group_member").removeClass('hiddenBySearch');
|
|
||||||
} else {
|
|
||||||
$("#rm_group_add_members .group_member").each(function () {
|
|
||||||
const isValidSearch = $(this).find(".ch_name").text().toLowerCase().includes(searchValue);
|
|
||||||
$(this).toggleClass('hiddenBySearch', !isValidSearch);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createGroup() {
|
async function createGroup() {
|
||||||
|
@@ -285,8 +285,8 @@ function appendTagToList(listElement, tag, { removable, selectable, action, isGe
|
|||||||
tagElement.find('.tag_name').text('').attr('title', tag.name).addClass(tag.icon);
|
tagElement.find('.tag_name').text('').attr('title', tag.name).addClass(tag.icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.excluded) {
|
if (tag.excluded && isGeneralList) {
|
||||||
isGeneralList ? $(tagElement).addClass('excluded') : $(listElement).closest('.character_select, .group_select').addClass('hiddenByTag');
|
$(tagElement).addClass('excluded');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectable) {
|
if (selectable) {
|
||||||
|
@@ -3977,13 +3977,6 @@ a {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hiddenByTag,
|
|
||||||
.hiddenByFav,
|
|
||||||
.hiddenByGroup,
|
|
||||||
.hiddenBySearch {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Message images */
|
/* Message images */
|
||||||
.mes .mes_img_container {
|
.mes .mes_img_container {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
Reference in New Issue
Block a user