no uppercase remote avatar search

This commit is contained in:
Natsumi
2025-05-23 18:02:04 +10:00
parent 523c5052b4
commit 84a985f42d

View File

@@ -581,7 +581,8 @@
searchAvatarSort.value = 'name';
}
const avatars = new Map();
const query = props.searchText.toUpperCase();
const query = props.searchText;
const queryUpper = query.toUpperCase();
if (!query) {
for (ref of API.cachedAvatars.values()) {
switch (searchAvatarFilter.value) {
@@ -604,12 +605,12 @@
} else {
if (searchAvatarFilterRemote.value === 'all' || searchAvatarFilterRemote.value === 'local') {
for (ref of API.cachedAvatars.values()) {
let match = ref.name.toUpperCase().includes(query);
let match = ref.name.toUpperCase().includes(queryUpper);
if (!match && ref.description) {
match = ref.description.toUpperCase().includes(query);
match = ref.description.toUpperCase().includes(queryUpper);
}
if (!match && ref.authorName) {
match = ref.authorName.toUpperCase().includes(query);
match = ref.authorName.toUpperCase().includes(queryUpper);
}
if (match) {
switch (searchAvatarFilter.value) {