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

Commit

Permalink
make all info circles in preferences clickable
Browse files Browse the repository at this point in the history
fix #5758

Test Plan:
1. go to about:preferences#plugins
2. all the info circle icons should be clickable
  • Loading branch information
diracdeltas committed Mar 23, 2017
1 parent 4cc431b commit 575a62a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/renderer/components/preferences/pluginsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ class PluginsTab extends ImmutableComponent {
aboutActions.setResourceEnabled(widevine, e.target.value)
}

infoCircle (location) {
return <span className='fa fa-info-circle flashInfoIcon'
onClick={aboutActions.newFrame.bind(null, {
location
}, true)} />
}

render () {
const braveWikiLink = 'https://github.com/brave/browser-laptop/wiki'
const flashInfoLink = `${braveWikiLink}/Flash-Support-Deprecation-Proposal#troubleshooting-flash-issues`
return <div>
<div className='sectionTitle' data-l10n-id='pluginSettings' />
<SettingsList>
Expand All @@ -46,7 +54,7 @@ class PluginsTab extends ImmutableComponent {
{
isDarwin() || isWindows()
? <div>
<span className='fa fa-info-circle flashInfoIcon' />
{this.infoCircle(appConfig.flash.installUrl)}
<span data-l10n-id='enableFlashSubtext' />&nbsp;
<span className='linkText' onClick={aboutActions.newFrame.bind(null, {
location: appConfig.flash.installUrl
Expand All @@ -58,13 +66,13 @@ class PluginsTab extends ImmutableComponent {
</div>
}
<div>
<span className='fa fa-info-circle flashInfoIcon' />
{this.infoCircle(flashInfoLink)}
<span data-l10n-id='flashTroubleshooting' />&nbsp;
<span className='linkText'
onClick={aboutActions.newFrame.bind(null, {
location: `${braveWikiLink}/Flash-Support-Deprecation-Proposal#troubleshooting-flash-issues`
location: flashInfoLink
}, true)}
title={`${braveWikiLink}/Flash-Support-Deprecation-Proposal#troubleshooting-flash-issues`}>{'wiki'}</span>.
title={flashInfoLink}>{'wiki'}</span>.
</div>
</div>
</SettingsList>
Expand Down
1 change: 1 addition & 0 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ a {
margin-top: 0;

.flashInfoIcon {
cursor: pointer;
padding: 5px;
}
}
Expand Down

0 comments on commit 575a62a

Please sign in to comment.