Add user search by bio and sort results by last logged in (#39)

This commit is contained in:
Elian
2025-02-23 17:28:40 +02:00
committed by Natsumi
parent dfc0023deb
commit 7adfc722f1
3 changed files with 13 additions and 3 deletions
+8 -2
View File
@@ -833,8 +833,9 @@ console.log(`isLinux: ${LINUX}`);
* n: number,
* offset: number,
* search: string,
* sort: 'nuisanceFactor' | 'created' | '_created_at' | 'last_login',
* sort: 'nuisanceFactor' | 'created' | '_created_at' | 'last_login' | 'relevance',
* order: 'ascending', 'descending'
* customFields: 'bio', 'displayName'
}} GetUsersParameters */
/**
* Fetch multiple users from API.
@@ -6671,7 +6672,9 @@ console.log(`isLinux: ${LINUX}`);
this.searchUserParams = {
n: 10,
offset: 0,
search: this.searchText
search: this.searchText,
customFields: this.searchUserByBio ? "bio" : "displayName",
sort: this.searchUserSortByLastLoggedIn ? "last_login" : "relevance"
};
await this.moreSearchUser();
};
@@ -6704,6 +6707,9 @@ console.log(`isLinux: ${LINUX}`);
$app.data.searchWorldLabs = false;
$app.data.searchUserByBio = false;
$app.data.searchUserSortByLastLoggedIn = false;
$app.methods.searchWorld = function (ref) {
this.searchWorldOption = '';
var params = {