mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Add user search by bio and sort results by last logged in (#39)
This commit is contained in:
+8
-2
@@ -833,8 +833,9 @@ console.log(`isLinux: ${LINUX}`);
|
|||||||
* n: number,
|
* n: number,
|
||||||
* offset: number,
|
* offset: number,
|
||||||
* search: string,
|
* search: string,
|
||||||
* sort: 'nuisanceFactor' | 'created' | '_created_at' | 'last_login',
|
* sort: 'nuisanceFactor' | 'created' | '_created_at' | 'last_login' | 'relevance',
|
||||||
* order: 'ascending', 'descending'
|
* order: 'ascending', 'descending'
|
||||||
|
* customFields: 'bio', 'displayName'
|
||||||
}} GetUsersParameters */
|
}} GetUsersParameters */
|
||||||
/**
|
/**
|
||||||
* Fetch multiple users from API.
|
* Fetch multiple users from API.
|
||||||
@@ -6671,7 +6672,9 @@ console.log(`isLinux: ${LINUX}`);
|
|||||||
this.searchUserParams = {
|
this.searchUserParams = {
|
||||||
n: 10,
|
n: 10,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
search: this.searchText
|
search: this.searchText,
|
||||||
|
customFields: this.searchUserByBio ? "bio" : "displayName",
|
||||||
|
sort: this.searchUserSortByLastLoggedIn ? "last_login" : "relevance"
|
||||||
};
|
};
|
||||||
await this.moreSearchUser();
|
await this.moreSearchUser();
|
||||||
};
|
};
|
||||||
@@ -6704,6 +6707,9 @@ console.log(`isLinux: ${LINUX}`);
|
|||||||
|
|
||||||
$app.data.searchWorldLabs = false;
|
$app.data.searchWorldLabs = false;
|
||||||
|
|
||||||
|
$app.data.searchUserByBio = false;
|
||||||
|
$app.data.searchUserSortByLastLoggedIn = false;
|
||||||
|
|
||||||
$app.methods.searchWorld = function (ref) {
|
$app.methods.searchWorld = function (ref) {
|
||||||
this.searchWorldOption = '';
|
this.searchWorldOption = '';
|
||||||
var params = {
|
var params = {
|
||||||
|
|||||||
@@ -74,7 +74,9 @@
|
|||||||
"search_placeholder": "Search",
|
"search_placeholder": "Search",
|
||||||
"clear_results_tooltip": "Clear Search Results",
|
"clear_results_tooltip": "Clear Search Results",
|
||||||
"user": {
|
"user": {
|
||||||
"header": "User"
|
"header": "User",
|
||||||
|
"search_by_bio": "Search by bio",
|
||||||
|
"sort_by_last_logged_in": "Sort by last logged in"
|
||||||
},
|
},
|
||||||
"world": {
|
"world": {
|
||||||
"header": "World",
|
"header": "World",
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ mixin searchTab
|
|||||||
style='flex: none; margin-left: 10px')
|
style='flex: none; margin-left: 10px')
|
||||||
el-tabs(ref='searchTab' type='card' style='margin-top: 15px' @tab-click='searchText = ""')
|
el-tabs(ref='searchTab' type='card' style='margin-top: 15px' @tab-click='searchText = ""')
|
||||||
el-tab-pane(:label='$t("view.search.user.header")' v-loading='isSearchUserLoading' style='min-height: 60px')
|
el-tab-pane(:label='$t("view.search.user.header")' v-loading='isSearchUserLoading' style='min-height: 60px')
|
||||||
|
el-checkbox(v-model='searchUserByBio' style='margin-left: 10px') {{ $t('view.search.user.search_by_bio') }}
|
||||||
|
el-checkbox(v-model='searchUserSortByLastLoggedIn' style='margin-left: 10px') {{ $t('view.search.user.sort_by_last_logged_in') }}
|
||||||
.x-friend-list(style='min-height: 500px')
|
.x-friend-list(style='min-height: 500px')
|
||||||
.x-friend-item(v-for='user in searchUserResults' :key='user.id' @click='showUserDialog(user.id)')
|
.x-friend-item(v-for='user in searchUserResults' :key='user.id' @click='showUserDialog(user.id)')
|
||||||
template
|
template
|
||||||
|
|||||||
Reference in New Issue
Block a user