Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Commit

Permalink
Fix people selector
Browse files Browse the repository at this point in the history
  • Loading branch information
arj03 committed Aug 19, 2020
1 parent 2c37a5a commit 54e4096
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ssb-sort": "^1.1.3",
"vue": "^2.6.11",
"vue-router": "^3.4.2",
"vue-select": "^3.9.5",
"vue-select": "^3.10.8",
"workbox-build": "^4.3.1"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions ui/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ exports.getPeople = function(cb) {
for (var id in profiles) {
const profile = profiles[id]
if (profile.image) {
const profileId = id
SSB.net.blobs.localGet(profile.image, (err, url) => {
people.push({
id,
name: profile.name || id,
id: profileId,
name: profile.name || profileId,
image: err ? '' : url
})
})
Expand Down
6 changes: 3 additions & 3 deletions ui/private.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ module.exports = function (componentsState) {
template: `<div id="private">
<span v-if="postMessageVisible">
<v-select placeholder="recipients" multiple v-model="recipients" :options="people" label="name">
<template slot="option" slot-scope="option">
<img v-if='option.image' class="tinyAvatar" :src='option.image' />
<span>{{ option.name }}</span>
<template #option="{ name, image }">
<img v-if='image' class="tinyAvatar" :src='image' />
<span>{{ name }}</span>
</template>
</v-select>
<input type="text" id="subject" v-model="subject" placeholder="subject" />
Expand Down

0 comments on commit 54e4096

Please sign in to comment.