mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Friends list sort language and search rank
This commit is contained in:
@@ -9877,7 +9877,7 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.data.friendsListSearch = '';
|
||||
$app.data.friendsListSearchFilterVIP = false;
|
||||
$app.data.friendsListSearchFilters = [ 'User Name', 'Display Name', 'Status', 'Bio', 'Memo' ];
|
||||
$app.data.friendsListSearchFilters = [ 'Display Name', 'User Name', 'Rank', 'Status', 'Bio', 'Memo' ];
|
||||
|
||||
$app.methods.friendsListSearchChange = function () {
|
||||
var filters = this.friendsListSearchFilters;
|
||||
@@ -9921,6 +9921,11 @@ speechSynthesis.getVoices();
|
||||
ctx.ref.statusDescription) {
|
||||
match = String(ctx.ref.statusDescription).toUpperCase().includes(query);
|
||||
}
|
||||
if (!match &&
|
||||
filters.includes('Rank') &&
|
||||
ctx.ref.$friendNum) {
|
||||
match = String(ctx.ref.$trustLevel).toUpperCase().includes(query);
|
||||
}
|
||||
if (!match) {
|
||||
continue;
|
||||
}
|
||||
@@ -9994,6 +9999,20 @@ speechSynthesis.getVoices();
|
||||
return a[field].toLowerCase().localeCompare(b[field].toLowerCase());
|
||||
};
|
||||
|
||||
$app.methods.sortLanguages = function (a, b) {
|
||||
var sortedA = [];
|
||||
var sortedB = [];
|
||||
a.$languages.forEach((item) => {
|
||||
sortedA.push(item.value);
|
||||
});
|
||||
b.$languages.forEach((item) => {
|
||||
sortedB.push(item.value);
|
||||
});
|
||||
sortedA.sort();
|
||||
sortedB.sort();
|
||||
return JSON.stringify(sortedA).localeCompare(JSON.stringify(sortedB));
|
||||
};
|
||||
|
||||
$app.methods.genMd5 = async function (file) {
|
||||
var response = await AppApi.MD5File(file);
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user