From ca0d35b133ac04551794e63525f257e73dee7e78 Mon Sep 17 00:00:00 2001 From: Capi Etheriel Date: Mon, 16 Jul 2018 11:02:19 -0300 Subject: [PATCH] Add support text to user-following interface. --- lib/site-positions-component.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/site-positions-component.js b/lib/site-positions-component.js index 046b8fea..2c0b056e 100644 --- a/lib/site-positions-component.js +++ b/lib/site-positions-component.js @@ -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 }) )