fix(sharing): show user display name and avatar when displaying search results

Resolves https://community.vikunja.io/t/autogenerated-username-using-google-openid/2183/12
This commit is contained in:
kolaente 2024-04-02 14:29:22 +02:00
parent 6f366d4907
commit bf5088e546
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 17 additions and 1 deletions

View File

@ -16,7 +16,22 @@
:search-results="found"
:label="searchLabel"
@search="find"
/>
>
<template #searchResult="{option: result}">
<User
v-if="shareType === 'user'"
:avatar-size="24"
:show-username="true"
:user="result"
/>
<span
v-else
class="search-result"
>
{{ result.name }}
</span>
</template>
</Multiselect>
</p>
<p class="control">
<x-button @click="add()">
@ -173,6 +188,7 @@ import Nothing from '@/components/misc/nothing.vue'
import {success} from '@/message'
import {useAuthStore} from '@/stores/auth'
import {useConfigStore} from '@/stores/config'
import User from '@/components/misc/user.vue'
// FIXME: I think this whole thing can now only manage user/team sharing for projects? Maybe remove a little generalization?