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

Commit

Permalink
Add support text to user-following interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
barraponto committed Jul 16, 2018
1 parent 55ee31d commit ca0d35b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/site-positions-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ class SitePositionsComponent {
const {login} = portal.getSiteIdentity(siteId)
const color = this.isCursorVisibleForSite(siteId) ? `color--site-${siteId}` : ''
const location = this.getLocationForSite(siteId)
const following = portal.getFollowedSiteId() === siteId
const onClick = (location === 'viewing-non-portal-item')
? () => {}
: () => this.onSelectSiteId(siteId)

return $.div({className: `SitePositionsComponent-site site-${siteId} ${location} ${color}`},
(portal.getFollowedSiteId() === siteId) ? $.div({className: 'icon icon-link'}) : null,
(following) ? $.div({className: 'icon icon-link'}) : null,
$.img({
src: getAvatarURL(login, 80),
title: `Click to ${following ? 'stop' : 'start'} following this user.`,
onClick
})
)
Expand Down

0 comments on commit ca0d35b

Please sign in to comment.