@@ -35,7 +35,7 @@ class Static extends React.Component {
3535 window . setTotalLoadingTime = this . setTotalLoadingTime . bind ( this ) ;
3636 window . setEnableSignInButton = this . setEnableSignInButton . bind ( this ) ;
3737 window . handleSignInStateChange = this . handleSignInStateChange . bind ( this ) ;
38- this . handleChange = this . handleChange . bind ( this )
38+ this . handleChange = this . handleChange . bind ( this ) ;
3939 }
4040
4141 componentDidMount ( ) {
@@ -45,7 +45,7 @@ class Static extends React.Component {
4545 //Every time the checkbox is clicked, this method is called
4646 handleChange ( ) {
4747 checked = ! checked ;
48- this . props . onCheckedChange ( checked ) ;
48+ this . props . onCheckedChange ( checked ) ;
4949 }
5050
5151 render ( ) {
@@ -132,7 +132,8 @@ class Static extends React.Component {
132132 let status = await chrome . webview . hostObjects . scriptObject . SignOut ( ) ;
133133 this . setState ( {
134134 signInStatus : ! status ,
135- signInTitle : this . props . signInTitle
135+ signInTitle : this . props . signInTitle ,
136+ signInTooltip : this . props . signInTooltip
136137 } ) ;
137138 }
138139 else {
@@ -147,10 +148,16 @@ class Static extends React.Component {
147148 btn . classList . remove ( 'disableButton' ) ;
148149 btn . disabled = false ;
149150 if ( status ) {
150- this . setState ( { signInTitle : this . props . signOutTitle } ) ;
151+ this . setState ( {
152+ signInTitle : this . props . signOutTitle ,
153+ signInTooltip : this . props . signOutTooltip
154+ } ) ;
151155 }
152156 else {
153- this . setState ( { signInTitle : this . props . signInTitle } ) ;
157+ this . setState ( {
158+ signInTitle : this . props . signInTitle ,
159+ signInTooltip : this . props . signInTooltip
160+ } ) ;
154161 }
155162 }
156163 }
@@ -208,16 +215,21 @@ class Static extends React.Component {
208215
209216 //Handles changes to auth status on splash screen
210217 handleSignInStateChange ( auth ) {
211- let btn = document . getElementById ( 'btnSignIn' ) ;
212-
213218 this . setState ( {
214219 signInStatus : auth . status === 'True'
215220 } ) ;
216221
217222 if ( auth . status === 'True' ) {
218- btn . innerHTML = this . props . signOutTitle ;
219- } else {
220- btn . innerHTML = this . props . signInTitle ;
223+ this . setState ( {
224+ signInTitle : this . props . signOutTitle ,
225+ signInTooltip : this . props . signOutTooltip
226+ } ) ;
227+ }
228+ else {
229+ this . setState ( {
230+ signInTitle : this . props . signInTitle ,
231+ signInTooltip : this . props . signInTooltip
232+ } ) ;
221233 }
222234 }
223235
@@ -253,7 +265,8 @@ Static.propTypes = {
253265 showScreenAgainLabel : PropTypes . string ,
254266 signInStatus : PropTypes . bool ,
255267 importSettingsTitle : PropTypes . string ,
256- importSettingsTooltipDescription : PropTypes . string
268+ importSettingsTooltipDescription : PropTypes . string ,
269+ onCheckedChange : PropTypes . func
257270} ;
258271
259272export default Static ;
0 commit comments