Search by userNotes, notes in playerList and friendsList

This commit is contained in:
Natsumi
2025-06-09 09:07:52 +12:00
parent 98c3e43561
commit 5b7da6a91f
8 changed files with 209 additions and 15 deletions

View File

@@ -76,7 +76,7 @@
:placeholder="$t('view.friend_list.filter_placeholder')"
@change="friendsListSearchChange">
<el-option
v-for="type in ['Display Name', 'User Name', 'Rank', 'Status', 'Bio', 'Memo']"
v-for="type in ['Display Name', 'User Name', 'Rank', 'Status', 'Bio', 'Note', 'Memo']"
:key="type"
:label="type"
:value="type"></el-option>
@@ -347,7 +347,7 @@
this.friendsListTable.data = [];
let filters = [...this.friendsListSearchFilters];
if (filters.length === 0) {
filters = ['Display Name', 'Rank', 'Status', 'Bio', 'Memo'];
filters = ['Display Name', 'Rank', 'Status', 'Bio', 'Note', 'Memo'];
}
const results = [];
if (this.friendsListSearch) {
@@ -379,6 +379,9 @@
if (!match && filters.includes('Memo') && ctx.memo) {
match = utils.localeIncludes(ctx.memo, query, this.stringComparer);
}
if (!match && filters.includes('Note') && ctx.ref.note) {
match = utils.localeIncludes(ctx.ref.note, query, this.stringComparer);
}
if (!match && filters.includes('Bio') && ctx.ref.bio) {
match = utils.localeIncludes(ctx.ref.bio, query, this.stringComparer);
}

View File

@@ -814,6 +814,11 @@
</div>
</template>
</el-table-column>
<el-table-column :label="t('table.playerList.note')" width="150" prop="ref.note">
<template #default="scope">
<span v-text="scope.row.ref.note"></span>
</template>
</el-table-column>
</data-tables>
</div>
</div>