forked from mozilla-services/screenshots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes mozilla-services#4790 - NonFxA Shot takers should be briefly on…
…boarded
- Loading branch information
1 parent
6d13320
commit bc48609
Showing
21 changed files
with
353 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
const React = require("react"); | ||
const PropTypes = require("prop-types"); | ||
const { Localized } = require("fluent-react/compat"); | ||
const sendEvent = require("./browser-send-event.js"); | ||
|
||
exports.FxaOnboardingDialog = class FxaOnboardingDialog extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
if (this.props.display) { | ||
return <div className="onboarding-promo-dialog right-align"> | ||
<div className="triangle"><div className="triangle-inner"></div></div> | ||
<div className="promo-header"> | ||
<span className="promo-logo" /> | ||
<Localized id="onboardingPromoTitle"> | ||
<span className="promo-title">What’s new with Firefox Screenshots?</span> | ||
</Localized> | ||
</div> | ||
<div className="promo-message"> | ||
<Localized id="onboardingPromoMessage"> | ||
<p> | ||
Now, sign in to Screenshots with a Firefox Account and | ||
do more: | ||
</p> | ||
</Localized> | ||
<ul> | ||
<Localized id="onboardingPromoMessageListItem1"> | ||
<li>Access your library on all of your devices</li> | ||
</Localized> | ||
<Localized id="onboardingPromoMessageListItem2"> | ||
<li>Store your favorite shots forever</li> | ||
</Localized> | ||
</ul> | ||
</div> | ||
<div className="promo-footer"> | ||
<Localized id="onboardingPromoDismissButton" attrs={{title: true}}> | ||
<a href="#" title="Dismiss" onClick={ this.onCloseDialog.bind(this) }>Dismiss</a> | ||
</Localized> | ||
<Localized id="onboardingPromoSigninButton" attrs={{title: true}}> | ||
<button className="button primary" title="Sign in" onClick={ this.onConfirm.bind(this) }>Sign in</button> | ||
</Localized> | ||
</div> | ||
</div>; | ||
} | ||
return null; | ||
} | ||
|
||
onCloseDialog(event) { | ||
this.props.hideDialog(); | ||
sendEvent("onboarding-promo-closed"); | ||
} | ||
|
||
onConfirm(event) { | ||
this.props.hideDialog(); | ||
sendEvent("fxa-signin-onboarding-promo"); | ||
location.href = this.props.logInURI; | ||
} | ||
}; | ||
|
||
exports.FxaOnboardingDialog.propTypes = { | ||
logInURI: PropTypes.string, | ||
display: PropTypes.bool, | ||
hideDialog: PropTypes.func, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.