mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
Friends list sort language and search rank
This commit is contained in:
+20
-1
@@ -9877,7 +9877,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.data.friendsListSearch = '';
|
$app.data.friendsListSearch = '';
|
||||||
$app.data.friendsListSearchFilterVIP = false;
|
$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 () {
|
$app.methods.friendsListSearchChange = function () {
|
||||||
var filters = this.friendsListSearchFilters;
|
var filters = this.friendsListSearchFilters;
|
||||||
@@ -9921,6 +9921,11 @@ speechSynthesis.getVoices();
|
|||||||
ctx.ref.statusDescription) {
|
ctx.ref.statusDescription) {
|
||||||
match = String(ctx.ref.statusDescription).toUpperCase().includes(query);
|
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) {
|
if (!match) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -9994,6 +9999,20 @@ speechSynthesis.getVoices();
|
|||||||
return a[field].toLowerCase().localeCompare(b[field].toLowerCase());
|
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) {
|
$app.methods.genMd5 = async function (file) {
|
||||||
var response = await AppApi.MD5File(file);
|
var response = await AppApi.MD5File(file);
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
+2
-2
@@ -608,7 +608,7 @@ html
|
|||||||
el-switch(v-model="friendsListSearchFilterVIP" @change="friendsListSearchChange" active-color="#13ce66")
|
el-switch(v-model="friendsListSearchFilterVIP" @change="friendsListSearchChange" active-color="#13ce66")
|
||||||
el-input(v-model="friendsListSearch" placeholder="Search" @change="friendsListSearchChange" clearable style="flex:1")
|
el-input(v-model="friendsListSearch" placeholder="Search" @change="friendsListSearchChange" clearable style="flex:1")
|
||||||
el-select(v-model="friendsListSearchFilters" multiple clearable collapse-tags style="flex:none;width:200px;margin:0 10px" @change="friendsListSearchChange" placeholder="Filter")
|
el-select(v-model="friendsListSearchFilters" multiple clearable collapse-tags style="flex:none;width:200px;margin:0 10px" @change="friendsListSearchChange" placeholder="Filter")
|
||||||
el-option(v-once v-for="type in ['User Name', 'Display Name', 'Status', 'Bio', 'Memo']" :key="type" :label="type" :value="type")
|
el-option(v-once v-for="type in ['Display Name', 'User Name', 'Rank', 'Status', 'Bio', 'Memo']" :key="type" :label="type" :value="type")
|
||||||
el-tooltip(placement="top")
|
el-tooltip(placement="top")
|
||||||
template(#content)
|
template(#content)
|
||||||
span Refresh
|
span Refresh
|
||||||
@@ -633,7 +633,7 @@ html
|
|||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
span.name(v-text="scope.row.$trustLevel" :class="scope.row.$trustClass")
|
span.name(v-text="scope.row.$trustLevel" :class="scope.row.$trustClass")
|
||||||
el-table-column(label="Status" min-width="180" prop="statusDescription" sortable :sort-method="(a, b) => sortAlphabetically(a, b, 'statusDescription')")
|
el-table-column(label="Status" min-width="180" prop="statusDescription" sortable :sort-method="(a, b) => sortAlphabetically(a, b, 'statusDescription')")
|
||||||
el-table-column(label="Language" width="100" prop="$languages")
|
el-table-column(label="Language" width="100" prop="$languages" sortable :sort-method="(a, b) => sortLanguages(a, b)")
|
||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
el-tooltip(v-for="item in scope.row.$languages" :key="item.key" placement="top")
|
el-tooltip(v-for="item in scope.row.$languages" :key="item.key" placement="top")
|
||||||
template(#content)
|
template(#content)
|
||||||
|
|||||||
Reference in New Issue
Block a user