Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NcRichContenteditable): Allow to pass in an icon URL #3984

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/components/NcRichContenteditable/NcAutoCompleteResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export default {
type: String,
required: true,
},
iconUrl: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the avatar url, I would also call it avatarUrl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it conflicts with the computed and the CSS avatar option is also called icon so I tried to keep it simple and inline

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could come up with something like predefinedUrl, as we provide here a ready-to-download URL

type: String,
default: null,
},
source: {
type: String,
required: true,
Expand All @@ -78,6 +82,10 @@ export default {
},
computed: {
avatarUrl() {
if (this.iconUrl) {
return this.iconUrl
}

return this.id && this.source === 'users'
? this.getAvatarUrl(this.id, 44)
: null
Expand Down