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

Add support text to user-following interface. #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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