diff --git a/js/components/siteInfo.js b/js/components/siteInfo.js index 16e39b74cc1..7a15a60de5d 100644 --- a/js/components/siteInfo.js +++ b/js/components/siteInfo.js @@ -61,9 +61,9 @@ class SiteInfo extends ImmutableComponent { extendedValidation: this.isExtendedValidation })} /> } else if (this.runInsecureContent) { - secureIcon =
  • + secureIcon =
  • } else { - secureIcon =
  • + secureIcon =
  • } // Figure out the partition info display diff --git a/js/components/urlBar.js b/js/components/urlBar.js index d0048233bc4..943af54a93f 100644 --- a/js/components/urlBar.js +++ b/js/components/urlBar.js @@ -409,6 +409,9 @@ class UrlBar extends ImmutableComponent { } render () { + const showIconSecure = !this.activateSearchEngine && this.isHTTPPage && this.props.isSecure && !this.props.urlbar.get('active') + const showIconInsecure = !this.activateSearchEngine && this.isHTTPPage && !this.props.isSecure && !this.props.urlbar.get('active') && !this.props.titleMode + const showIconSearch = !this.activateSearchEngine && this.props.urlbar.get('active') && this.props.loading === false const value = this.isActive || (!this.locationValue && this.isFocused()) ? undefined : this.locationValue @@ -424,9 +427,9 @@ class UrlBar extends ImmutableComponent { className={cx({ urlbarIcon: true, 'fa': !this.activateSearchEngine, - 'fa-lock': !this.activateSearchEngine && this.isHTTPPage && this.props.isSecure && !this.props.urlbar.get('active'), - 'fa-unlock': !this.activateSearchEngine && this.isHTTPPage && !this.props.isSecure && !this.props.urlbar.get('active') && !this.props.titleMode, - 'fa fa-file': !this.activateSearchEngine && this.props.urlbar.get('active') && this.props.loading === false, + 'fa-lock': showIconSecure, + 'fa-exclamation-triangle': showIconInsecure, + 'fa fa-search': showIconSearch || (!showIconSecure && !showIconInsecure && !showIconSearch), extendedValidation: this.extendedValidationSSL })} style={ diff --git a/less/navigationBar.less b/less/navigationBar.less index 361757f33f9..c98767d878e 100644 --- a/less/navigationBar.less +++ b/less/navigationBar.less @@ -852,7 +852,7 @@ } .urlbarIcon { - color: @focusUrlbarOutline; + color: @siteSecureColor; left: 14px; margin-top: 1px; font-size: 13px; @@ -860,19 +860,19 @@ min-width: 16px; &.fa-lock, - &.fa-unlock { + &.fa-exclamation-triangle { margin-top: 1px; font-size: 16px; min-height: 10px; min-width: 16px; } - &.fa-unlock { - color: @gray; + &.fa-exclamation-triangle { + color: @siteInsecureColor; } &.extendedValidation { - color: green; + color: @siteEVColor; } } } diff --git a/less/variables.less b/less/variables.less index 4e57badae99..acc151402b5 100644 --- a/less/variables.less +++ b/less/variables.less @@ -38,6 +38,9 @@ @contextMenuFontSize: 14px; @audioColor: @highlightBlue; @focusUrlbarOutline: @highlightBlue; +@siteSecureColor: @highlightBlue; +@siteInsecureColor: #FCBA00; +@siteEVColor: green; @loadTimeColor: @highlightBlue; @activeTabDefaultColor: @chromePrimary; @buttonColor: #5a5a5a; diff --git a/test/components/navigationBarTest.js b/test/components/navigationBarTest.js index 2b589daea55..7620f8c01ad 100644 --- a/test/components/navigationBarTest.js +++ b/test/components/navigationBarTest.js @@ -332,7 +332,7 @@ describe('navigationBar', function () { .moveToObject(navigator) .waitForExist(urlbarIcon) .getAttribute(urlbarIcon, 'class').then((classes) => - classes.includes('fa-unlock') + classes.includes('fa-exclamation-triangle') )) .windowByUrl(Brave.browserWindowUrl) .click(urlbarIcon) @@ -791,6 +791,9 @@ describe('navigationBar', function () { return this.getValue(urlInput).then((val) => val === 'about:blank') }) }) + it('has the search icon', function * () { + yield this.app.client.waitForExist('.urlbarIcon.fa-search') + }) }) describe('page with focused form input', function () { @@ -850,8 +853,8 @@ describe('navigationBar', function () { yield selectsText(this.app.client, 'brave.com') }) - it('has the file icon', function * () { - yield this.app.client.waitForExist('.urlbarIcon.fa-file') + it('has the search icon', function * () { + yield this.app.client.waitForExist('.urlbarIcon.fa-search') }) })