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

Commit

Permalink
Made urlBarIconContainer clickable to display connection info. Fix #7888
Browse files Browse the repository at this point in the history
  • Loading branch information
MargarytaChepiga authored and bsclifton committed Feb 15, 2018
1 parent 67642a0 commit fdaf153
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
12 changes: 8 additions & 4 deletions app/renderer/components/navigation/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ class UrlBar extends React.Component {
}
}

onUrlBarIconContainerClick () {
windowActions.setSiteInfoVisible(true)
}

onBlur (e) {
windowActions.urlBarOnBlur(getCurrentWindowId(), e.target.value, this.props.urlbarLocation, eventElHasAncestorWithClasses(e, ['urlBarSuggestions', 'urlbarForm']))
}
Expand Down Expand Up @@ -497,13 +501,13 @@ class UrlBar extends React.Component {

render () {
const urlbarIconContainer = this.props.evCert
? (<div className='urlbarIconContainer'>
? (<div onClick={this.onUrlBarIconContainerClick} className='urlbarIconContainer'>
<UrlBarIcon
titleMode={this.props.titleMode}
/>
{this.showEvCert}
</div>)
: (<div className='urlbarIconContainer'>
: (<div onClick={this.onUrlBarIconContainerClick} className='urlbarIconContainer'>
<UrlBarIcon
titleMode={this.props.titleMode}
/>
Expand All @@ -513,13 +517,13 @@ class UrlBar extends React.Component {
urlbarForm: true,
[css(styles.urlbarForm_wide)]: this.props.isWideURLbarEnabled,
noBorderRadius: this.props.publisherButtonVisible
})}
})}
id='urlbar'
>
{urlbarIconContainer}
{
this.props.titleMode
? <div id='titleBar' data-test-id='titleBar'>
? <div id='titleBar' data-test-id='titleBar' >
<span><strong>{this.props.hostValue}</strong></span>
<span>{this.props.hostValue && this.titleValue ? ' | ' : ''}</span>
<span>{this.titleValue}</span>
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ globalStyles.color.chromeBorderColor = globalStyles.color.chromePrimary
globalStyles.color.chromeControlsWarningBackground = globalStyles.color.chromePrimary
globalStyles.color.audioColor = globalStyles.color.highlightBlue
globalStyles.color.focusUrlbarOutline = globalStyles.color.highlightBlue
globalStyles.color.siteSecureColor = globalStyles.color.buttonColor
globalStyles.color.loadTimeColor = globalStyles.color.highlightBlue
globalStyles.color.activeTabDefaultColor = globalStyles.color.chromePrimary

Expand Down
14 changes: 6 additions & 8 deletions less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@
}
}

@urlbarFormHeight: 25px;

.urlbarForm {
position: relative; // PR #6485
width: 0; // Fixes #4298
Expand Down Expand Up @@ -619,8 +617,7 @@
color: @chromeText;

// #4922
// TODO: replace this value with a CSS variable to add a dark UI.
background: #fff;
background: @chromeControlsBackground2;
}

@media (max-width: @breakpointNarrowViewport) {
Expand Down Expand Up @@ -825,7 +822,7 @@
justify-content: center;
height: @urlbarFormHeight;
min-height: @urlbarFormHeight;
margin: 0 5px;
margin-right: 5px;
max-width: 40%;

.urlbarIcon {
Expand All @@ -835,7 +832,7 @@
background-position: center;
position: relative;
bottom: -1px;
margin-left: 3px;
padding: 5px 7px 5px 7px;

// about:newtab
&.fa-search {
Expand Down Expand Up @@ -863,8 +860,9 @@

.evCert {
font-size: 12px;
color: forestgreen;
padding: 5px;
font-weight: 500;
color: @siteEVColor;
padding-right: 5px;
border-right: 1px solid #ccc;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
3 changes: 2 additions & 1 deletion less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@settingItemSubtextFontSize: 0.95rem;
@audioColor: @highlightBlue;
@focusUrlbarOutline: rgba(55, 169, 253, 0.4);
@siteSecureColor: @buttonColor;
@siteSecureColor: green;
@siteInsecureColor: #C63626;
@siteEVColor: green;
@loadTimeColor: @highlightBlue;
Expand All @@ -52,6 +52,7 @@
@braveDarkOrange: #D44600;
@dragSpacing: 50px;
@urlBarOutline: #bbb;
@urlbarFormHeight: 25px; // added

@navbarHeight: 36px;
@downloadsBarHeight: 60px;
Expand Down

0 comments on commit fdaf153

Please sign in to comment.