FEATURE: Setting to hide current user from directory (#1)

This commit is contained in:
David Taylor 2020-11-24 20:08:20 +00:00 committed by GitHub
parent b2bb6a3790
commit c4ae5cd32c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -55,6 +55,9 @@ export default {
userCards(allUsers) {
if (!allUsers) return [];
const toLoad = [];
if (settings.hide_current_user && this.currentUser) {
allUsers = allUsers.filter((u) => u.id !== this.currentUser.id)
}
const userCardInfos = allUsers.map(u => {
if (this.cachedUserCardInfo[u.id]) {
return this.cachedUserCardInfo[u.id];

View File

@ -1,4 +1,6 @@
en:
theme_metadata:
description: Replaces the user directory with a grid of user cards
filter_by_group: filter by group
settings:
hide_current_user: Always hide the current user from the grid
filter_by_group: filter by group

1
settings.yml Normal file
View File

@ -0,0 +1 @@
hide_current_user: false