mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1077332: hide tabs when not logged in with FxA. r=paolo
This commit is contained in:
parent
c4732bc1aa
commit
db64275e82
@ -55,7 +55,9 @@ loop.panel = (function(_, mozL10n) {
|
||||
}, this);
|
||||
return (
|
||||
React.DOM.div({className: "tab-view-container"},
|
||||
React.DOM.ul({className: "tab-view"}, tabButtons),
|
||||
!this.props.buttonsHidden
|
||||
? React.DOM.ul({className: "tab-view"}, tabButtons)
|
||||
: null,
|
||||
tabs
|
||||
)
|
||||
);
|
||||
@ -475,7 +477,12 @@ loop.panel = (function(_, mozL10n) {
|
||||
},
|
||||
|
||||
_onStatusChanged: function() {
|
||||
this.setState({userProfile: navigator.mozLoop.userProfile});
|
||||
var profile = navigator.mozLoop.userProfile;
|
||||
if (profile != this.state.userProfile) {
|
||||
// On profile change (login, logout), switch back to the default tab.
|
||||
this.selectTab("call");
|
||||
}
|
||||
this.setState({userProfile: profile});
|
||||
this.updateServiceErrors();
|
||||
},
|
||||
|
||||
@ -508,7 +515,7 @@ loop.panel = (function(_, mozL10n) {
|
||||
React.DOM.div(null,
|
||||
NotificationListView({notifications: this.props.notifications,
|
||||
clearOnDocumentHidden: true}),
|
||||
TabView({ref: "tabView"},
|
||||
TabView({ref: "tabView", buttonsHidden: !this.state.userProfile},
|
||||
Tab({name: "call"},
|
||||
React.DOM.div({className: "content-area"},
|
||||
CallUrlResult({client: this.props.client,
|
||||
|
@ -55,7 +55,9 @@ loop.panel = (function(_, mozL10n) {
|
||||
}, this);
|
||||
return (
|
||||
<div className="tab-view-container">
|
||||
<ul className="tab-view">{tabButtons}</ul>
|
||||
{!this.props.buttonsHidden
|
||||
? <ul className="tab-view">{tabButtons}</ul>
|
||||
: null}
|
||||
{tabs}
|
||||
</div>
|
||||
);
|
||||
@ -475,7 +477,12 @@ loop.panel = (function(_, mozL10n) {
|
||||
},
|
||||
|
||||
_onStatusChanged: function() {
|
||||
this.setState({userProfile: navigator.mozLoop.userProfile});
|
||||
var profile = navigator.mozLoop.userProfile;
|
||||
if (profile != this.state.userProfile) {
|
||||
// On profile change (login, logout), switch back to the default tab.
|
||||
this.selectTab("call");
|
||||
}
|
||||
this.setState({userProfile: profile});
|
||||
this.updateServiceErrors();
|
||||
},
|
||||
|
||||
@ -508,7 +515,7 @@ loop.panel = (function(_, mozL10n) {
|
||||
<div>
|
||||
<NotificationListView notifications={this.props.notifications}
|
||||
clearOnDocumentHidden={true} />
|
||||
<TabView ref="tabView">
|
||||
<TabView ref="tabView" buttonsHidden={!this.state.userProfile}>
|
||||
<Tab name="call">
|
||||
<div className="content-area">
|
||||
<CallUrlResult client={this.props.client}
|
||||
|
Loading…
Reference in New Issue
Block a user